lua_Label.cpp 141 KB

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