lua_Label.cpp 153 KB

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