lua_Control.cpp 151 KB

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