lua_TextBox.cpp 155 KB

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