lua_Label.cpp 152 KB

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