lua_ImageControl.cpp 166 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857
  1. #include "Base.h"
  2. #include "ScriptController.h"
  3. #include "lua_ImageControl.h"
  4. #include "Animation.h"
  5. #include "AnimationTarget.h"
  6. #include "Base.h"
  7. #include "Button.h"
  8. #include "Control.h"
  9. #include "Game.h"
  10. #include "Gamepad.h"
  11. #include "ImageControl.h"
  12. #include "Label.h"
  13. #include "Node.h"
  14. #include "Ref.h"
  15. #include "ScriptController.h"
  16. #include "ScriptTarget.h"
  17. #include "lua_ControlAlignment.h"
  18. #include "lua_ControlListenerEventType.h"
  19. #include "lua_ControlState.h"
  20. #include "lua_CurveInterpolationType.h"
  21. #include "lua_FontJustify.h"
  22. namespace gameplay
  23. {
  24. void luaRegister_ImageControl()
  25. {
  26. const luaL_Reg lua_members[] =
  27. {
  28. {"addListener", lua_ImageControl_addListener},
  29. {"addRef", lua_ImageControl_addRef},
  30. {"addScriptCallback", lua_ImageControl_addScriptCallback},
  31. {"createAnimation", lua_ImageControl_createAnimation},
  32. {"createAnimationFromBy", lua_ImageControl_createAnimationFromBy},
  33. {"createAnimationFromTo", lua_ImageControl_createAnimationFromTo},
  34. {"destroyAnimation", lua_ImageControl_destroyAnimation},
  35. {"getAbsoluteBounds", lua_ImageControl_getAbsoluteBounds},
  36. {"getAlignment", lua_ImageControl_getAlignment},
  37. {"getAnimation", lua_ImageControl_getAnimation},
  38. {"getAnimationPropertyComponentCount", lua_ImageControl_getAnimationPropertyComponentCount},
  39. {"getAnimationPropertyValue", lua_ImageControl_getAnimationPropertyValue},
  40. {"getAutoHeight", lua_ImageControl_getAutoHeight},
  41. {"getAutoWidth", lua_ImageControl_getAutoWidth},
  42. {"getBorder", lua_ImageControl_getBorder},
  43. {"getBounds", lua_ImageControl_getBounds},
  44. {"getClip", lua_ImageControl_getClip},
  45. {"getClipBounds", lua_ImageControl_getClipBounds},
  46. {"getConsumeInputEvents", lua_ImageControl_getConsumeInputEvents},
  47. {"getCursorColor", lua_ImageControl_getCursorColor},
  48. {"getCursorRegion", lua_ImageControl_getCursorRegion},
  49. {"getCursorUVs", lua_ImageControl_getCursorUVs},
  50. {"getFocusIndex", lua_ImageControl_getFocusIndex},
  51. {"getFont", lua_ImageControl_getFont},
  52. {"getFontSize", lua_ImageControl_getFontSize},
  53. {"getHeight", lua_ImageControl_getHeight},
  54. {"getId", lua_ImageControl_getId},
  55. {"getImageColor", lua_ImageControl_getImageColor},
  56. {"getImageRegion", lua_ImageControl_getImageRegion},
  57. {"getImageUVs", lua_ImageControl_getImageUVs},
  58. {"getMargin", lua_ImageControl_getMargin},
  59. {"getOpacity", lua_ImageControl_getOpacity},
  60. {"getPadding", lua_ImageControl_getPadding},
  61. {"getRefCount", lua_ImageControl_getRefCount},
  62. {"getRegionDst", lua_ImageControl_getRegionDst},
  63. {"getRegionSrc", lua_ImageControl_getRegionSrc},
  64. {"getSkinColor", lua_ImageControl_getSkinColor},
  65. {"getSkinRegion", lua_ImageControl_getSkinRegion},
  66. {"getState", lua_ImageControl_getState},
  67. {"getStyle", lua_ImageControl_getStyle},
  68. {"getText", lua_ImageControl_getText},
  69. {"getTextAlignment", lua_ImageControl_getTextAlignment},
  70. {"getTextColor", lua_ImageControl_getTextColor},
  71. {"getTextRightToLeft", lua_ImageControl_getTextRightToLeft},
  72. {"getType", lua_ImageControl_getType},
  73. {"getWidth", lua_ImageControl_getWidth},
  74. {"getX", lua_ImageControl_getX},
  75. {"getY", lua_ImageControl_getY},
  76. {"getZIndex", lua_ImageControl_getZIndex},
  77. {"isContainer", lua_ImageControl_isContainer},
  78. {"isEnabled", lua_ImageControl_isEnabled},
  79. {"isVisible", lua_ImageControl_isVisible},
  80. {"release", lua_ImageControl_release},
  81. {"removeListener", lua_ImageControl_removeListener},
  82. {"removeScriptCallback", lua_ImageControl_removeScriptCallback},
  83. {"setAlignment", lua_ImageControl_setAlignment},
  84. {"setAnimationPropertyValue", lua_ImageControl_setAnimationPropertyValue},
  85. {"setAutoHeight", lua_ImageControl_setAutoHeight},
  86. {"setAutoWidth", lua_ImageControl_setAutoWidth},
  87. {"setBorder", lua_ImageControl_setBorder},
  88. {"setBounds", lua_ImageControl_setBounds},
  89. {"setConsumeInputEvents", lua_ImageControl_setConsumeInputEvents},
  90. {"setCursorColor", lua_ImageControl_setCursorColor},
  91. {"setCursorRegion", lua_ImageControl_setCursorRegion},
  92. {"setEnabled", lua_ImageControl_setEnabled},
  93. {"setFocusIndex", lua_ImageControl_setFocusIndex},
  94. {"setFont", lua_ImageControl_setFont},
  95. {"setFontSize", lua_ImageControl_setFontSize},
  96. {"setHeight", lua_ImageControl_setHeight},
  97. {"setImage", lua_ImageControl_setImage},
  98. {"setImageColor", lua_ImageControl_setImageColor},
  99. {"setImageRegion", lua_ImageControl_setImageRegion},
  100. {"setMargin", lua_ImageControl_setMargin},
  101. {"setOpacity", lua_ImageControl_setOpacity},
  102. {"setPadding", lua_ImageControl_setPadding},
  103. {"setPosition", lua_ImageControl_setPosition},
  104. {"setRegionDst", lua_ImageControl_setRegionDst},
  105. {"setRegionSrc", lua_ImageControl_setRegionSrc},
  106. {"setSize", lua_ImageControl_setSize},
  107. {"setSkinColor", lua_ImageControl_setSkinColor},
  108. {"setSkinRegion", lua_ImageControl_setSkinRegion},
  109. {"setState", lua_ImageControl_setState},
  110. {"setStyle", lua_ImageControl_setStyle},
  111. {"setText", lua_ImageControl_setText},
  112. {"setTextAlignment", lua_ImageControl_setTextAlignment},
  113. {"setTextColor", lua_ImageControl_setTextColor},
  114. {"setTextRightToLeft", lua_ImageControl_setTextRightToLeft},
  115. {"setVisible", lua_ImageControl_setVisible},
  116. {"setWidth", lua_ImageControl_setWidth},
  117. {"setZIndex", lua_ImageControl_setZIndex},
  118. {NULL, NULL}
  119. };
  120. const luaL_Reg lua_statics[] =
  121. {
  122. {"ANIMATE_OPACITY", lua_ImageControl_static_ANIMATE_OPACITY},
  123. {"ANIMATE_POSITION", lua_ImageControl_static_ANIMATE_POSITION},
  124. {"ANIMATE_POSITION_X", lua_ImageControl_static_ANIMATE_POSITION_X},
  125. {"ANIMATE_POSITION_Y", lua_ImageControl_static_ANIMATE_POSITION_Y},
  126. {"ANIMATE_SIZE", lua_ImageControl_static_ANIMATE_SIZE},
  127. {"ANIMATE_SIZE_HEIGHT", lua_ImageControl_static_ANIMATE_SIZE_HEIGHT},
  128. {"ANIMATE_SIZE_WIDTH", lua_ImageControl_static_ANIMATE_SIZE_WIDTH},
  129. {"create", lua_ImageControl_static_create},
  130. {NULL, NULL}
  131. };
  132. std::vector<std::string> scopePath;
  133. gameplay::ScriptUtil::registerClass("ImageControl", lua_members, NULL, lua_ImageControl__gc, lua_statics, scopePath);
  134. }
  135. static ImageControl* getInstance(lua_State* state)
  136. {
  137. void* userdata = luaL_checkudata(state, 1, "ImageControl");
  138. luaL_argcheck(state, userdata != NULL, 1, "'ImageControl' expected.");
  139. return (ImageControl*)((gameplay::ScriptUtil::LuaObject*)userdata)->instance;
  140. }
  141. int lua_ImageControl__gc(lua_State* state)
  142. {
  143. // Get the number of parameters.
  144. int paramCount = lua_gettop(state);
  145. // Attempt to match the parameters to a valid binding.
  146. switch (paramCount)
  147. {
  148. case 1:
  149. {
  150. if ((lua_type(state, 1) == LUA_TUSERDATA))
  151. {
  152. void* userdata = luaL_checkudata(state, 1, "ImageControl");
  153. luaL_argcheck(state, userdata != NULL, 1, "'ImageControl' expected.");
  154. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)userdata;
  155. if (object->owns)
  156. {
  157. ImageControl* instance = (ImageControl*)object->instance;
  158. SAFE_RELEASE(instance);
  159. }
  160. return 0;
  161. }
  162. lua_pushstring(state, "lua_ImageControl__gc - Failed to match the given parameters to a valid function signature.");
  163. lua_error(state);
  164. break;
  165. }
  166. default:
  167. {
  168. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  169. lua_error(state);
  170. break;
  171. }
  172. }
  173. return 0;
  174. }
  175. int lua_ImageControl_addListener(lua_State* state)
  176. {
  177. // Get the number of parameters.
  178. int paramCount = lua_gettop(state);
  179. // Attempt to match the parameters to a valid binding.
  180. switch (paramCount)
  181. {
  182. case 3:
  183. {
  184. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  185. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  186. lua_type(state, 3) == LUA_TNUMBER)
  187. {
  188. // Get parameter 1 off the stack.
  189. bool param1Valid;
  190. gameplay::ScriptUtil::LuaArray<Control::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false, &param1Valid);
  191. if (!param1Valid)
  192. {
  193. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control::Listener'.");
  194. lua_error(state);
  195. }
  196. // Get parameter 2 off the stack.
  197. int param2 = (int)luaL_checkint(state, 3);
  198. ImageControl* instance = getInstance(state);
  199. instance->addListener(param1, param2);
  200. return 0;
  201. }
  202. lua_pushstring(state, "lua_ImageControl_addListener - Failed to match the given parameters to a valid function signature.");
  203. lua_error(state);
  204. break;
  205. }
  206. default:
  207. {
  208. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  209. lua_error(state);
  210. break;
  211. }
  212. }
  213. return 0;
  214. }
  215. int lua_ImageControl_addRef(lua_State* state)
  216. {
  217. // Get the number of parameters.
  218. int paramCount = lua_gettop(state);
  219. // Attempt to match the parameters to a valid binding.
  220. switch (paramCount)
  221. {
  222. case 1:
  223. {
  224. if ((lua_type(state, 1) == LUA_TUSERDATA))
  225. {
  226. ImageControl* instance = getInstance(state);
  227. instance->addRef();
  228. return 0;
  229. }
  230. lua_pushstring(state, "lua_ImageControl_addRef - Failed to match the given parameters to a valid function signature.");
  231. lua_error(state);
  232. break;
  233. }
  234. default:
  235. {
  236. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  237. lua_error(state);
  238. break;
  239. }
  240. }
  241. return 0;
  242. }
  243. int lua_ImageControl_addScriptCallback(lua_State* state)
  244. {
  245. // Get the number of parameters.
  246. int paramCount = lua_gettop(state);
  247. // Attempt to match the parameters to a valid binding.
  248. switch (paramCount)
  249. {
  250. case 3:
  251. {
  252. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  253. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  254. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  255. {
  256. // Get parameter 1 off the stack.
  257. std::string param1 = gameplay::ScriptUtil::getString(2, true);
  258. // Get parameter 2 off the stack.
  259. std::string param2 = gameplay::ScriptUtil::getString(3, true);
  260. ImageControl* instance = getInstance(state);
  261. instance->addScriptCallback(param1, param2);
  262. return 0;
  263. }
  264. lua_pushstring(state, "lua_ImageControl_addScriptCallback - Failed to match the given parameters to a valid function signature.");
  265. lua_error(state);
  266. break;
  267. }
  268. default:
  269. {
  270. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  271. lua_error(state);
  272. break;
  273. }
  274. }
  275. return 0;
  276. }
  277. int lua_ImageControl_createAnimation(lua_State* state)
  278. {
  279. // Get the number of parameters.
  280. int paramCount = lua_gettop(state);
  281. // Attempt to match the parameters to a valid binding.
  282. switch (paramCount)
  283. {
  284. case 3:
  285. {
  286. do
  287. {
  288. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  289. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  290. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  291. {
  292. // Get parameter 1 off the stack.
  293. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  294. // Get parameter 2 off the stack.
  295. const char* param2 = gameplay::ScriptUtil::getString(3, false);
  296. ImageControl* instance = getInstance(state);
  297. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  298. if (returnPtr)
  299. {
  300. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  301. object->instance = returnPtr;
  302. object->owns = false;
  303. luaL_getmetatable(state, "Animation");
  304. lua_setmetatable(state, -2);
  305. }
  306. else
  307. {
  308. lua_pushnil(state);
  309. }
  310. return 1;
  311. }
  312. } while (0);
  313. do
  314. {
  315. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  316. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  317. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  318. {
  319. // Get parameter 1 off the stack.
  320. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  321. // Get parameter 2 off the stack.
  322. bool param2Valid;
  323. gameplay::ScriptUtil::LuaArray<Properties> param2 = gameplay::ScriptUtil::getObjectPointer<Properties>(3, "Properties", false, &param2Valid);
  324. if (!param2Valid)
  325. break;
  326. ImageControl* instance = getInstance(state);
  327. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  328. if (returnPtr)
  329. {
  330. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  331. object->instance = returnPtr;
  332. object->owns = false;
  333. luaL_getmetatable(state, "Animation");
  334. lua_setmetatable(state, -2);
  335. }
  336. else
  337. {
  338. lua_pushnil(state);
  339. }
  340. return 1;
  341. }
  342. } while (0);
  343. lua_pushstring(state, "lua_ImageControl_createAnimation - Failed to match the given parameters to a valid function signature.");
  344. lua_error(state);
  345. break;
  346. }
  347. case 7:
  348. {
  349. do
  350. {
  351. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  352. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  353. lua_type(state, 3) == LUA_TNUMBER &&
  354. lua_type(state, 4) == LUA_TNUMBER &&
  355. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  356. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  357. (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
  358. {
  359. // Get parameter 1 off the stack.
  360. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  361. // Get parameter 2 off the stack.
  362. int param2 = (int)luaL_checkint(state, 3);
  363. // Get parameter 3 off the stack.
  364. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  365. // Get parameter 4 off the stack.
  366. gameplay::ScriptUtil::LuaArray<unsigned int> param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5);
  367. // Get parameter 5 off the stack.
  368. gameplay::ScriptUtil::LuaArray<float> param5 = gameplay::ScriptUtil::getFloatPointer(6);
  369. // Get parameter 6 off the stack.
  370. Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7));
  371. ImageControl* instance = getInstance(state);
  372. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6);
  373. if (returnPtr)
  374. {
  375. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  376. object->instance = returnPtr;
  377. object->owns = false;
  378. luaL_getmetatable(state, "Animation");
  379. lua_setmetatable(state, -2);
  380. }
  381. else
  382. {
  383. lua_pushnil(state);
  384. }
  385. return 1;
  386. }
  387. } while (0);
  388. lua_pushstring(state, "lua_ImageControl_createAnimation - Failed to match the given parameters to a valid function signature.");
  389. lua_error(state);
  390. break;
  391. }
  392. case 9:
  393. {
  394. do
  395. {
  396. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  397. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  398. lua_type(state, 3) == LUA_TNUMBER &&
  399. lua_type(state, 4) == LUA_TNUMBER &&
  400. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  401. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  402. (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) &&
  403. (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) &&
  404. (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL))
  405. {
  406. // Get parameter 1 off the stack.
  407. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  408. // Get parameter 2 off the stack.
  409. int param2 = (int)luaL_checkint(state, 3);
  410. // Get parameter 3 off the stack.
  411. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  412. // Get parameter 4 off the stack.
  413. gameplay::ScriptUtil::LuaArray<unsigned int> param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5);
  414. // Get parameter 5 off the stack.
  415. gameplay::ScriptUtil::LuaArray<float> param5 = gameplay::ScriptUtil::getFloatPointer(6);
  416. // Get parameter 6 off the stack.
  417. gameplay::ScriptUtil::LuaArray<float> param6 = gameplay::ScriptUtil::getFloatPointer(7);
  418. // Get parameter 7 off the stack.
  419. gameplay::ScriptUtil::LuaArray<float> param7 = gameplay::ScriptUtil::getFloatPointer(8);
  420. // Get parameter 8 off the stack.
  421. Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9));
  422. ImageControl* instance = getInstance(state);
  423. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8);
  424. if (returnPtr)
  425. {
  426. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  427. object->instance = returnPtr;
  428. object->owns = false;
  429. luaL_getmetatable(state, "Animation");
  430. lua_setmetatable(state, -2);
  431. }
  432. else
  433. {
  434. lua_pushnil(state);
  435. }
  436. return 1;
  437. }
  438. } while (0);
  439. lua_pushstring(state, "lua_ImageControl_createAnimation - Failed to match the given parameters to a valid function signature.");
  440. lua_error(state);
  441. break;
  442. }
  443. default:
  444. {
  445. lua_pushstring(state, "Invalid number of parameters (expected 3, 7 or 9).");
  446. lua_error(state);
  447. break;
  448. }
  449. }
  450. return 0;
  451. }
  452. int lua_ImageControl_createAnimationFromBy(lua_State* state)
  453. {
  454. // Get the number of parameters.
  455. int paramCount = lua_gettop(state);
  456. // Attempt to match the parameters to a valid binding.
  457. switch (paramCount)
  458. {
  459. case 7:
  460. {
  461. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  462. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  463. lua_type(state, 3) == LUA_TNUMBER &&
  464. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  465. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  466. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  467. lua_type(state, 7) == LUA_TNUMBER)
  468. {
  469. // Get parameter 1 off the stack.
  470. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  471. // Get parameter 2 off the stack.
  472. int param2 = (int)luaL_checkint(state, 3);
  473. // Get parameter 3 off the stack.
  474. gameplay::ScriptUtil::LuaArray<float> param3 = gameplay::ScriptUtil::getFloatPointer(4);
  475. // Get parameter 4 off the stack.
  476. gameplay::ScriptUtil::LuaArray<float> param4 = gameplay::ScriptUtil::getFloatPointer(5);
  477. // Get parameter 5 off the stack.
  478. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  479. // Get parameter 6 off the stack.
  480. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  481. ImageControl* instance = getInstance(state);
  482. void* returnPtr = (void*)instance->createAnimationFromBy(param1, param2, param3, param4, param5, param6);
  483. if (returnPtr)
  484. {
  485. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  486. object->instance = returnPtr;
  487. object->owns = false;
  488. luaL_getmetatable(state, "Animation");
  489. lua_setmetatable(state, -2);
  490. }
  491. else
  492. {
  493. lua_pushnil(state);
  494. }
  495. return 1;
  496. }
  497. lua_pushstring(state, "lua_ImageControl_createAnimationFromBy - Failed to match the given parameters to a valid function signature.");
  498. lua_error(state);
  499. break;
  500. }
  501. default:
  502. {
  503. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  504. lua_error(state);
  505. break;
  506. }
  507. }
  508. return 0;
  509. }
  510. int lua_ImageControl_createAnimationFromTo(lua_State* state)
  511. {
  512. // Get the number of parameters.
  513. int paramCount = lua_gettop(state);
  514. // Attempt to match the parameters to a valid binding.
  515. switch (paramCount)
  516. {
  517. case 7:
  518. {
  519. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  520. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  521. lua_type(state, 3) == LUA_TNUMBER &&
  522. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  523. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  524. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  525. lua_type(state, 7) == LUA_TNUMBER)
  526. {
  527. // Get parameter 1 off the stack.
  528. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  529. // Get parameter 2 off the stack.
  530. int param2 = (int)luaL_checkint(state, 3);
  531. // Get parameter 3 off the stack.
  532. gameplay::ScriptUtil::LuaArray<float> param3 = gameplay::ScriptUtil::getFloatPointer(4);
  533. // Get parameter 4 off the stack.
  534. gameplay::ScriptUtil::LuaArray<float> param4 = gameplay::ScriptUtil::getFloatPointer(5);
  535. // Get parameter 5 off the stack.
  536. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  537. // Get parameter 6 off the stack.
  538. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  539. ImageControl* instance = getInstance(state);
  540. void* returnPtr = (void*)instance->createAnimationFromTo(param1, param2, param3, param4, param5, param6);
  541. if (returnPtr)
  542. {
  543. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  544. object->instance = returnPtr;
  545. object->owns = false;
  546. luaL_getmetatable(state, "Animation");
  547. lua_setmetatable(state, -2);
  548. }
  549. else
  550. {
  551. lua_pushnil(state);
  552. }
  553. return 1;
  554. }
  555. lua_pushstring(state, "lua_ImageControl_createAnimationFromTo - Failed to match the given parameters to a valid function signature.");
  556. lua_error(state);
  557. break;
  558. }
  559. default:
  560. {
  561. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  562. lua_error(state);
  563. break;
  564. }
  565. }
  566. return 0;
  567. }
  568. int lua_ImageControl_destroyAnimation(lua_State* state)
  569. {
  570. // Get the number of parameters.
  571. int paramCount = lua_gettop(state);
  572. // Attempt to match the parameters to a valid binding.
  573. switch (paramCount)
  574. {
  575. case 1:
  576. {
  577. if ((lua_type(state, 1) == LUA_TUSERDATA))
  578. {
  579. ImageControl* instance = getInstance(state);
  580. instance->destroyAnimation();
  581. return 0;
  582. }
  583. lua_pushstring(state, "lua_ImageControl_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  584. lua_error(state);
  585. break;
  586. }
  587. case 2:
  588. {
  589. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  590. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  591. {
  592. // Get parameter 1 off the stack.
  593. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  594. ImageControl* instance = getInstance(state);
  595. instance->destroyAnimation(param1);
  596. return 0;
  597. }
  598. lua_pushstring(state, "lua_ImageControl_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  599. lua_error(state);
  600. break;
  601. }
  602. default:
  603. {
  604. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  605. lua_error(state);
  606. break;
  607. }
  608. }
  609. return 0;
  610. }
  611. int lua_ImageControl_getAbsoluteBounds(lua_State* state)
  612. {
  613. // Get the number of parameters.
  614. int paramCount = lua_gettop(state);
  615. // Attempt to match the parameters to a valid binding.
  616. switch (paramCount)
  617. {
  618. case 1:
  619. {
  620. if ((lua_type(state, 1) == LUA_TUSERDATA))
  621. {
  622. ImageControl* instance = getInstance(state);
  623. void* returnPtr = (void*)&(instance->getAbsoluteBounds());
  624. if (returnPtr)
  625. {
  626. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  627. object->instance = returnPtr;
  628. object->owns = false;
  629. luaL_getmetatable(state, "Rectangle");
  630. lua_setmetatable(state, -2);
  631. }
  632. else
  633. {
  634. lua_pushnil(state);
  635. }
  636. return 1;
  637. }
  638. lua_pushstring(state, "lua_ImageControl_getAbsoluteBounds - Failed to match the given parameters to a valid function signature.");
  639. lua_error(state);
  640. break;
  641. }
  642. default:
  643. {
  644. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  645. lua_error(state);
  646. break;
  647. }
  648. }
  649. return 0;
  650. }
  651. int lua_ImageControl_getAlignment(lua_State* state)
  652. {
  653. // Get the number of parameters.
  654. int paramCount = lua_gettop(state);
  655. // Attempt to match the parameters to a valid binding.
  656. switch (paramCount)
  657. {
  658. case 1:
  659. {
  660. if ((lua_type(state, 1) == LUA_TUSERDATA))
  661. {
  662. ImageControl* instance = getInstance(state);
  663. Control::Alignment result = instance->getAlignment();
  664. // Push the return value onto the stack.
  665. lua_pushstring(state, lua_stringFromEnum_ControlAlignment(result));
  666. return 1;
  667. }
  668. lua_pushstring(state, "lua_ImageControl_getAlignment - Failed to match the given parameters to a valid function signature.");
  669. lua_error(state);
  670. break;
  671. }
  672. default:
  673. {
  674. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  675. lua_error(state);
  676. break;
  677. }
  678. }
  679. return 0;
  680. }
  681. int lua_ImageControl_getAnimation(lua_State* state)
  682. {
  683. // Get the number of parameters.
  684. int paramCount = lua_gettop(state);
  685. // Attempt to match the parameters to a valid binding.
  686. switch (paramCount)
  687. {
  688. case 1:
  689. {
  690. if ((lua_type(state, 1) == LUA_TUSERDATA))
  691. {
  692. ImageControl* instance = getInstance(state);
  693. void* returnPtr = (void*)instance->getAnimation();
  694. if (returnPtr)
  695. {
  696. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  697. object->instance = returnPtr;
  698. object->owns = false;
  699. luaL_getmetatable(state, "Animation");
  700. lua_setmetatable(state, -2);
  701. }
  702. else
  703. {
  704. lua_pushnil(state);
  705. }
  706. return 1;
  707. }
  708. lua_pushstring(state, "lua_ImageControl_getAnimation - Failed to match the given parameters to a valid function signature.");
  709. lua_error(state);
  710. break;
  711. }
  712. case 2:
  713. {
  714. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  715. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  716. {
  717. // Get parameter 1 off the stack.
  718. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  719. ImageControl* instance = getInstance(state);
  720. void* returnPtr = (void*)instance->getAnimation(param1);
  721. if (returnPtr)
  722. {
  723. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  724. object->instance = returnPtr;
  725. object->owns = false;
  726. luaL_getmetatable(state, "Animation");
  727. lua_setmetatable(state, -2);
  728. }
  729. else
  730. {
  731. lua_pushnil(state);
  732. }
  733. return 1;
  734. }
  735. lua_pushstring(state, "lua_ImageControl_getAnimation - Failed to match the given parameters to a valid function signature.");
  736. lua_error(state);
  737. break;
  738. }
  739. default:
  740. {
  741. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  742. lua_error(state);
  743. break;
  744. }
  745. }
  746. return 0;
  747. }
  748. int lua_ImageControl_getAnimationPropertyComponentCount(lua_State* state)
  749. {
  750. // Get the number of parameters.
  751. int paramCount = lua_gettop(state);
  752. // Attempt to match the parameters to a valid binding.
  753. switch (paramCount)
  754. {
  755. case 2:
  756. {
  757. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  758. lua_type(state, 2) == LUA_TNUMBER)
  759. {
  760. // Get parameter 1 off the stack.
  761. int param1 = (int)luaL_checkint(state, 2);
  762. ImageControl* instance = getInstance(state);
  763. unsigned int result = instance->getAnimationPropertyComponentCount(param1);
  764. // Push the return value onto the stack.
  765. lua_pushunsigned(state, result);
  766. return 1;
  767. }
  768. lua_pushstring(state, "lua_ImageControl_getAnimationPropertyComponentCount - Failed to match the given parameters to a valid function signature.");
  769. lua_error(state);
  770. break;
  771. }
  772. default:
  773. {
  774. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  775. lua_error(state);
  776. break;
  777. }
  778. }
  779. return 0;
  780. }
  781. int lua_ImageControl_getAnimationPropertyValue(lua_State* state)
  782. {
  783. // Get the number of parameters.
  784. int paramCount = lua_gettop(state);
  785. // Attempt to match the parameters to a valid binding.
  786. switch (paramCount)
  787. {
  788. case 3:
  789. {
  790. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  791. lua_type(state, 2) == LUA_TNUMBER &&
  792. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  793. {
  794. // Get parameter 1 off the stack.
  795. int param1 = (int)luaL_checkint(state, 2);
  796. // Get parameter 2 off the stack.
  797. bool param2Valid;
  798. gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
  799. if (!param2Valid)
  800. {
  801. lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
  802. lua_error(state);
  803. }
  804. ImageControl* instance = getInstance(state);
  805. instance->getAnimationPropertyValue(param1, param2);
  806. return 0;
  807. }
  808. lua_pushstring(state, "lua_ImageControl_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  809. lua_error(state);
  810. break;
  811. }
  812. default:
  813. {
  814. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  815. lua_error(state);
  816. break;
  817. }
  818. }
  819. return 0;
  820. }
  821. int lua_ImageControl_getAutoHeight(lua_State* state)
  822. {
  823. // Get the number of parameters.
  824. int paramCount = lua_gettop(state);
  825. // Attempt to match the parameters to a valid binding.
  826. switch (paramCount)
  827. {
  828. case 1:
  829. {
  830. if ((lua_type(state, 1) == LUA_TUSERDATA))
  831. {
  832. ImageControl* instance = getInstance(state);
  833. bool result = instance->getAutoHeight();
  834. // Push the return value onto the stack.
  835. lua_pushboolean(state, result);
  836. return 1;
  837. }
  838. lua_pushstring(state, "lua_ImageControl_getAutoHeight - Failed to match the given parameters to a valid function signature.");
  839. lua_error(state);
  840. break;
  841. }
  842. default:
  843. {
  844. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  845. lua_error(state);
  846. break;
  847. }
  848. }
  849. return 0;
  850. }
  851. int lua_ImageControl_getAutoWidth(lua_State* state)
  852. {
  853. // Get the number of parameters.
  854. int paramCount = lua_gettop(state);
  855. // Attempt to match the parameters to a valid binding.
  856. switch (paramCount)
  857. {
  858. case 1:
  859. {
  860. if ((lua_type(state, 1) == LUA_TUSERDATA))
  861. {
  862. ImageControl* instance = getInstance(state);
  863. bool result = instance->getAutoWidth();
  864. // Push the return value onto the stack.
  865. lua_pushboolean(state, result);
  866. return 1;
  867. }
  868. lua_pushstring(state, "lua_ImageControl_getAutoWidth - Failed to match the given parameters to a valid function signature.");
  869. lua_error(state);
  870. break;
  871. }
  872. default:
  873. {
  874. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  875. lua_error(state);
  876. break;
  877. }
  878. }
  879. return 0;
  880. }
  881. int lua_ImageControl_getBorder(lua_State* state)
  882. {
  883. // Get the number of parameters.
  884. int paramCount = lua_gettop(state);
  885. // Attempt to match the parameters to a valid binding.
  886. switch (paramCount)
  887. {
  888. case 1:
  889. {
  890. if ((lua_type(state, 1) == LUA_TUSERDATA))
  891. {
  892. ImageControl* instance = getInstance(state);
  893. void* returnPtr = (void*)&(instance->getBorder());
  894. if (returnPtr)
  895. {
  896. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  897. object->instance = returnPtr;
  898. object->owns = false;
  899. luaL_getmetatable(state, "ThemeSideRegions");
  900. lua_setmetatable(state, -2);
  901. }
  902. else
  903. {
  904. lua_pushnil(state);
  905. }
  906. return 1;
  907. }
  908. lua_pushstring(state, "lua_ImageControl_getBorder - Failed to match the given parameters to a valid function signature.");
  909. lua_error(state);
  910. break;
  911. }
  912. case 2:
  913. {
  914. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  915. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  916. {
  917. // Get parameter 1 off the stack.
  918. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  919. ImageControl* instance = getInstance(state);
  920. void* returnPtr = (void*)&(instance->getBorder(param1));
  921. if (returnPtr)
  922. {
  923. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  924. object->instance = returnPtr;
  925. object->owns = false;
  926. luaL_getmetatable(state, "ThemeSideRegions");
  927. lua_setmetatable(state, -2);
  928. }
  929. else
  930. {
  931. lua_pushnil(state);
  932. }
  933. return 1;
  934. }
  935. lua_pushstring(state, "lua_ImageControl_getBorder - Failed to match the given parameters to a valid function signature.");
  936. lua_error(state);
  937. break;
  938. }
  939. default:
  940. {
  941. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  942. lua_error(state);
  943. break;
  944. }
  945. }
  946. return 0;
  947. }
  948. int lua_ImageControl_getBounds(lua_State* state)
  949. {
  950. // Get the number of parameters.
  951. int paramCount = lua_gettop(state);
  952. // Attempt to match the parameters to a valid binding.
  953. switch (paramCount)
  954. {
  955. case 1:
  956. {
  957. if ((lua_type(state, 1) == LUA_TUSERDATA))
  958. {
  959. ImageControl* instance = getInstance(state);
  960. void* returnPtr = (void*)&(instance->getBounds());
  961. if (returnPtr)
  962. {
  963. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  964. object->instance = returnPtr;
  965. object->owns = false;
  966. luaL_getmetatable(state, "Rectangle");
  967. lua_setmetatable(state, -2);
  968. }
  969. else
  970. {
  971. lua_pushnil(state);
  972. }
  973. return 1;
  974. }
  975. lua_pushstring(state, "lua_ImageControl_getBounds - Failed to match the given parameters to a valid function signature.");
  976. lua_error(state);
  977. break;
  978. }
  979. default:
  980. {
  981. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  982. lua_error(state);
  983. break;
  984. }
  985. }
  986. return 0;
  987. }
  988. int lua_ImageControl_getClip(lua_State* state)
  989. {
  990. // Get the number of parameters.
  991. int paramCount = lua_gettop(state);
  992. // Attempt to match the parameters to a valid binding.
  993. switch (paramCount)
  994. {
  995. case 1:
  996. {
  997. if ((lua_type(state, 1) == LUA_TUSERDATA))
  998. {
  999. ImageControl* instance = getInstance(state);
  1000. void* returnPtr = (void*)&(instance->getClip());
  1001. if (returnPtr)
  1002. {
  1003. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1004. object->instance = returnPtr;
  1005. object->owns = false;
  1006. luaL_getmetatable(state, "Rectangle");
  1007. lua_setmetatable(state, -2);
  1008. }
  1009. else
  1010. {
  1011. lua_pushnil(state);
  1012. }
  1013. return 1;
  1014. }
  1015. lua_pushstring(state, "lua_ImageControl_getClip - Failed to match the given parameters to a valid function signature.");
  1016. lua_error(state);
  1017. break;
  1018. }
  1019. default:
  1020. {
  1021. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1022. lua_error(state);
  1023. break;
  1024. }
  1025. }
  1026. return 0;
  1027. }
  1028. int lua_ImageControl_getClipBounds(lua_State* state)
  1029. {
  1030. // Get the number of parameters.
  1031. int paramCount = lua_gettop(state);
  1032. // Attempt to match the parameters to a valid binding.
  1033. switch (paramCount)
  1034. {
  1035. case 1:
  1036. {
  1037. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1038. {
  1039. ImageControl* instance = getInstance(state);
  1040. void* returnPtr = (void*)&(instance->getClipBounds());
  1041. if (returnPtr)
  1042. {
  1043. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1044. object->instance = returnPtr;
  1045. object->owns = false;
  1046. luaL_getmetatable(state, "Rectangle");
  1047. lua_setmetatable(state, -2);
  1048. }
  1049. else
  1050. {
  1051. lua_pushnil(state);
  1052. }
  1053. return 1;
  1054. }
  1055. lua_pushstring(state, "lua_ImageControl_getClipBounds - Failed to match the given parameters to a valid function signature.");
  1056. lua_error(state);
  1057. break;
  1058. }
  1059. default:
  1060. {
  1061. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1062. lua_error(state);
  1063. break;
  1064. }
  1065. }
  1066. return 0;
  1067. }
  1068. int lua_ImageControl_getConsumeInputEvents(lua_State* state)
  1069. {
  1070. // Get the number of parameters.
  1071. int paramCount = lua_gettop(state);
  1072. // Attempt to match the parameters to a valid binding.
  1073. switch (paramCount)
  1074. {
  1075. case 1:
  1076. {
  1077. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1078. {
  1079. ImageControl* instance = getInstance(state);
  1080. bool result = instance->getConsumeInputEvents();
  1081. // Push the return value onto the stack.
  1082. lua_pushboolean(state, result);
  1083. return 1;
  1084. }
  1085. lua_pushstring(state, "lua_ImageControl_getConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  1086. lua_error(state);
  1087. break;
  1088. }
  1089. default:
  1090. {
  1091. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1092. lua_error(state);
  1093. break;
  1094. }
  1095. }
  1096. return 0;
  1097. }
  1098. int lua_ImageControl_getCursorColor(lua_State* state)
  1099. {
  1100. // Get the number of parameters.
  1101. int paramCount = lua_gettop(state);
  1102. // Attempt to match the parameters to a valid binding.
  1103. switch (paramCount)
  1104. {
  1105. case 2:
  1106. {
  1107. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1108. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1109. {
  1110. // Get parameter 1 off the stack.
  1111. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1112. ImageControl* instance = getInstance(state);
  1113. void* returnPtr = (void*)&(instance->getCursorColor(param1));
  1114. if (returnPtr)
  1115. {
  1116. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1117. object->instance = returnPtr;
  1118. object->owns = false;
  1119. luaL_getmetatable(state, "Vector4");
  1120. lua_setmetatable(state, -2);
  1121. }
  1122. else
  1123. {
  1124. lua_pushnil(state);
  1125. }
  1126. return 1;
  1127. }
  1128. lua_pushstring(state, "lua_ImageControl_getCursorColor - Failed to match the given parameters to a valid function signature.");
  1129. lua_error(state);
  1130. break;
  1131. }
  1132. default:
  1133. {
  1134. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1135. lua_error(state);
  1136. break;
  1137. }
  1138. }
  1139. return 0;
  1140. }
  1141. int lua_ImageControl_getCursorRegion(lua_State* state)
  1142. {
  1143. // Get the number of parameters.
  1144. int paramCount = lua_gettop(state);
  1145. // Attempt to match the parameters to a valid binding.
  1146. switch (paramCount)
  1147. {
  1148. case 2:
  1149. {
  1150. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1151. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1152. {
  1153. // Get parameter 1 off the stack.
  1154. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1155. ImageControl* instance = getInstance(state);
  1156. void* returnPtr = (void*)&(instance->getCursorRegion(param1));
  1157. if (returnPtr)
  1158. {
  1159. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1160. object->instance = returnPtr;
  1161. object->owns = false;
  1162. luaL_getmetatable(state, "Rectangle");
  1163. lua_setmetatable(state, -2);
  1164. }
  1165. else
  1166. {
  1167. lua_pushnil(state);
  1168. }
  1169. return 1;
  1170. }
  1171. lua_pushstring(state, "lua_ImageControl_getCursorRegion - Failed to match the given parameters to a valid function signature.");
  1172. lua_error(state);
  1173. break;
  1174. }
  1175. default:
  1176. {
  1177. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1178. lua_error(state);
  1179. break;
  1180. }
  1181. }
  1182. return 0;
  1183. }
  1184. int lua_ImageControl_getCursorUVs(lua_State* state)
  1185. {
  1186. // Get the number of parameters.
  1187. int paramCount = lua_gettop(state);
  1188. // Attempt to match the parameters to a valid binding.
  1189. switch (paramCount)
  1190. {
  1191. case 2:
  1192. {
  1193. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1194. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1195. {
  1196. // Get parameter 1 off the stack.
  1197. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1198. ImageControl* instance = getInstance(state);
  1199. void* returnPtr = (void*)&(instance->getCursorUVs(param1));
  1200. if (returnPtr)
  1201. {
  1202. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1203. object->instance = returnPtr;
  1204. object->owns = false;
  1205. luaL_getmetatable(state, "ThemeUVs");
  1206. lua_setmetatable(state, -2);
  1207. }
  1208. else
  1209. {
  1210. lua_pushnil(state);
  1211. }
  1212. return 1;
  1213. }
  1214. lua_pushstring(state, "lua_ImageControl_getCursorUVs - Failed to match the given parameters to a valid function signature.");
  1215. lua_error(state);
  1216. break;
  1217. }
  1218. default:
  1219. {
  1220. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1221. lua_error(state);
  1222. break;
  1223. }
  1224. }
  1225. return 0;
  1226. }
  1227. int lua_ImageControl_getFocusIndex(lua_State* state)
  1228. {
  1229. // Get the number of parameters.
  1230. int paramCount = lua_gettop(state);
  1231. // Attempt to match the parameters to a valid binding.
  1232. switch (paramCount)
  1233. {
  1234. case 1:
  1235. {
  1236. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1237. {
  1238. ImageControl* instance = getInstance(state);
  1239. int result = instance->getFocusIndex();
  1240. // Push the return value onto the stack.
  1241. lua_pushinteger(state, result);
  1242. return 1;
  1243. }
  1244. lua_pushstring(state, "lua_ImageControl_getFocusIndex - Failed to match the given parameters to a valid function signature.");
  1245. lua_error(state);
  1246. break;
  1247. }
  1248. default:
  1249. {
  1250. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1251. lua_error(state);
  1252. break;
  1253. }
  1254. }
  1255. return 0;
  1256. }
  1257. int lua_ImageControl_getFont(lua_State* state)
  1258. {
  1259. // Get the number of parameters.
  1260. int paramCount = lua_gettop(state);
  1261. // Attempt to match the parameters to a valid binding.
  1262. switch (paramCount)
  1263. {
  1264. case 1:
  1265. {
  1266. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1267. {
  1268. ImageControl* instance = getInstance(state);
  1269. void* returnPtr = (void*)instance->getFont();
  1270. if (returnPtr)
  1271. {
  1272. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1273. object->instance = returnPtr;
  1274. object->owns = false;
  1275. luaL_getmetatable(state, "Font");
  1276. lua_setmetatable(state, -2);
  1277. }
  1278. else
  1279. {
  1280. lua_pushnil(state);
  1281. }
  1282. return 1;
  1283. }
  1284. lua_pushstring(state, "lua_ImageControl_getFont - Failed to match the given parameters to a valid function signature.");
  1285. lua_error(state);
  1286. break;
  1287. }
  1288. case 2:
  1289. {
  1290. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1291. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1292. {
  1293. // Get parameter 1 off the stack.
  1294. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1295. ImageControl* instance = getInstance(state);
  1296. void* returnPtr = (void*)instance->getFont(param1);
  1297. if (returnPtr)
  1298. {
  1299. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1300. object->instance = returnPtr;
  1301. object->owns = false;
  1302. luaL_getmetatable(state, "Font");
  1303. lua_setmetatable(state, -2);
  1304. }
  1305. else
  1306. {
  1307. lua_pushnil(state);
  1308. }
  1309. return 1;
  1310. }
  1311. lua_pushstring(state, "lua_ImageControl_getFont - Failed to match the given parameters to a valid function signature.");
  1312. lua_error(state);
  1313. break;
  1314. }
  1315. default:
  1316. {
  1317. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1318. lua_error(state);
  1319. break;
  1320. }
  1321. }
  1322. return 0;
  1323. }
  1324. int lua_ImageControl_getFontSize(lua_State* state)
  1325. {
  1326. // Get the number of parameters.
  1327. int paramCount = lua_gettop(state);
  1328. // Attempt to match the parameters to a valid binding.
  1329. switch (paramCount)
  1330. {
  1331. case 1:
  1332. {
  1333. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1334. {
  1335. ImageControl* instance = getInstance(state);
  1336. unsigned int result = instance->getFontSize();
  1337. // Push the return value onto the stack.
  1338. lua_pushunsigned(state, result);
  1339. return 1;
  1340. }
  1341. lua_pushstring(state, "lua_ImageControl_getFontSize - Failed to match the given parameters to a valid function signature.");
  1342. lua_error(state);
  1343. break;
  1344. }
  1345. case 2:
  1346. {
  1347. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1348. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1349. {
  1350. // Get parameter 1 off the stack.
  1351. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1352. ImageControl* instance = getInstance(state);
  1353. unsigned int result = instance->getFontSize(param1);
  1354. // Push the return value onto the stack.
  1355. lua_pushunsigned(state, result);
  1356. return 1;
  1357. }
  1358. lua_pushstring(state, "lua_ImageControl_getFontSize - Failed to match the given parameters to a valid function signature.");
  1359. lua_error(state);
  1360. break;
  1361. }
  1362. default:
  1363. {
  1364. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1365. lua_error(state);
  1366. break;
  1367. }
  1368. }
  1369. return 0;
  1370. }
  1371. int lua_ImageControl_getHeight(lua_State* state)
  1372. {
  1373. // Get the number of parameters.
  1374. int paramCount = lua_gettop(state);
  1375. // Attempt to match the parameters to a valid binding.
  1376. switch (paramCount)
  1377. {
  1378. case 1:
  1379. {
  1380. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1381. {
  1382. ImageControl* instance = getInstance(state);
  1383. float result = instance->getHeight();
  1384. // Push the return value onto the stack.
  1385. lua_pushnumber(state, result);
  1386. return 1;
  1387. }
  1388. lua_pushstring(state, "lua_ImageControl_getHeight - Failed to match the given parameters to a valid function signature.");
  1389. lua_error(state);
  1390. break;
  1391. }
  1392. default:
  1393. {
  1394. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1395. lua_error(state);
  1396. break;
  1397. }
  1398. }
  1399. return 0;
  1400. }
  1401. int lua_ImageControl_getId(lua_State* state)
  1402. {
  1403. // Get the number of parameters.
  1404. int paramCount = lua_gettop(state);
  1405. // Attempt to match the parameters to a valid binding.
  1406. switch (paramCount)
  1407. {
  1408. case 1:
  1409. {
  1410. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1411. {
  1412. ImageControl* instance = getInstance(state);
  1413. const char* result = instance->getId();
  1414. // Push the return value onto the stack.
  1415. lua_pushstring(state, result);
  1416. return 1;
  1417. }
  1418. lua_pushstring(state, "lua_ImageControl_getId - Failed to match the given parameters to a valid function signature.");
  1419. lua_error(state);
  1420. break;
  1421. }
  1422. default:
  1423. {
  1424. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1425. lua_error(state);
  1426. break;
  1427. }
  1428. }
  1429. return 0;
  1430. }
  1431. int lua_ImageControl_getImageColor(lua_State* state)
  1432. {
  1433. // Get the number of parameters.
  1434. int paramCount = lua_gettop(state);
  1435. // Attempt to match the parameters to a valid binding.
  1436. switch (paramCount)
  1437. {
  1438. case 3:
  1439. {
  1440. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1441. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1442. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1443. {
  1444. // Get parameter 1 off the stack.
  1445. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1446. // Get parameter 2 off the stack.
  1447. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1448. ImageControl* instance = getInstance(state);
  1449. void* returnPtr = (void*)&(instance->getImageColor(param1, param2));
  1450. if (returnPtr)
  1451. {
  1452. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1453. object->instance = returnPtr;
  1454. object->owns = false;
  1455. luaL_getmetatable(state, "Vector4");
  1456. lua_setmetatable(state, -2);
  1457. }
  1458. else
  1459. {
  1460. lua_pushnil(state);
  1461. }
  1462. return 1;
  1463. }
  1464. lua_pushstring(state, "lua_ImageControl_getImageColor - Failed to match the given parameters to a valid function signature.");
  1465. lua_error(state);
  1466. break;
  1467. }
  1468. default:
  1469. {
  1470. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1471. lua_error(state);
  1472. break;
  1473. }
  1474. }
  1475. return 0;
  1476. }
  1477. int lua_ImageControl_getImageRegion(lua_State* state)
  1478. {
  1479. // Get the number of parameters.
  1480. int paramCount = lua_gettop(state);
  1481. // Attempt to match the parameters to a valid binding.
  1482. switch (paramCount)
  1483. {
  1484. case 3:
  1485. {
  1486. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1487. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1488. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1489. {
  1490. // Get parameter 1 off the stack.
  1491. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1492. // Get parameter 2 off the stack.
  1493. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1494. ImageControl* instance = getInstance(state);
  1495. void* returnPtr = (void*)&(instance->getImageRegion(param1, param2));
  1496. if (returnPtr)
  1497. {
  1498. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1499. object->instance = returnPtr;
  1500. object->owns = false;
  1501. luaL_getmetatable(state, "Rectangle");
  1502. lua_setmetatable(state, -2);
  1503. }
  1504. else
  1505. {
  1506. lua_pushnil(state);
  1507. }
  1508. return 1;
  1509. }
  1510. lua_pushstring(state, "lua_ImageControl_getImageRegion - Failed to match the given parameters to a valid function signature.");
  1511. lua_error(state);
  1512. break;
  1513. }
  1514. default:
  1515. {
  1516. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1517. lua_error(state);
  1518. break;
  1519. }
  1520. }
  1521. return 0;
  1522. }
  1523. int lua_ImageControl_getImageUVs(lua_State* state)
  1524. {
  1525. // Get the number of parameters.
  1526. int paramCount = lua_gettop(state);
  1527. // Attempt to match the parameters to a valid binding.
  1528. switch (paramCount)
  1529. {
  1530. case 3:
  1531. {
  1532. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1533. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1534. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1535. {
  1536. // Get parameter 1 off the stack.
  1537. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1538. // Get parameter 2 off the stack.
  1539. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1540. ImageControl* instance = getInstance(state);
  1541. void* returnPtr = (void*)&(instance->getImageUVs(param1, param2));
  1542. if (returnPtr)
  1543. {
  1544. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1545. object->instance = returnPtr;
  1546. object->owns = false;
  1547. luaL_getmetatable(state, "ThemeUVs");
  1548. lua_setmetatable(state, -2);
  1549. }
  1550. else
  1551. {
  1552. lua_pushnil(state);
  1553. }
  1554. return 1;
  1555. }
  1556. lua_pushstring(state, "lua_ImageControl_getImageUVs - Failed to match the given parameters to a valid function signature.");
  1557. lua_error(state);
  1558. break;
  1559. }
  1560. default:
  1561. {
  1562. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1563. lua_error(state);
  1564. break;
  1565. }
  1566. }
  1567. return 0;
  1568. }
  1569. int lua_ImageControl_getMargin(lua_State* state)
  1570. {
  1571. // Get the number of parameters.
  1572. int paramCount = lua_gettop(state);
  1573. // Attempt to match the parameters to a valid binding.
  1574. switch (paramCount)
  1575. {
  1576. case 1:
  1577. {
  1578. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1579. {
  1580. ImageControl* instance = getInstance(state);
  1581. void* returnPtr = (void*)&(instance->getMargin());
  1582. if (returnPtr)
  1583. {
  1584. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1585. object->instance = returnPtr;
  1586. object->owns = false;
  1587. luaL_getmetatable(state, "ThemeSideRegions");
  1588. lua_setmetatable(state, -2);
  1589. }
  1590. else
  1591. {
  1592. lua_pushnil(state);
  1593. }
  1594. return 1;
  1595. }
  1596. lua_pushstring(state, "lua_ImageControl_getMargin - Failed to match the given parameters to a valid function signature.");
  1597. lua_error(state);
  1598. break;
  1599. }
  1600. default:
  1601. {
  1602. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1603. lua_error(state);
  1604. break;
  1605. }
  1606. }
  1607. return 0;
  1608. }
  1609. int lua_ImageControl_getOpacity(lua_State* state)
  1610. {
  1611. // Get the number of parameters.
  1612. int paramCount = lua_gettop(state);
  1613. // Attempt to match the parameters to a valid binding.
  1614. switch (paramCount)
  1615. {
  1616. case 1:
  1617. {
  1618. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1619. {
  1620. ImageControl* instance = getInstance(state);
  1621. float result = instance->getOpacity();
  1622. // Push the return value onto the stack.
  1623. lua_pushnumber(state, result);
  1624. return 1;
  1625. }
  1626. lua_pushstring(state, "lua_ImageControl_getOpacity - Failed to match the given parameters to a valid function signature.");
  1627. lua_error(state);
  1628. break;
  1629. }
  1630. case 2:
  1631. {
  1632. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1633. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1634. {
  1635. // Get parameter 1 off the stack.
  1636. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1637. ImageControl* instance = getInstance(state);
  1638. float result = instance->getOpacity(param1);
  1639. // Push the return value onto the stack.
  1640. lua_pushnumber(state, result);
  1641. return 1;
  1642. }
  1643. lua_pushstring(state, "lua_ImageControl_getOpacity - Failed to match the given parameters to a valid function signature.");
  1644. lua_error(state);
  1645. break;
  1646. }
  1647. default:
  1648. {
  1649. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1650. lua_error(state);
  1651. break;
  1652. }
  1653. }
  1654. return 0;
  1655. }
  1656. int lua_ImageControl_getPadding(lua_State* state)
  1657. {
  1658. // Get the number of parameters.
  1659. int paramCount = lua_gettop(state);
  1660. // Attempt to match the parameters to a valid binding.
  1661. switch (paramCount)
  1662. {
  1663. case 1:
  1664. {
  1665. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1666. {
  1667. ImageControl* instance = getInstance(state);
  1668. void* returnPtr = (void*)&(instance->getPadding());
  1669. if (returnPtr)
  1670. {
  1671. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1672. object->instance = returnPtr;
  1673. object->owns = false;
  1674. luaL_getmetatable(state, "ThemeSideRegions");
  1675. lua_setmetatable(state, -2);
  1676. }
  1677. else
  1678. {
  1679. lua_pushnil(state);
  1680. }
  1681. return 1;
  1682. }
  1683. lua_pushstring(state, "lua_ImageControl_getPadding - Failed to match the given parameters to a valid function signature.");
  1684. lua_error(state);
  1685. break;
  1686. }
  1687. default:
  1688. {
  1689. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1690. lua_error(state);
  1691. break;
  1692. }
  1693. }
  1694. return 0;
  1695. }
  1696. int lua_ImageControl_getRefCount(lua_State* state)
  1697. {
  1698. // Get the number of parameters.
  1699. int paramCount = lua_gettop(state);
  1700. // Attempt to match the parameters to a valid binding.
  1701. switch (paramCount)
  1702. {
  1703. case 1:
  1704. {
  1705. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1706. {
  1707. ImageControl* instance = getInstance(state);
  1708. unsigned int result = instance->getRefCount();
  1709. // Push the return value onto the stack.
  1710. lua_pushunsigned(state, result);
  1711. return 1;
  1712. }
  1713. lua_pushstring(state, "lua_ImageControl_getRefCount - Failed to match the given parameters to a valid function signature.");
  1714. lua_error(state);
  1715. break;
  1716. }
  1717. default:
  1718. {
  1719. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1720. lua_error(state);
  1721. break;
  1722. }
  1723. }
  1724. return 0;
  1725. }
  1726. int lua_ImageControl_getRegionDst(lua_State* state)
  1727. {
  1728. // Get the number of parameters.
  1729. int paramCount = lua_gettop(state);
  1730. // Attempt to match the parameters to a valid binding.
  1731. switch (paramCount)
  1732. {
  1733. case 1:
  1734. {
  1735. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1736. {
  1737. ImageControl* instance = getInstance(state);
  1738. void* returnPtr = (void*)&(instance->getRegionDst());
  1739. if (returnPtr)
  1740. {
  1741. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1742. object->instance = returnPtr;
  1743. object->owns = false;
  1744. luaL_getmetatable(state, "Rectangle");
  1745. lua_setmetatable(state, -2);
  1746. }
  1747. else
  1748. {
  1749. lua_pushnil(state);
  1750. }
  1751. return 1;
  1752. }
  1753. lua_pushstring(state, "lua_ImageControl_getRegionDst - Failed to match the given parameters to a valid function signature.");
  1754. lua_error(state);
  1755. break;
  1756. }
  1757. default:
  1758. {
  1759. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1760. lua_error(state);
  1761. break;
  1762. }
  1763. }
  1764. return 0;
  1765. }
  1766. int lua_ImageControl_getRegionSrc(lua_State* state)
  1767. {
  1768. // Get the number of parameters.
  1769. int paramCount = lua_gettop(state);
  1770. // Attempt to match the parameters to a valid binding.
  1771. switch (paramCount)
  1772. {
  1773. case 1:
  1774. {
  1775. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1776. {
  1777. ImageControl* instance = getInstance(state);
  1778. void* returnPtr = (void*)&(instance->getRegionSrc());
  1779. if (returnPtr)
  1780. {
  1781. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1782. object->instance = returnPtr;
  1783. object->owns = false;
  1784. luaL_getmetatable(state, "Rectangle");
  1785. lua_setmetatable(state, -2);
  1786. }
  1787. else
  1788. {
  1789. lua_pushnil(state);
  1790. }
  1791. return 1;
  1792. }
  1793. lua_pushstring(state, "lua_ImageControl_getRegionSrc - Failed to match the given parameters to a valid function signature.");
  1794. lua_error(state);
  1795. break;
  1796. }
  1797. default:
  1798. {
  1799. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1800. lua_error(state);
  1801. break;
  1802. }
  1803. }
  1804. return 0;
  1805. }
  1806. int lua_ImageControl_getSkinColor(lua_State* state)
  1807. {
  1808. // Get the number of parameters.
  1809. int paramCount = lua_gettop(state);
  1810. // Attempt to match the parameters to a valid binding.
  1811. switch (paramCount)
  1812. {
  1813. case 1:
  1814. {
  1815. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1816. {
  1817. ImageControl* instance = getInstance(state);
  1818. void* returnPtr = (void*)&(instance->getSkinColor());
  1819. if (returnPtr)
  1820. {
  1821. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1822. object->instance = returnPtr;
  1823. object->owns = false;
  1824. luaL_getmetatable(state, "Vector4");
  1825. lua_setmetatable(state, -2);
  1826. }
  1827. else
  1828. {
  1829. lua_pushnil(state);
  1830. }
  1831. return 1;
  1832. }
  1833. lua_pushstring(state, "lua_ImageControl_getSkinColor - Failed to match the given parameters to a valid function signature.");
  1834. lua_error(state);
  1835. break;
  1836. }
  1837. case 2:
  1838. {
  1839. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1840. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1841. {
  1842. // Get parameter 1 off the stack.
  1843. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1844. ImageControl* instance = getInstance(state);
  1845. void* returnPtr = (void*)&(instance->getSkinColor(param1));
  1846. if (returnPtr)
  1847. {
  1848. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1849. object->instance = returnPtr;
  1850. object->owns = false;
  1851. luaL_getmetatable(state, "Vector4");
  1852. lua_setmetatable(state, -2);
  1853. }
  1854. else
  1855. {
  1856. lua_pushnil(state);
  1857. }
  1858. return 1;
  1859. }
  1860. lua_pushstring(state, "lua_ImageControl_getSkinColor - Failed to match the given parameters to a valid function signature.");
  1861. lua_error(state);
  1862. break;
  1863. }
  1864. default:
  1865. {
  1866. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1867. lua_error(state);
  1868. break;
  1869. }
  1870. }
  1871. return 0;
  1872. }
  1873. int lua_ImageControl_getSkinRegion(lua_State* state)
  1874. {
  1875. // Get the number of parameters.
  1876. int paramCount = lua_gettop(state);
  1877. // Attempt to match the parameters to a valid binding.
  1878. switch (paramCount)
  1879. {
  1880. case 1:
  1881. {
  1882. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1883. {
  1884. ImageControl* instance = getInstance(state);
  1885. void* returnPtr = (void*)&(instance->getSkinRegion());
  1886. if (returnPtr)
  1887. {
  1888. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1889. object->instance = returnPtr;
  1890. object->owns = false;
  1891. luaL_getmetatable(state, "Rectangle");
  1892. lua_setmetatable(state, -2);
  1893. }
  1894. else
  1895. {
  1896. lua_pushnil(state);
  1897. }
  1898. return 1;
  1899. }
  1900. lua_pushstring(state, "lua_ImageControl_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  1901. lua_error(state);
  1902. break;
  1903. }
  1904. case 2:
  1905. {
  1906. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1907. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1908. {
  1909. // Get parameter 1 off the stack.
  1910. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1911. ImageControl* instance = getInstance(state);
  1912. void* returnPtr = (void*)&(instance->getSkinRegion(param1));
  1913. if (returnPtr)
  1914. {
  1915. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1916. object->instance = returnPtr;
  1917. object->owns = false;
  1918. luaL_getmetatable(state, "Rectangle");
  1919. lua_setmetatable(state, -2);
  1920. }
  1921. else
  1922. {
  1923. lua_pushnil(state);
  1924. }
  1925. return 1;
  1926. }
  1927. lua_pushstring(state, "lua_ImageControl_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  1928. lua_error(state);
  1929. break;
  1930. }
  1931. default:
  1932. {
  1933. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1934. lua_error(state);
  1935. break;
  1936. }
  1937. }
  1938. return 0;
  1939. }
  1940. int lua_ImageControl_getState(lua_State* state)
  1941. {
  1942. // Get the number of parameters.
  1943. int paramCount = lua_gettop(state);
  1944. // Attempt to match the parameters to a valid binding.
  1945. switch (paramCount)
  1946. {
  1947. case 1:
  1948. {
  1949. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1950. {
  1951. ImageControl* instance = getInstance(state);
  1952. Control::State result = instance->getState();
  1953. // Push the return value onto the stack.
  1954. lua_pushstring(state, lua_stringFromEnum_ControlState(result));
  1955. return 1;
  1956. }
  1957. lua_pushstring(state, "lua_ImageControl_getState - Failed to match the given parameters to a valid function signature.");
  1958. lua_error(state);
  1959. break;
  1960. }
  1961. default:
  1962. {
  1963. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1964. lua_error(state);
  1965. break;
  1966. }
  1967. }
  1968. return 0;
  1969. }
  1970. int lua_ImageControl_getStyle(lua_State* state)
  1971. {
  1972. // Get the number of parameters.
  1973. int paramCount = lua_gettop(state);
  1974. // Attempt to match the parameters to a valid binding.
  1975. switch (paramCount)
  1976. {
  1977. case 1:
  1978. {
  1979. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1980. {
  1981. ImageControl* instance = getInstance(state);
  1982. void* returnPtr = (void*)instance->getStyle();
  1983. if (returnPtr)
  1984. {
  1985. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1986. object->instance = returnPtr;
  1987. object->owns = false;
  1988. luaL_getmetatable(state, "ThemeStyle");
  1989. lua_setmetatable(state, -2);
  1990. }
  1991. else
  1992. {
  1993. lua_pushnil(state);
  1994. }
  1995. return 1;
  1996. }
  1997. lua_pushstring(state, "lua_ImageControl_getStyle - Failed to match the given parameters to a valid function signature.");
  1998. lua_error(state);
  1999. break;
  2000. }
  2001. default:
  2002. {
  2003. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2004. lua_error(state);
  2005. break;
  2006. }
  2007. }
  2008. return 0;
  2009. }
  2010. int lua_ImageControl_getText(lua_State* state)
  2011. {
  2012. // Get the number of parameters.
  2013. int paramCount = lua_gettop(state);
  2014. // Attempt to match the parameters to a valid binding.
  2015. switch (paramCount)
  2016. {
  2017. case 1:
  2018. {
  2019. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2020. {
  2021. ImageControl* instance = getInstance(state);
  2022. const char* result = instance->getText();
  2023. // Push the return value onto the stack.
  2024. lua_pushstring(state, result);
  2025. return 1;
  2026. }
  2027. lua_pushstring(state, "lua_ImageControl_getText - Failed to match the given parameters to a valid function signature.");
  2028. lua_error(state);
  2029. break;
  2030. }
  2031. default:
  2032. {
  2033. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2034. lua_error(state);
  2035. break;
  2036. }
  2037. }
  2038. return 0;
  2039. }
  2040. int lua_ImageControl_getTextAlignment(lua_State* state)
  2041. {
  2042. // Get the number of parameters.
  2043. int paramCount = lua_gettop(state);
  2044. // Attempt to match the parameters to a valid binding.
  2045. switch (paramCount)
  2046. {
  2047. case 1:
  2048. {
  2049. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2050. {
  2051. ImageControl* instance = getInstance(state);
  2052. Font::Justify result = instance->getTextAlignment();
  2053. // Push the return value onto the stack.
  2054. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2055. return 1;
  2056. }
  2057. lua_pushstring(state, "lua_ImageControl_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2058. lua_error(state);
  2059. break;
  2060. }
  2061. case 2:
  2062. {
  2063. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2064. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2065. {
  2066. // Get parameter 1 off the stack.
  2067. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2068. ImageControl* instance = getInstance(state);
  2069. Font::Justify result = instance->getTextAlignment(param1);
  2070. // Push the return value onto the stack.
  2071. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2072. return 1;
  2073. }
  2074. lua_pushstring(state, "lua_ImageControl_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2075. lua_error(state);
  2076. break;
  2077. }
  2078. default:
  2079. {
  2080. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2081. lua_error(state);
  2082. break;
  2083. }
  2084. }
  2085. return 0;
  2086. }
  2087. int lua_ImageControl_getTextColor(lua_State* state)
  2088. {
  2089. // Get the number of parameters.
  2090. int paramCount = lua_gettop(state);
  2091. // Attempt to match the parameters to a valid binding.
  2092. switch (paramCount)
  2093. {
  2094. case 1:
  2095. {
  2096. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2097. {
  2098. ImageControl* instance = getInstance(state);
  2099. void* returnPtr = (void*)&(instance->getTextColor());
  2100. if (returnPtr)
  2101. {
  2102. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2103. object->instance = returnPtr;
  2104. object->owns = false;
  2105. luaL_getmetatable(state, "Vector4");
  2106. lua_setmetatable(state, -2);
  2107. }
  2108. else
  2109. {
  2110. lua_pushnil(state);
  2111. }
  2112. return 1;
  2113. }
  2114. lua_pushstring(state, "lua_ImageControl_getTextColor - Failed to match the given parameters to a valid function signature.");
  2115. lua_error(state);
  2116. break;
  2117. }
  2118. case 2:
  2119. {
  2120. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2121. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2122. {
  2123. // Get parameter 1 off the stack.
  2124. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2125. ImageControl* instance = getInstance(state);
  2126. void* returnPtr = (void*)&(instance->getTextColor(param1));
  2127. if (returnPtr)
  2128. {
  2129. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2130. object->instance = returnPtr;
  2131. object->owns = false;
  2132. luaL_getmetatable(state, "Vector4");
  2133. lua_setmetatable(state, -2);
  2134. }
  2135. else
  2136. {
  2137. lua_pushnil(state);
  2138. }
  2139. return 1;
  2140. }
  2141. lua_pushstring(state, "lua_ImageControl_getTextColor - Failed to match the given parameters to a valid function signature.");
  2142. lua_error(state);
  2143. break;
  2144. }
  2145. default:
  2146. {
  2147. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2148. lua_error(state);
  2149. break;
  2150. }
  2151. }
  2152. return 0;
  2153. }
  2154. int lua_ImageControl_getTextRightToLeft(lua_State* state)
  2155. {
  2156. // Get the number of parameters.
  2157. int paramCount = lua_gettop(state);
  2158. // Attempt to match the parameters to a valid binding.
  2159. switch (paramCount)
  2160. {
  2161. case 1:
  2162. {
  2163. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2164. {
  2165. ImageControl* instance = getInstance(state);
  2166. bool result = instance->getTextRightToLeft();
  2167. // Push the return value onto the stack.
  2168. lua_pushboolean(state, result);
  2169. return 1;
  2170. }
  2171. lua_pushstring(state, "lua_ImageControl_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2172. lua_error(state);
  2173. break;
  2174. }
  2175. case 2:
  2176. {
  2177. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2178. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2179. {
  2180. // Get parameter 1 off the stack.
  2181. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2182. ImageControl* instance = getInstance(state);
  2183. bool result = instance->getTextRightToLeft(param1);
  2184. // Push the return value onto the stack.
  2185. lua_pushboolean(state, result);
  2186. return 1;
  2187. }
  2188. lua_pushstring(state, "lua_ImageControl_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2189. lua_error(state);
  2190. break;
  2191. }
  2192. default:
  2193. {
  2194. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2195. lua_error(state);
  2196. break;
  2197. }
  2198. }
  2199. return 0;
  2200. }
  2201. int lua_ImageControl_getType(lua_State* state)
  2202. {
  2203. // Get the number of parameters.
  2204. int paramCount = lua_gettop(state);
  2205. // Attempt to match the parameters to a valid binding.
  2206. switch (paramCount)
  2207. {
  2208. case 1:
  2209. {
  2210. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2211. {
  2212. ImageControl* instance = getInstance(state);
  2213. const char* result = instance->getType();
  2214. // Push the return value onto the stack.
  2215. lua_pushstring(state, result);
  2216. return 1;
  2217. }
  2218. lua_pushstring(state, "lua_ImageControl_getType - Failed to match the given parameters to a valid function signature.");
  2219. lua_error(state);
  2220. break;
  2221. }
  2222. default:
  2223. {
  2224. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2225. lua_error(state);
  2226. break;
  2227. }
  2228. }
  2229. return 0;
  2230. }
  2231. int lua_ImageControl_getWidth(lua_State* state)
  2232. {
  2233. // Get the number of parameters.
  2234. int paramCount = lua_gettop(state);
  2235. // Attempt to match the parameters to a valid binding.
  2236. switch (paramCount)
  2237. {
  2238. case 1:
  2239. {
  2240. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2241. {
  2242. ImageControl* instance = getInstance(state);
  2243. float result = instance->getWidth();
  2244. // Push the return value onto the stack.
  2245. lua_pushnumber(state, result);
  2246. return 1;
  2247. }
  2248. lua_pushstring(state, "lua_ImageControl_getWidth - Failed to match the given parameters to a valid function signature.");
  2249. lua_error(state);
  2250. break;
  2251. }
  2252. default:
  2253. {
  2254. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2255. lua_error(state);
  2256. break;
  2257. }
  2258. }
  2259. return 0;
  2260. }
  2261. int lua_ImageControl_getX(lua_State* state)
  2262. {
  2263. // Get the number of parameters.
  2264. int paramCount = lua_gettop(state);
  2265. // Attempt to match the parameters to a valid binding.
  2266. switch (paramCount)
  2267. {
  2268. case 1:
  2269. {
  2270. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2271. {
  2272. ImageControl* instance = getInstance(state);
  2273. float result = instance->getX();
  2274. // Push the return value onto the stack.
  2275. lua_pushnumber(state, result);
  2276. return 1;
  2277. }
  2278. lua_pushstring(state, "lua_ImageControl_getX - Failed to match the given parameters to a valid function signature.");
  2279. lua_error(state);
  2280. break;
  2281. }
  2282. default:
  2283. {
  2284. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2285. lua_error(state);
  2286. break;
  2287. }
  2288. }
  2289. return 0;
  2290. }
  2291. int lua_ImageControl_getY(lua_State* state)
  2292. {
  2293. // Get the number of parameters.
  2294. int paramCount = lua_gettop(state);
  2295. // Attempt to match the parameters to a valid binding.
  2296. switch (paramCount)
  2297. {
  2298. case 1:
  2299. {
  2300. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2301. {
  2302. ImageControl* instance = getInstance(state);
  2303. float result = instance->getY();
  2304. // Push the return value onto the stack.
  2305. lua_pushnumber(state, result);
  2306. return 1;
  2307. }
  2308. lua_pushstring(state, "lua_ImageControl_getY - Failed to match the given parameters to a valid function signature.");
  2309. lua_error(state);
  2310. break;
  2311. }
  2312. default:
  2313. {
  2314. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2315. lua_error(state);
  2316. break;
  2317. }
  2318. }
  2319. return 0;
  2320. }
  2321. int lua_ImageControl_getZIndex(lua_State* state)
  2322. {
  2323. // Get the number of parameters.
  2324. int paramCount = lua_gettop(state);
  2325. // Attempt to match the parameters to a valid binding.
  2326. switch (paramCount)
  2327. {
  2328. case 1:
  2329. {
  2330. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2331. {
  2332. ImageControl* instance = getInstance(state);
  2333. int result = instance->getZIndex();
  2334. // Push the return value onto the stack.
  2335. lua_pushinteger(state, result);
  2336. return 1;
  2337. }
  2338. lua_pushstring(state, "lua_ImageControl_getZIndex - Failed to match the given parameters to a valid function signature.");
  2339. lua_error(state);
  2340. break;
  2341. }
  2342. default:
  2343. {
  2344. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2345. lua_error(state);
  2346. break;
  2347. }
  2348. }
  2349. return 0;
  2350. }
  2351. int lua_ImageControl_isContainer(lua_State* state)
  2352. {
  2353. // Get the number of parameters.
  2354. int paramCount = lua_gettop(state);
  2355. // Attempt to match the parameters to a valid binding.
  2356. switch (paramCount)
  2357. {
  2358. case 1:
  2359. {
  2360. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2361. {
  2362. ImageControl* instance = getInstance(state);
  2363. bool result = instance->isContainer();
  2364. // Push the return value onto the stack.
  2365. lua_pushboolean(state, result);
  2366. return 1;
  2367. }
  2368. lua_pushstring(state, "lua_ImageControl_isContainer - Failed to match the given parameters to a valid function signature.");
  2369. lua_error(state);
  2370. break;
  2371. }
  2372. default:
  2373. {
  2374. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2375. lua_error(state);
  2376. break;
  2377. }
  2378. }
  2379. return 0;
  2380. }
  2381. int lua_ImageControl_isEnabled(lua_State* state)
  2382. {
  2383. // Get the number of parameters.
  2384. int paramCount = lua_gettop(state);
  2385. // Attempt to match the parameters to a valid binding.
  2386. switch (paramCount)
  2387. {
  2388. case 1:
  2389. {
  2390. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2391. {
  2392. ImageControl* instance = getInstance(state);
  2393. bool result = instance->isEnabled();
  2394. // Push the return value onto the stack.
  2395. lua_pushboolean(state, result);
  2396. return 1;
  2397. }
  2398. lua_pushstring(state, "lua_ImageControl_isEnabled - Failed to match the given parameters to a valid function signature.");
  2399. lua_error(state);
  2400. break;
  2401. }
  2402. default:
  2403. {
  2404. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2405. lua_error(state);
  2406. break;
  2407. }
  2408. }
  2409. return 0;
  2410. }
  2411. int lua_ImageControl_isVisible(lua_State* state)
  2412. {
  2413. // Get the number of parameters.
  2414. int paramCount = lua_gettop(state);
  2415. // Attempt to match the parameters to a valid binding.
  2416. switch (paramCount)
  2417. {
  2418. case 1:
  2419. {
  2420. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2421. {
  2422. ImageControl* instance = getInstance(state);
  2423. bool result = instance->isVisible();
  2424. // Push the return value onto the stack.
  2425. lua_pushboolean(state, result);
  2426. return 1;
  2427. }
  2428. lua_pushstring(state, "lua_ImageControl_isVisible - Failed to match the given parameters to a valid function signature.");
  2429. lua_error(state);
  2430. break;
  2431. }
  2432. default:
  2433. {
  2434. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2435. lua_error(state);
  2436. break;
  2437. }
  2438. }
  2439. return 0;
  2440. }
  2441. int lua_ImageControl_release(lua_State* state)
  2442. {
  2443. // Get the number of parameters.
  2444. int paramCount = lua_gettop(state);
  2445. // Attempt to match the parameters to a valid binding.
  2446. switch (paramCount)
  2447. {
  2448. case 1:
  2449. {
  2450. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2451. {
  2452. ImageControl* instance = getInstance(state);
  2453. instance->release();
  2454. return 0;
  2455. }
  2456. lua_pushstring(state, "lua_ImageControl_release - Failed to match the given parameters to a valid function signature.");
  2457. lua_error(state);
  2458. break;
  2459. }
  2460. default:
  2461. {
  2462. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2463. lua_error(state);
  2464. break;
  2465. }
  2466. }
  2467. return 0;
  2468. }
  2469. int lua_ImageControl_removeListener(lua_State* state)
  2470. {
  2471. // Get the number of parameters.
  2472. int paramCount = lua_gettop(state);
  2473. // Attempt to match the parameters to a valid binding.
  2474. switch (paramCount)
  2475. {
  2476. case 2:
  2477. {
  2478. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2479. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2480. {
  2481. // Get parameter 1 off the stack.
  2482. bool param1Valid;
  2483. gameplay::ScriptUtil::LuaArray<Control::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false, &param1Valid);
  2484. if (!param1Valid)
  2485. {
  2486. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control::Listener'.");
  2487. lua_error(state);
  2488. }
  2489. ImageControl* instance = getInstance(state);
  2490. instance->removeListener(param1);
  2491. return 0;
  2492. }
  2493. lua_pushstring(state, "lua_ImageControl_removeListener - Failed to match the given parameters to a valid function signature.");
  2494. lua_error(state);
  2495. break;
  2496. }
  2497. default:
  2498. {
  2499. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2500. lua_error(state);
  2501. break;
  2502. }
  2503. }
  2504. return 0;
  2505. }
  2506. int lua_ImageControl_removeScriptCallback(lua_State* state)
  2507. {
  2508. // Get the number of parameters.
  2509. int paramCount = lua_gettop(state);
  2510. // Attempt to match the parameters to a valid binding.
  2511. switch (paramCount)
  2512. {
  2513. case 3:
  2514. {
  2515. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2516. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  2517. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  2518. {
  2519. // Get parameter 1 off the stack.
  2520. std::string param1 = gameplay::ScriptUtil::getString(2, true);
  2521. // Get parameter 2 off the stack.
  2522. std::string param2 = gameplay::ScriptUtil::getString(3, true);
  2523. ImageControl* instance = getInstance(state);
  2524. instance->removeScriptCallback(param1, param2);
  2525. return 0;
  2526. }
  2527. lua_pushstring(state, "lua_ImageControl_removeScriptCallback - Failed to match the given parameters to a valid function signature.");
  2528. lua_error(state);
  2529. break;
  2530. }
  2531. default:
  2532. {
  2533. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2534. lua_error(state);
  2535. break;
  2536. }
  2537. }
  2538. return 0;
  2539. }
  2540. int lua_ImageControl_setAlignment(lua_State* state)
  2541. {
  2542. // Get the number of parameters.
  2543. int paramCount = lua_gettop(state);
  2544. // Attempt to match the parameters to a valid binding.
  2545. switch (paramCount)
  2546. {
  2547. case 2:
  2548. {
  2549. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2550. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2551. {
  2552. // Get parameter 1 off the stack.
  2553. Control::Alignment param1 = (Control::Alignment)lua_enumFromString_ControlAlignment(luaL_checkstring(state, 2));
  2554. ImageControl* instance = getInstance(state);
  2555. instance->setAlignment(param1);
  2556. return 0;
  2557. }
  2558. lua_pushstring(state, "lua_ImageControl_setAlignment - Failed to match the given parameters to a valid function signature.");
  2559. lua_error(state);
  2560. break;
  2561. }
  2562. default:
  2563. {
  2564. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2565. lua_error(state);
  2566. break;
  2567. }
  2568. }
  2569. return 0;
  2570. }
  2571. int lua_ImageControl_setAnimationPropertyValue(lua_State* state)
  2572. {
  2573. // Get the number of parameters.
  2574. int paramCount = lua_gettop(state);
  2575. // Attempt to match the parameters to a valid binding.
  2576. switch (paramCount)
  2577. {
  2578. case 3:
  2579. {
  2580. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2581. lua_type(state, 2) == LUA_TNUMBER &&
  2582. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  2583. {
  2584. // Get parameter 1 off the stack.
  2585. int param1 = (int)luaL_checkint(state, 2);
  2586. // Get parameter 2 off the stack.
  2587. bool param2Valid;
  2588. gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
  2589. if (!param2Valid)
  2590. {
  2591. lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
  2592. lua_error(state);
  2593. }
  2594. ImageControl* instance = getInstance(state);
  2595. instance->setAnimationPropertyValue(param1, param2);
  2596. return 0;
  2597. }
  2598. lua_pushstring(state, "lua_ImageControl_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  2599. lua_error(state);
  2600. break;
  2601. }
  2602. case 4:
  2603. {
  2604. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2605. lua_type(state, 2) == LUA_TNUMBER &&
  2606. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL) &&
  2607. lua_type(state, 4) == LUA_TNUMBER)
  2608. {
  2609. // Get parameter 1 off the stack.
  2610. int param1 = (int)luaL_checkint(state, 2);
  2611. // Get parameter 2 off the stack.
  2612. bool param2Valid;
  2613. gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
  2614. if (!param2Valid)
  2615. {
  2616. lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
  2617. lua_error(state);
  2618. }
  2619. // Get parameter 3 off the stack.
  2620. float param3 = (float)luaL_checknumber(state, 4);
  2621. ImageControl* instance = getInstance(state);
  2622. instance->setAnimationPropertyValue(param1, param2, param3);
  2623. return 0;
  2624. }
  2625. lua_pushstring(state, "lua_ImageControl_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  2626. lua_error(state);
  2627. break;
  2628. }
  2629. default:
  2630. {
  2631. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  2632. lua_error(state);
  2633. break;
  2634. }
  2635. }
  2636. return 0;
  2637. }
  2638. int lua_ImageControl_setAutoHeight(lua_State* state)
  2639. {
  2640. // Get the number of parameters.
  2641. int paramCount = lua_gettop(state);
  2642. // Attempt to match the parameters to a valid binding.
  2643. switch (paramCount)
  2644. {
  2645. case 2:
  2646. {
  2647. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2648. lua_type(state, 2) == LUA_TBOOLEAN)
  2649. {
  2650. // Get parameter 1 off the stack.
  2651. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  2652. ImageControl* instance = getInstance(state);
  2653. instance->setAutoHeight(param1);
  2654. return 0;
  2655. }
  2656. lua_pushstring(state, "lua_ImageControl_setAutoHeight - Failed to match the given parameters to a valid function signature.");
  2657. lua_error(state);
  2658. break;
  2659. }
  2660. default:
  2661. {
  2662. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2663. lua_error(state);
  2664. break;
  2665. }
  2666. }
  2667. return 0;
  2668. }
  2669. int lua_ImageControl_setAutoWidth(lua_State* state)
  2670. {
  2671. // Get the number of parameters.
  2672. int paramCount = lua_gettop(state);
  2673. // Attempt to match the parameters to a valid binding.
  2674. switch (paramCount)
  2675. {
  2676. case 2:
  2677. {
  2678. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2679. lua_type(state, 2) == LUA_TBOOLEAN)
  2680. {
  2681. // Get parameter 1 off the stack.
  2682. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  2683. ImageControl* instance = getInstance(state);
  2684. instance->setAutoWidth(param1);
  2685. return 0;
  2686. }
  2687. lua_pushstring(state, "lua_ImageControl_setAutoWidth - Failed to match the given parameters to a valid function signature.");
  2688. lua_error(state);
  2689. break;
  2690. }
  2691. default:
  2692. {
  2693. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2694. lua_error(state);
  2695. break;
  2696. }
  2697. }
  2698. return 0;
  2699. }
  2700. int lua_ImageControl_setBorder(lua_State* state)
  2701. {
  2702. // Get the number of parameters.
  2703. int paramCount = lua_gettop(state);
  2704. // Attempt to match the parameters to a valid binding.
  2705. switch (paramCount)
  2706. {
  2707. case 5:
  2708. {
  2709. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2710. lua_type(state, 2) == LUA_TNUMBER &&
  2711. lua_type(state, 3) == LUA_TNUMBER &&
  2712. lua_type(state, 4) == LUA_TNUMBER &&
  2713. lua_type(state, 5) == LUA_TNUMBER)
  2714. {
  2715. // Get parameter 1 off the stack.
  2716. float param1 = (float)luaL_checknumber(state, 2);
  2717. // Get parameter 2 off the stack.
  2718. float param2 = (float)luaL_checknumber(state, 3);
  2719. // Get parameter 3 off the stack.
  2720. float param3 = (float)luaL_checknumber(state, 4);
  2721. // Get parameter 4 off the stack.
  2722. float param4 = (float)luaL_checknumber(state, 5);
  2723. ImageControl* instance = getInstance(state);
  2724. instance->setBorder(param1, param2, param3, param4);
  2725. return 0;
  2726. }
  2727. lua_pushstring(state, "lua_ImageControl_setBorder - Failed to match the given parameters to a valid function signature.");
  2728. lua_error(state);
  2729. break;
  2730. }
  2731. case 6:
  2732. {
  2733. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2734. lua_type(state, 2) == LUA_TNUMBER &&
  2735. lua_type(state, 3) == LUA_TNUMBER &&
  2736. lua_type(state, 4) == LUA_TNUMBER &&
  2737. lua_type(state, 5) == LUA_TNUMBER &&
  2738. lua_type(state, 6) == LUA_TNUMBER)
  2739. {
  2740. // Get parameter 1 off the stack.
  2741. float param1 = (float)luaL_checknumber(state, 2);
  2742. // Get parameter 2 off the stack.
  2743. float param2 = (float)luaL_checknumber(state, 3);
  2744. // Get parameter 3 off the stack.
  2745. float param3 = (float)luaL_checknumber(state, 4);
  2746. // Get parameter 4 off the stack.
  2747. float param4 = (float)luaL_checknumber(state, 5);
  2748. // Get parameter 5 off the stack.
  2749. unsigned char param5 = (unsigned char)luaL_checkunsigned(state, 6);
  2750. ImageControl* instance = getInstance(state);
  2751. instance->setBorder(param1, param2, param3, param4, param5);
  2752. return 0;
  2753. }
  2754. lua_pushstring(state, "lua_ImageControl_setBorder - Failed to match the given parameters to a valid function signature.");
  2755. lua_error(state);
  2756. break;
  2757. }
  2758. default:
  2759. {
  2760. lua_pushstring(state, "Invalid number of parameters (expected 5 or 6).");
  2761. lua_error(state);
  2762. break;
  2763. }
  2764. }
  2765. return 0;
  2766. }
  2767. int lua_ImageControl_setBounds(lua_State* state)
  2768. {
  2769. // Get the number of parameters.
  2770. int paramCount = lua_gettop(state);
  2771. // Attempt to match the parameters to a valid binding.
  2772. switch (paramCount)
  2773. {
  2774. case 2:
  2775. {
  2776. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2777. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  2778. {
  2779. // Get parameter 1 off the stack.
  2780. bool param1Valid;
  2781. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  2782. if (!param1Valid)
  2783. {
  2784. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  2785. lua_error(state);
  2786. }
  2787. ImageControl* instance = getInstance(state);
  2788. instance->setBounds(*param1);
  2789. return 0;
  2790. }
  2791. lua_pushstring(state, "lua_ImageControl_setBounds - Failed to match the given parameters to a valid function signature.");
  2792. lua_error(state);
  2793. break;
  2794. }
  2795. default:
  2796. {
  2797. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2798. lua_error(state);
  2799. break;
  2800. }
  2801. }
  2802. return 0;
  2803. }
  2804. int lua_ImageControl_setConsumeInputEvents(lua_State* state)
  2805. {
  2806. // Get the number of parameters.
  2807. int paramCount = lua_gettop(state);
  2808. // Attempt to match the parameters to a valid binding.
  2809. switch (paramCount)
  2810. {
  2811. case 2:
  2812. {
  2813. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2814. lua_type(state, 2) == LUA_TBOOLEAN)
  2815. {
  2816. // Get parameter 1 off the stack.
  2817. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  2818. ImageControl* instance = getInstance(state);
  2819. instance->setConsumeInputEvents(param1);
  2820. return 0;
  2821. }
  2822. lua_pushstring(state, "lua_ImageControl_setConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  2823. lua_error(state);
  2824. break;
  2825. }
  2826. default:
  2827. {
  2828. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2829. lua_error(state);
  2830. break;
  2831. }
  2832. }
  2833. return 0;
  2834. }
  2835. int lua_ImageControl_setCursorColor(lua_State* state)
  2836. {
  2837. // Get the number of parameters.
  2838. int paramCount = lua_gettop(state);
  2839. // Attempt to match the parameters to a valid binding.
  2840. switch (paramCount)
  2841. {
  2842. case 3:
  2843. {
  2844. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2845. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  2846. lua_type(state, 3) == LUA_TNUMBER)
  2847. {
  2848. // Get parameter 1 off the stack.
  2849. bool param1Valid;
  2850. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  2851. if (!param1Valid)
  2852. {
  2853. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  2854. lua_error(state);
  2855. }
  2856. // Get parameter 2 off the stack.
  2857. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  2858. ImageControl* instance = getInstance(state);
  2859. instance->setCursorColor(*param1, param2);
  2860. return 0;
  2861. }
  2862. lua_pushstring(state, "lua_ImageControl_setCursorColor - Failed to match the given parameters to a valid function signature.");
  2863. lua_error(state);
  2864. break;
  2865. }
  2866. default:
  2867. {
  2868. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2869. lua_error(state);
  2870. break;
  2871. }
  2872. }
  2873. return 0;
  2874. }
  2875. int lua_ImageControl_setCursorRegion(lua_State* state)
  2876. {
  2877. // Get the number of parameters.
  2878. int paramCount = lua_gettop(state);
  2879. // Attempt to match the parameters to a valid binding.
  2880. switch (paramCount)
  2881. {
  2882. case 3:
  2883. {
  2884. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2885. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  2886. lua_type(state, 3) == LUA_TNUMBER)
  2887. {
  2888. // Get parameter 1 off the stack.
  2889. bool param1Valid;
  2890. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  2891. if (!param1Valid)
  2892. {
  2893. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  2894. lua_error(state);
  2895. }
  2896. // Get parameter 2 off the stack.
  2897. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  2898. ImageControl* instance = getInstance(state);
  2899. instance->setCursorRegion(*param1, param2);
  2900. return 0;
  2901. }
  2902. lua_pushstring(state, "lua_ImageControl_setCursorRegion - Failed to match the given parameters to a valid function signature.");
  2903. lua_error(state);
  2904. break;
  2905. }
  2906. default:
  2907. {
  2908. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2909. lua_error(state);
  2910. break;
  2911. }
  2912. }
  2913. return 0;
  2914. }
  2915. int lua_ImageControl_setEnabled(lua_State* state)
  2916. {
  2917. // Get the number of parameters.
  2918. int paramCount = lua_gettop(state);
  2919. // Attempt to match the parameters to a valid binding.
  2920. switch (paramCount)
  2921. {
  2922. case 2:
  2923. {
  2924. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2925. lua_type(state, 2) == LUA_TBOOLEAN)
  2926. {
  2927. // Get parameter 1 off the stack.
  2928. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  2929. ImageControl* instance = getInstance(state);
  2930. instance->setEnabled(param1);
  2931. return 0;
  2932. }
  2933. lua_pushstring(state, "lua_ImageControl_setEnabled - Failed to match the given parameters to a valid function signature.");
  2934. lua_error(state);
  2935. break;
  2936. }
  2937. default:
  2938. {
  2939. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2940. lua_error(state);
  2941. break;
  2942. }
  2943. }
  2944. return 0;
  2945. }
  2946. int lua_ImageControl_setFocusIndex(lua_State* state)
  2947. {
  2948. // Get the number of parameters.
  2949. int paramCount = lua_gettop(state);
  2950. // Attempt to match the parameters to a valid binding.
  2951. switch (paramCount)
  2952. {
  2953. case 2:
  2954. {
  2955. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2956. lua_type(state, 2) == LUA_TNUMBER)
  2957. {
  2958. // Get parameter 1 off the stack.
  2959. int param1 = (int)luaL_checkint(state, 2);
  2960. ImageControl* instance = getInstance(state);
  2961. instance->setFocusIndex(param1);
  2962. return 0;
  2963. }
  2964. lua_pushstring(state, "lua_ImageControl_setFocusIndex - Failed to match the given parameters to a valid function signature.");
  2965. lua_error(state);
  2966. break;
  2967. }
  2968. default:
  2969. {
  2970. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2971. lua_error(state);
  2972. break;
  2973. }
  2974. }
  2975. return 0;
  2976. }
  2977. int lua_ImageControl_setFont(lua_State* state)
  2978. {
  2979. // Get the number of parameters.
  2980. int paramCount = lua_gettop(state);
  2981. // Attempt to match the parameters to a valid binding.
  2982. switch (paramCount)
  2983. {
  2984. case 2:
  2985. {
  2986. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2987. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2988. {
  2989. // Get parameter 1 off the stack.
  2990. bool param1Valid;
  2991. gameplay::ScriptUtil::LuaArray<Font> param1 = gameplay::ScriptUtil::getObjectPointer<Font>(2, "Font", false, &param1Valid);
  2992. if (!param1Valid)
  2993. {
  2994. lua_pushstring(state, "Failed to convert parameter 1 to type 'Font'.");
  2995. lua_error(state);
  2996. }
  2997. ImageControl* instance = getInstance(state);
  2998. instance->setFont(param1);
  2999. return 0;
  3000. }
  3001. lua_pushstring(state, "lua_ImageControl_setFont - Failed to match the given parameters to a valid function signature.");
  3002. lua_error(state);
  3003. break;
  3004. }
  3005. case 3:
  3006. {
  3007. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3008. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  3009. lua_type(state, 3) == LUA_TNUMBER)
  3010. {
  3011. // Get parameter 1 off the stack.
  3012. bool param1Valid;
  3013. gameplay::ScriptUtil::LuaArray<Font> param1 = gameplay::ScriptUtil::getObjectPointer<Font>(2, "Font", false, &param1Valid);
  3014. if (!param1Valid)
  3015. {
  3016. lua_pushstring(state, "Failed to convert parameter 1 to type 'Font'.");
  3017. lua_error(state);
  3018. }
  3019. // Get parameter 2 off the stack.
  3020. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3021. ImageControl* instance = getInstance(state);
  3022. instance->setFont(param1, param2);
  3023. return 0;
  3024. }
  3025. lua_pushstring(state, "lua_ImageControl_setFont - Failed to match the given parameters to a valid function signature.");
  3026. lua_error(state);
  3027. break;
  3028. }
  3029. default:
  3030. {
  3031. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3032. lua_error(state);
  3033. break;
  3034. }
  3035. }
  3036. return 0;
  3037. }
  3038. int lua_ImageControl_setFontSize(lua_State* state)
  3039. {
  3040. // Get the number of parameters.
  3041. int paramCount = lua_gettop(state);
  3042. // Attempt to match the parameters to a valid binding.
  3043. switch (paramCount)
  3044. {
  3045. case 2:
  3046. {
  3047. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3048. lua_type(state, 2) == LUA_TNUMBER)
  3049. {
  3050. // Get parameter 1 off the stack.
  3051. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  3052. ImageControl* instance = getInstance(state);
  3053. instance->setFontSize(param1);
  3054. return 0;
  3055. }
  3056. lua_pushstring(state, "lua_ImageControl_setFontSize - Failed to match the given parameters to a valid function signature.");
  3057. lua_error(state);
  3058. break;
  3059. }
  3060. case 3:
  3061. {
  3062. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3063. lua_type(state, 2) == LUA_TNUMBER &&
  3064. lua_type(state, 3) == LUA_TNUMBER)
  3065. {
  3066. // Get parameter 1 off the stack.
  3067. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  3068. // Get parameter 2 off the stack.
  3069. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3070. ImageControl* instance = getInstance(state);
  3071. instance->setFontSize(param1, param2);
  3072. return 0;
  3073. }
  3074. lua_pushstring(state, "lua_ImageControl_setFontSize - Failed to match the given parameters to a valid function signature.");
  3075. lua_error(state);
  3076. break;
  3077. }
  3078. default:
  3079. {
  3080. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3081. lua_error(state);
  3082. break;
  3083. }
  3084. }
  3085. return 0;
  3086. }
  3087. int lua_ImageControl_setHeight(lua_State* state)
  3088. {
  3089. // Get the number of parameters.
  3090. int paramCount = lua_gettop(state);
  3091. // Attempt to match the parameters to a valid binding.
  3092. switch (paramCount)
  3093. {
  3094. case 2:
  3095. {
  3096. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3097. lua_type(state, 2) == LUA_TNUMBER)
  3098. {
  3099. // Get parameter 1 off the stack.
  3100. float param1 = (float)luaL_checknumber(state, 2);
  3101. ImageControl* instance = getInstance(state);
  3102. instance->setHeight(param1);
  3103. return 0;
  3104. }
  3105. lua_pushstring(state, "lua_ImageControl_setHeight - Failed to match the given parameters to a valid function signature.");
  3106. lua_error(state);
  3107. break;
  3108. }
  3109. default:
  3110. {
  3111. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3112. lua_error(state);
  3113. break;
  3114. }
  3115. }
  3116. return 0;
  3117. }
  3118. int lua_ImageControl_setImage(lua_State* state)
  3119. {
  3120. // Get the number of parameters.
  3121. int paramCount = lua_gettop(state);
  3122. // Attempt to match the parameters to a valid binding.
  3123. switch (paramCount)
  3124. {
  3125. case 2:
  3126. {
  3127. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3128. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3129. {
  3130. // Get parameter 1 off the stack.
  3131. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  3132. ImageControl* instance = getInstance(state);
  3133. instance->setImage(param1);
  3134. return 0;
  3135. }
  3136. lua_pushstring(state, "lua_ImageControl_setImage - Failed to match the given parameters to a valid function signature.");
  3137. lua_error(state);
  3138. break;
  3139. }
  3140. default:
  3141. {
  3142. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3143. lua_error(state);
  3144. break;
  3145. }
  3146. }
  3147. return 0;
  3148. }
  3149. int lua_ImageControl_setImageColor(lua_State* state)
  3150. {
  3151. // Get the number of parameters.
  3152. int paramCount = lua_gettop(state);
  3153. // Attempt to match the parameters to a valid binding.
  3154. switch (paramCount)
  3155. {
  3156. case 3:
  3157. {
  3158. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3159. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3160. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  3161. {
  3162. // Get parameter 1 off the stack.
  3163. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  3164. // Get parameter 2 off the stack.
  3165. bool param2Valid;
  3166. gameplay::ScriptUtil::LuaArray<Vector4> param2 = gameplay::ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true, &param2Valid);
  3167. if (!param2Valid)
  3168. {
  3169. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector4'.");
  3170. lua_error(state);
  3171. }
  3172. ImageControl* instance = getInstance(state);
  3173. instance->setImageColor(param1, *param2);
  3174. return 0;
  3175. }
  3176. lua_pushstring(state, "lua_ImageControl_setImageColor - Failed to match the given parameters to a valid function signature.");
  3177. lua_error(state);
  3178. break;
  3179. }
  3180. case 4:
  3181. {
  3182. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3183. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3184. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  3185. lua_type(state, 4) == LUA_TNUMBER)
  3186. {
  3187. // Get parameter 1 off the stack.
  3188. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  3189. // Get parameter 2 off the stack.
  3190. bool param2Valid;
  3191. gameplay::ScriptUtil::LuaArray<Vector4> param2 = gameplay::ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true, &param2Valid);
  3192. if (!param2Valid)
  3193. {
  3194. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector4'.");
  3195. lua_error(state);
  3196. }
  3197. // Get parameter 3 off the stack.
  3198. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  3199. ImageControl* instance = getInstance(state);
  3200. instance->setImageColor(param1, *param2, param3);
  3201. return 0;
  3202. }
  3203. lua_pushstring(state, "lua_ImageControl_setImageColor - Failed to match the given parameters to a valid function signature.");
  3204. lua_error(state);
  3205. break;
  3206. }
  3207. default:
  3208. {
  3209. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  3210. lua_error(state);
  3211. break;
  3212. }
  3213. }
  3214. return 0;
  3215. }
  3216. int lua_ImageControl_setImageRegion(lua_State* state)
  3217. {
  3218. // Get the number of parameters.
  3219. int paramCount = lua_gettop(state);
  3220. // Attempt to match the parameters to a valid binding.
  3221. switch (paramCount)
  3222. {
  3223. case 3:
  3224. {
  3225. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3226. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3227. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  3228. {
  3229. // Get parameter 1 off the stack.
  3230. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  3231. // Get parameter 2 off the stack.
  3232. bool param2Valid;
  3233. gameplay::ScriptUtil::LuaArray<Rectangle> param2 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true, &param2Valid);
  3234. if (!param2Valid)
  3235. {
  3236. lua_pushstring(state, "Failed to convert parameter 2 to type 'Rectangle'.");
  3237. lua_error(state);
  3238. }
  3239. ImageControl* instance = getInstance(state);
  3240. instance->setImageRegion(param1, *param2);
  3241. return 0;
  3242. }
  3243. lua_pushstring(state, "lua_ImageControl_setImageRegion - Failed to match the given parameters to a valid function signature.");
  3244. lua_error(state);
  3245. break;
  3246. }
  3247. case 4:
  3248. {
  3249. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3250. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3251. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  3252. lua_type(state, 4) == LUA_TNUMBER)
  3253. {
  3254. // Get parameter 1 off the stack.
  3255. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  3256. // Get parameter 2 off the stack.
  3257. bool param2Valid;
  3258. gameplay::ScriptUtil::LuaArray<Rectangle> param2 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true, &param2Valid);
  3259. if (!param2Valid)
  3260. {
  3261. lua_pushstring(state, "Failed to convert parameter 2 to type 'Rectangle'.");
  3262. lua_error(state);
  3263. }
  3264. // Get parameter 3 off the stack.
  3265. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  3266. ImageControl* instance = getInstance(state);
  3267. instance->setImageRegion(param1, *param2, param3);
  3268. return 0;
  3269. }
  3270. lua_pushstring(state, "lua_ImageControl_setImageRegion - Failed to match the given parameters to a valid function signature.");
  3271. lua_error(state);
  3272. break;
  3273. }
  3274. default:
  3275. {
  3276. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  3277. lua_error(state);
  3278. break;
  3279. }
  3280. }
  3281. return 0;
  3282. }
  3283. int lua_ImageControl_setMargin(lua_State* state)
  3284. {
  3285. // Get the number of parameters.
  3286. int paramCount = lua_gettop(state);
  3287. // Attempt to match the parameters to a valid binding.
  3288. switch (paramCount)
  3289. {
  3290. case 5:
  3291. {
  3292. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3293. lua_type(state, 2) == LUA_TNUMBER &&
  3294. lua_type(state, 3) == LUA_TNUMBER &&
  3295. lua_type(state, 4) == LUA_TNUMBER &&
  3296. lua_type(state, 5) == LUA_TNUMBER)
  3297. {
  3298. // Get parameter 1 off the stack.
  3299. float param1 = (float)luaL_checknumber(state, 2);
  3300. // Get parameter 2 off the stack.
  3301. float param2 = (float)luaL_checknumber(state, 3);
  3302. // Get parameter 3 off the stack.
  3303. float param3 = (float)luaL_checknumber(state, 4);
  3304. // Get parameter 4 off the stack.
  3305. float param4 = (float)luaL_checknumber(state, 5);
  3306. ImageControl* instance = getInstance(state);
  3307. instance->setMargin(param1, param2, param3, param4);
  3308. return 0;
  3309. }
  3310. lua_pushstring(state, "lua_ImageControl_setMargin - Failed to match the given parameters to a valid function signature.");
  3311. lua_error(state);
  3312. break;
  3313. }
  3314. default:
  3315. {
  3316. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  3317. lua_error(state);
  3318. break;
  3319. }
  3320. }
  3321. return 0;
  3322. }
  3323. int lua_ImageControl_setOpacity(lua_State* state)
  3324. {
  3325. // Get the number of parameters.
  3326. int paramCount = lua_gettop(state);
  3327. // Attempt to match the parameters to a valid binding.
  3328. switch (paramCount)
  3329. {
  3330. case 2:
  3331. {
  3332. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3333. lua_type(state, 2) == LUA_TNUMBER)
  3334. {
  3335. // Get parameter 1 off the stack.
  3336. float param1 = (float)luaL_checknumber(state, 2);
  3337. ImageControl* instance = getInstance(state);
  3338. instance->setOpacity(param1);
  3339. return 0;
  3340. }
  3341. lua_pushstring(state, "lua_ImageControl_setOpacity - Failed to match the given parameters to a valid function signature.");
  3342. lua_error(state);
  3343. break;
  3344. }
  3345. case 3:
  3346. {
  3347. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3348. lua_type(state, 2) == LUA_TNUMBER &&
  3349. lua_type(state, 3) == LUA_TNUMBER)
  3350. {
  3351. // Get parameter 1 off the stack.
  3352. float param1 = (float)luaL_checknumber(state, 2);
  3353. // Get parameter 2 off the stack.
  3354. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3355. ImageControl* instance = getInstance(state);
  3356. instance->setOpacity(param1, param2);
  3357. return 0;
  3358. }
  3359. lua_pushstring(state, "lua_ImageControl_setOpacity - Failed to match the given parameters to a valid function signature.");
  3360. lua_error(state);
  3361. break;
  3362. }
  3363. default:
  3364. {
  3365. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3366. lua_error(state);
  3367. break;
  3368. }
  3369. }
  3370. return 0;
  3371. }
  3372. int lua_ImageControl_setPadding(lua_State* state)
  3373. {
  3374. // Get the number of parameters.
  3375. int paramCount = lua_gettop(state);
  3376. // Attempt to match the parameters to a valid binding.
  3377. switch (paramCount)
  3378. {
  3379. case 5:
  3380. {
  3381. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3382. lua_type(state, 2) == LUA_TNUMBER &&
  3383. lua_type(state, 3) == LUA_TNUMBER &&
  3384. lua_type(state, 4) == LUA_TNUMBER &&
  3385. lua_type(state, 5) == LUA_TNUMBER)
  3386. {
  3387. // Get parameter 1 off the stack.
  3388. float param1 = (float)luaL_checknumber(state, 2);
  3389. // Get parameter 2 off the stack.
  3390. float param2 = (float)luaL_checknumber(state, 3);
  3391. // Get parameter 3 off the stack.
  3392. float param3 = (float)luaL_checknumber(state, 4);
  3393. // Get parameter 4 off the stack.
  3394. float param4 = (float)luaL_checknumber(state, 5);
  3395. ImageControl* instance = getInstance(state);
  3396. instance->setPadding(param1, param2, param3, param4);
  3397. return 0;
  3398. }
  3399. lua_pushstring(state, "lua_ImageControl_setPadding - Failed to match the given parameters to a valid function signature.");
  3400. lua_error(state);
  3401. break;
  3402. }
  3403. default:
  3404. {
  3405. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  3406. lua_error(state);
  3407. break;
  3408. }
  3409. }
  3410. return 0;
  3411. }
  3412. int lua_ImageControl_setPosition(lua_State* state)
  3413. {
  3414. // Get the number of parameters.
  3415. int paramCount = lua_gettop(state);
  3416. // Attempt to match the parameters to a valid binding.
  3417. switch (paramCount)
  3418. {
  3419. case 3:
  3420. {
  3421. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3422. lua_type(state, 2) == LUA_TNUMBER &&
  3423. lua_type(state, 3) == LUA_TNUMBER)
  3424. {
  3425. // Get parameter 1 off the stack.
  3426. float param1 = (float)luaL_checknumber(state, 2);
  3427. // Get parameter 2 off the stack.
  3428. float param2 = (float)luaL_checknumber(state, 3);
  3429. ImageControl* instance = getInstance(state);
  3430. instance->setPosition(param1, param2);
  3431. return 0;
  3432. }
  3433. lua_pushstring(state, "lua_ImageControl_setPosition - Failed to match the given parameters to a valid function signature.");
  3434. lua_error(state);
  3435. break;
  3436. }
  3437. default:
  3438. {
  3439. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3440. lua_error(state);
  3441. break;
  3442. }
  3443. }
  3444. return 0;
  3445. }
  3446. int lua_ImageControl_setRegionDst(lua_State* state)
  3447. {
  3448. // Get the number of parameters.
  3449. int paramCount = lua_gettop(state);
  3450. // Attempt to match the parameters to a valid binding.
  3451. switch (paramCount)
  3452. {
  3453. case 2:
  3454. {
  3455. do
  3456. {
  3457. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3458. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3459. {
  3460. // Get parameter 1 off the stack.
  3461. bool param1Valid;
  3462. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  3463. if (!param1Valid)
  3464. break;
  3465. ImageControl* instance = getInstance(state);
  3466. instance->setRegionDst(*param1);
  3467. return 0;
  3468. }
  3469. } while (0);
  3470. lua_pushstring(state, "lua_ImageControl_setRegionDst - Failed to match the given parameters to a valid function signature.");
  3471. lua_error(state);
  3472. break;
  3473. }
  3474. case 5:
  3475. {
  3476. do
  3477. {
  3478. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3479. lua_type(state, 2) == LUA_TNUMBER &&
  3480. lua_type(state, 3) == LUA_TNUMBER &&
  3481. lua_type(state, 4) == LUA_TNUMBER &&
  3482. lua_type(state, 5) == LUA_TNUMBER)
  3483. {
  3484. // Get parameter 1 off the stack.
  3485. float param1 = (float)luaL_checknumber(state, 2);
  3486. // Get parameter 2 off the stack.
  3487. float param2 = (float)luaL_checknumber(state, 3);
  3488. // Get parameter 3 off the stack.
  3489. float param3 = (float)luaL_checknumber(state, 4);
  3490. // Get parameter 4 off the stack.
  3491. float param4 = (float)luaL_checknumber(state, 5);
  3492. ImageControl* instance = getInstance(state);
  3493. instance->setRegionDst(param1, param2, param3, param4);
  3494. return 0;
  3495. }
  3496. } while (0);
  3497. lua_pushstring(state, "lua_ImageControl_setRegionDst - Failed to match the given parameters to a valid function signature.");
  3498. lua_error(state);
  3499. break;
  3500. }
  3501. default:
  3502. {
  3503. lua_pushstring(state, "Invalid number of parameters (expected 2 or 5).");
  3504. lua_error(state);
  3505. break;
  3506. }
  3507. }
  3508. return 0;
  3509. }
  3510. int lua_ImageControl_setRegionSrc(lua_State* state)
  3511. {
  3512. // Get the number of parameters.
  3513. int paramCount = lua_gettop(state);
  3514. // Attempt to match the parameters to a valid binding.
  3515. switch (paramCount)
  3516. {
  3517. case 2:
  3518. {
  3519. do
  3520. {
  3521. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3522. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3523. {
  3524. // Get parameter 1 off the stack.
  3525. bool param1Valid;
  3526. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  3527. if (!param1Valid)
  3528. break;
  3529. ImageControl* instance = getInstance(state);
  3530. instance->setRegionSrc(*param1);
  3531. return 0;
  3532. }
  3533. } while (0);
  3534. lua_pushstring(state, "lua_ImageControl_setRegionSrc - Failed to match the given parameters to a valid function signature.");
  3535. lua_error(state);
  3536. break;
  3537. }
  3538. case 5:
  3539. {
  3540. do
  3541. {
  3542. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3543. lua_type(state, 2) == LUA_TNUMBER &&
  3544. lua_type(state, 3) == LUA_TNUMBER &&
  3545. lua_type(state, 4) == LUA_TNUMBER &&
  3546. lua_type(state, 5) == LUA_TNUMBER)
  3547. {
  3548. // Get parameter 1 off the stack.
  3549. float param1 = (float)luaL_checknumber(state, 2);
  3550. // Get parameter 2 off the stack.
  3551. float param2 = (float)luaL_checknumber(state, 3);
  3552. // Get parameter 3 off the stack.
  3553. float param3 = (float)luaL_checknumber(state, 4);
  3554. // Get parameter 4 off the stack.
  3555. float param4 = (float)luaL_checknumber(state, 5);
  3556. ImageControl* instance = getInstance(state);
  3557. instance->setRegionSrc(param1, param2, param3, param4);
  3558. return 0;
  3559. }
  3560. } while (0);
  3561. lua_pushstring(state, "lua_ImageControl_setRegionSrc - Failed to match the given parameters to a valid function signature.");
  3562. lua_error(state);
  3563. break;
  3564. }
  3565. default:
  3566. {
  3567. lua_pushstring(state, "Invalid number of parameters (expected 2 or 5).");
  3568. lua_error(state);
  3569. break;
  3570. }
  3571. }
  3572. return 0;
  3573. }
  3574. int lua_ImageControl_setSize(lua_State* state)
  3575. {
  3576. // Get the number of parameters.
  3577. int paramCount = lua_gettop(state);
  3578. // Attempt to match the parameters to a valid binding.
  3579. switch (paramCount)
  3580. {
  3581. case 3:
  3582. {
  3583. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3584. lua_type(state, 2) == LUA_TNUMBER &&
  3585. lua_type(state, 3) == LUA_TNUMBER)
  3586. {
  3587. // Get parameter 1 off the stack.
  3588. float param1 = (float)luaL_checknumber(state, 2);
  3589. // Get parameter 2 off the stack.
  3590. float param2 = (float)luaL_checknumber(state, 3);
  3591. ImageControl* instance = getInstance(state);
  3592. instance->setSize(param1, param2);
  3593. return 0;
  3594. }
  3595. lua_pushstring(state, "lua_ImageControl_setSize - Failed to match the given parameters to a valid function signature.");
  3596. lua_error(state);
  3597. break;
  3598. }
  3599. default:
  3600. {
  3601. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3602. lua_error(state);
  3603. break;
  3604. }
  3605. }
  3606. return 0;
  3607. }
  3608. int lua_ImageControl_setSkinColor(lua_State* state)
  3609. {
  3610. // Get the number of parameters.
  3611. int paramCount = lua_gettop(state);
  3612. // Attempt to match the parameters to a valid binding.
  3613. switch (paramCount)
  3614. {
  3615. case 2:
  3616. {
  3617. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3618. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3619. {
  3620. // Get parameter 1 off the stack.
  3621. bool param1Valid;
  3622. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  3623. if (!param1Valid)
  3624. {
  3625. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  3626. lua_error(state);
  3627. }
  3628. ImageControl* instance = getInstance(state);
  3629. instance->setSkinColor(*param1);
  3630. return 0;
  3631. }
  3632. lua_pushstring(state, "lua_ImageControl_setSkinColor - Failed to match the given parameters to a valid function signature.");
  3633. lua_error(state);
  3634. break;
  3635. }
  3636. case 3:
  3637. {
  3638. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3639. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3640. lua_type(state, 3) == LUA_TNUMBER)
  3641. {
  3642. // Get parameter 1 off the stack.
  3643. bool param1Valid;
  3644. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  3645. if (!param1Valid)
  3646. {
  3647. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  3648. lua_error(state);
  3649. }
  3650. // Get parameter 2 off the stack.
  3651. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3652. ImageControl* instance = getInstance(state);
  3653. instance->setSkinColor(*param1, param2);
  3654. return 0;
  3655. }
  3656. lua_pushstring(state, "lua_ImageControl_setSkinColor - Failed to match the given parameters to a valid function signature.");
  3657. lua_error(state);
  3658. break;
  3659. }
  3660. default:
  3661. {
  3662. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3663. lua_error(state);
  3664. break;
  3665. }
  3666. }
  3667. return 0;
  3668. }
  3669. int lua_ImageControl_setSkinRegion(lua_State* state)
  3670. {
  3671. // Get the number of parameters.
  3672. int paramCount = lua_gettop(state);
  3673. // Attempt to match the parameters to a valid binding.
  3674. switch (paramCount)
  3675. {
  3676. case 2:
  3677. {
  3678. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3679. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3680. {
  3681. // Get parameter 1 off the stack.
  3682. bool param1Valid;
  3683. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  3684. if (!param1Valid)
  3685. {
  3686. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  3687. lua_error(state);
  3688. }
  3689. ImageControl* instance = getInstance(state);
  3690. instance->setSkinRegion(*param1);
  3691. return 0;
  3692. }
  3693. lua_pushstring(state, "lua_ImageControl_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  3694. lua_error(state);
  3695. break;
  3696. }
  3697. case 3:
  3698. {
  3699. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3700. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3701. lua_type(state, 3) == LUA_TNUMBER)
  3702. {
  3703. // Get parameter 1 off the stack.
  3704. bool param1Valid;
  3705. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  3706. if (!param1Valid)
  3707. {
  3708. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  3709. lua_error(state);
  3710. }
  3711. // Get parameter 2 off the stack.
  3712. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3713. ImageControl* instance = getInstance(state);
  3714. instance->setSkinRegion(*param1, param2);
  3715. return 0;
  3716. }
  3717. lua_pushstring(state, "lua_ImageControl_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  3718. lua_error(state);
  3719. break;
  3720. }
  3721. default:
  3722. {
  3723. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3724. lua_error(state);
  3725. break;
  3726. }
  3727. }
  3728. return 0;
  3729. }
  3730. int lua_ImageControl_setState(lua_State* state)
  3731. {
  3732. // Get the number of parameters.
  3733. int paramCount = lua_gettop(state);
  3734. // Attempt to match the parameters to a valid binding.
  3735. switch (paramCount)
  3736. {
  3737. case 2:
  3738. {
  3739. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3740. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3741. {
  3742. // Get parameter 1 off the stack.
  3743. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  3744. ImageControl* instance = getInstance(state);
  3745. instance->setState(param1);
  3746. return 0;
  3747. }
  3748. lua_pushstring(state, "lua_ImageControl_setState - Failed to match the given parameters to a valid function signature.");
  3749. lua_error(state);
  3750. break;
  3751. }
  3752. default:
  3753. {
  3754. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3755. lua_error(state);
  3756. break;
  3757. }
  3758. }
  3759. return 0;
  3760. }
  3761. int lua_ImageControl_setStyle(lua_State* state)
  3762. {
  3763. // Get the number of parameters.
  3764. int paramCount = lua_gettop(state);
  3765. // Attempt to match the parameters to a valid binding.
  3766. switch (paramCount)
  3767. {
  3768. case 2:
  3769. {
  3770. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3771. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3772. {
  3773. // Get parameter 1 off the stack.
  3774. bool param1Valid;
  3775. gameplay::ScriptUtil::LuaArray<Theme::Style> param1 = gameplay::ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false, &param1Valid);
  3776. if (!param1Valid)
  3777. {
  3778. lua_pushstring(state, "Failed to convert parameter 1 to type 'Theme::Style'.");
  3779. lua_error(state);
  3780. }
  3781. ImageControl* instance = getInstance(state);
  3782. instance->setStyle(param1);
  3783. return 0;
  3784. }
  3785. lua_pushstring(state, "lua_ImageControl_setStyle - Failed to match the given parameters to a valid function signature.");
  3786. lua_error(state);
  3787. break;
  3788. }
  3789. default:
  3790. {
  3791. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3792. lua_error(state);
  3793. break;
  3794. }
  3795. }
  3796. return 0;
  3797. }
  3798. int lua_ImageControl_setText(lua_State* state)
  3799. {
  3800. // Get the number of parameters.
  3801. int paramCount = lua_gettop(state);
  3802. // Attempt to match the parameters to a valid binding.
  3803. switch (paramCount)
  3804. {
  3805. case 2:
  3806. {
  3807. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3808. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3809. {
  3810. // Get parameter 1 off the stack.
  3811. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  3812. ImageControl* instance = getInstance(state);
  3813. instance->setText(param1);
  3814. return 0;
  3815. }
  3816. lua_pushstring(state, "lua_ImageControl_setText - Failed to match the given parameters to a valid function signature.");
  3817. lua_error(state);
  3818. break;
  3819. }
  3820. default:
  3821. {
  3822. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3823. lua_error(state);
  3824. break;
  3825. }
  3826. }
  3827. return 0;
  3828. }
  3829. int lua_ImageControl_setTextAlignment(lua_State* state)
  3830. {
  3831. // Get the number of parameters.
  3832. int paramCount = lua_gettop(state);
  3833. // Attempt to match the parameters to a valid binding.
  3834. switch (paramCount)
  3835. {
  3836. case 2:
  3837. {
  3838. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3839. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3840. {
  3841. // Get parameter 1 off the stack.
  3842. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  3843. ImageControl* instance = getInstance(state);
  3844. instance->setTextAlignment(param1);
  3845. return 0;
  3846. }
  3847. lua_pushstring(state, "lua_ImageControl_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  3848. lua_error(state);
  3849. break;
  3850. }
  3851. case 3:
  3852. {
  3853. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3854. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3855. lua_type(state, 3) == LUA_TNUMBER)
  3856. {
  3857. // Get parameter 1 off the stack.
  3858. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  3859. // Get parameter 2 off the stack.
  3860. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3861. ImageControl* instance = getInstance(state);
  3862. instance->setTextAlignment(param1, param2);
  3863. return 0;
  3864. }
  3865. lua_pushstring(state, "lua_ImageControl_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  3866. lua_error(state);
  3867. break;
  3868. }
  3869. default:
  3870. {
  3871. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3872. lua_error(state);
  3873. break;
  3874. }
  3875. }
  3876. return 0;
  3877. }
  3878. int lua_ImageControl_setTextColor(lua_State* state)
  3879. {
  3880. // Get the number of parameters.
  3881. int paramCount = lua_gettop(state);
  3882. // Attempt to match the parameters to a valid binding.
  3883. switch (paramCount)
  3884. {
  3885. case 2:
  3886. {
  3887. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3888. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3889. {
  3890. // Get parameter 1 off the stack.
  3891. bool param1Valid;
  3892. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  3893. if (!param1Valid)
  3894. {
  3895. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  3896. lua_error(state);
  3897. }
  3898. ImageControl* instance = getInstance(state);
  3899. instance->setTextColor(*param1);
  3900. return 0;
  3901. }
  3902. lua_pushstring(state, "lua_ImageControl_setTextColor - Failed to match the given parameters to a valid function signature.");
  3903. lua_error(state);
  3904. break;
  3905. }
  3906. case 3:
  3907. {
  3908. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3909. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3910. lua_type(state, 3) == LUA_TNUMBER)
  3911. {
  3912. // Get parameter 1 off the stack.
  3913. bool param1Valid;
  3914. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  3915. if (!param1Valid)
  3916. {
  3917. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  3918. lua_error(state);
  3919. }
  3920. // Get parameter 2 off the stack.
  3921. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3922. ImageControl* instance = getInstance(state);
  3923. instance->setTextColor(*param1, param2);
  3924. return 0;
  3925. }
  3926. lua_pushstring(state, "lua_ImageControl_setTextColor - Failed to match the given parameters to a valid function signature.");
  3927. lua_error(state);
  3928. break;
  3929. }
  3930. default:
  3931. {
  3932. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3933. lua_error(state);
  3934. break;
  3935. }
  3936. }
  3937. return 0;
  3938. }
  3939. int lua_ImageControl_setTextRightToLeft(lua_State* state)
  3940. {
  3941. // Get the number of parameters.
  3942. int paramCount = lua_gettop(state);
  3943. // Attempt to match the parameters to a valid binding.
  3944. switch (paramCount)
  3945. {
  3946. case 2:
  3947. {
  3948. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3949. lua_type(state, 2) == LUA_TBOOLEAN)
  3950. {
  3951. // Get parameter 1 off the stack.
  3952. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  3953. ImageControl* instance = getInstance(state);
  3954. instance->setTextRightToLeft(param1);
  3955. return 0;
  3956. }
  3957. lua_pushstring(state, "lua_ImageControl_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  3958. lua_error(state);
  3959. break;
  3960. }
  3961. case 3:
  3962. {
  3963. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3964. lua_type(state, 2) == LUA_TBOOLEAN &&
  3965. lua_type(state, 3) == LUA_TNUMBER)
  3966. {
  3967. // Get parameter 1 off the stack.
  3968. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  3969. // Get parameter 2 off the stack.
  3970. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3971. ImageControl* instance = getInstance(state);
  3972. instance->setTextRightToLeft(param1, param2);
  3973. return 0;
  3974. }
  3975. lua_pushstring(state, "lua_ImageControl_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  3976. lua_error(state);
  3977. break;
  3978. }
  3979. default:
  3980. {
  3981. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3982. lua_error(state);
  3983. break;
  3984. }
  3985. }
  3986. return 0;
  3987. }
  3988. int lua_ImageControl_setVisible(lua_State* state)
  3989. {
  3990. // Get the number of parameters.
  3991. int paramCount = lua_gettop(state);
  3992. // Attempt to match the parameters to a valid binding.
  3993. switch (paramCount)
  3994. {
  3995. case 2:
  3996. {
  3997. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3998. lua_type(state, 2) == LUA_TBOOLEAN)
  3999. {
  4000. // Get parameter 1 off the stack.
  4001. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  4002. ImageControl* instance = getInstance(state);
  4003. instance->setVisible(param1);
  4004. return 0;
  4005. }
  4006. lua_pushstring(state, "lua_ImageControl_setVisible - Failed to match the given parameters to a valid function signature.");
  4007. lua_error(state);
  4008. break;
  4009. }
  4010. default:
  4011. {
  4012. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4013. lua_error(state);
  4014. break;
  4015. }
  4016. }
  4017. return 0;
  4018. }
  4019. int lua_ImageControl_setWidth(lua_State* state)
  4020. {
  4021. // Get the number of parameters.
  4022. int paramCount = lua_gettop(state);
  4023. // Attempt to match the parameters to a valid binding.
  4024. switch (paramCount)
  4025. {
  4026. case 2:
  4027. {
  4028. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4029. lua_type(state, 2) == LUA_TNUMBER)
  4030. {
  4031. // Get parameter 1 off the stack.
  4032. float param1 = (float)luaL_checknumber(state, 2);
  4033. ImageControl* instance = getInstance(state);
  4034. instance->setWidth(param1);
  4035. return 0;
  4036. }
  4037. lua_pushstring(state, "lua_ImageControl_setWidth - Failed to match the given parameters to a valid function signature.");
  4038. lua_error(state);
  4039. break;
  4040. }
  4041. default:
  4042. {
  4043. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4044. lua_error(state);
  4045. break;
  4046. }
  4047. }
  4048. return 0;
  4049. }
  4050. int lua_ImageControl_setZIndex(lua_State* state)
  4051. {
  4052. // Get the number of parameters.
  4053. int paramCount = lua_gettop(state);
  4054. // Attempt to match the parameters to a valid binding.
  4055. switch (paramCount)
  4056. {
  4057. case 2:
  4058. {
  4059. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4060. lua_type(state, 2) == LUA_TNUMBER)
  4061. {
  4062. // Get parameter 1 off the stack.
  4063. int param1 = (int)luaL_checkint(state, 2);
  4064. ImageControl* instance = getInstance(state);
  4065. instance->setZIndex(param1);
  4066. return 0;
  4067. }
  4068. lua_pushstring(state, "lua_ImageControl_setZIndex - Failed to match the given parameters to a valid function signature.");
  4069. lua_error(state);
  4070. break;
  4071. }
  4072. default:
  4073. {
  4074. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4075. lua_error(state);
  4076. break;
  4077. }
  4078. }
  4079. return 0;
  4080. }
  4081. int lua_ImageControl_static_ANIMATE_OPACITY(lua_State* state)
  4082. {
  4083. // Validate the number of parameters.
  4084. if (lua_gettop(state) > 0)
  4085. {
  4086. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4087. lua_error(state);
  4088. }
  4089. int result = ImageControl::ANIMATE_OPACITY;
  4090. // Push the return value onto the stack.
  4091. lua_pushinteger(state, result);
  4092. return 1;
  4093. }
  4094. int lua_ImageControl_static_ANIMATE_POSITION(lua_State* state)
  4095. {
  4096. // Validate the number of parameters.
  4097. if (lua_gettop(state) > 0)
  4098. {
  4099. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4100. lua_error(state);
  4101. }
  4102. int result = ImageControl::ANIMATE_POSITION;
  4103. // Push the return value onto the stack.
  4104. lua_pushinteger(state, result);
  4105. return 1;
  4106. }
  4107. int lua_ImageControl_static_ANIMATE_POSITION_X(lua_State* state)
  4108. {
  4109. // Validate the number of parameters.
  4110. if (lua_gettop(state) > 0)
  4111. {
  4112. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4113. lua_error(state);
  4114. }
  4115. int result = ImageControl::ANIMATE_POSITION_X;
  4116. // Push the return value onto the stack.
  4117. lua_pushinteger(state, result);
  4118. return 1;
  4119. }
  4120. int lua_ImageControl_static_ANIMATE_POSITION_Y(lua_State* state)
  4121. {
  4122. // Validate the number of parameters.
  4123. if (lua_gettop(state) > 0)
  4124. {
  4125. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4126. lua_error(state);
  4127. }
  4128. int result = ImageControl::ANIMATE_POSITION_Y;
  4129. // Push the return value onto the stack.
  4130. lua_pushinteger(state, result);
  4131. return 1;
  4132. }
  4133. int lua_ImageControl_static_ANIMATE_SIZE(lua_State* state)
  4134. {
  4135. // Validate the number of parameters.
  4136. if (lua_gettop(state) > 0)
  4137. {
  4138. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4139. lua_error(state);
  4140. }
  4141. int result = ImageControl::ANIMATE_SIZE;
  4142. // Push the return value onto the stack.
  4143. lua_pushinteger(state, result);
  4144. return 1;
  4145. }
  4146. int lua_ImageControl_static_ANIMATE_SIZE_HEIGHT(lua_State* state)
  4147. {
  4148. // Validate the number of parameters.
  4149. if (lua_gettop(state) > 0)
  4150. {
  4151. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4152. lua_error(state);
  4153. }
  4154. int result = ImageControl::ANIMATE_SIZE_HEIGHT;
  4155. // Push the return value onto the stack.
  4156. lua_pushinteger(state, result);
  4157. return 1;
  4158. }
  4159. int lua_ImageControl_static_ANIMATE_SIZE_WIDTH(lua_State* state)
  4160. {
  4161. // Validate the number of parameters.
  4162. if (lua_gettop(state) > 0)
  4163. {
  4164. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4165. lua_error(state);
  4166. }
  4167. int result = ImageControl::ANIMATE_SIZE_WIDTH;
  4168. // Push the return value onto the stack.
  4169. lua_pushinteger(state, result);
  4170. return 1;
  4171. }
  4172. int lua_ImageControl_static_create(lua_State* state)
  4173. {
  4174. // Get the number of parameters.
  4175. int paramCount = lua_gettop(state);
  4176. // Attempt to match the parameters to a valid binding.
  4177. switch (paramCount)
  4178. {
  4179. case 2:
  4180. {
  4181. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL) &&
  4182. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4183. {
  4184. // Get parameter 1 off the stack.
  4185. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  4186. // Get parameter 2 off the stack.
  4187. bool param2Valid;
  4188. gameplay::ScriptUtil::LuaArray<Theme::Style> param2 = gameplay::ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false, &param2Valid);
  4189. if (!param2Valid)
  4190. {
  4191. lua_pushstring(state, "Failed to convert parameter 2 to type 'Theme::Style'.");
  4192. lua_error(state);
  4193. }
  4194. void* returnPtr = (void*)ImageControl::create(param1, param2);
  4195. if (returnPtr)
  4196. {
  4197. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  4198. object->instance = returnPtr;
  4199. object->owns = true;
  4200. luaL_getmetatable(state, "ImageControl");
  4201. lua_setmetatable(state, -2);
  4202. }
  4203. else
  4204. {
  4205. lua_pushnil(state);
  4206. }
  4207. return 1;
  4208. }
  4209. lua_pushstring(state, "lua_ImageControl_static_create - Failed to match the given parameters to a valid function signature.");
  4210. lua_error(state);
  4211. break;
  4212. }
  4213. default:
  4214. {
  4215. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4216. lua_error(state);
  4217. break;
  4218. }
  4219. }
  4220. return 0;
  4221. }
  4222. }