lua_ImageControl.cpp 167 KB

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