lua_CheckBox.cpp 159 KB

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