lua_Label.cpp 141 KB

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