lua_TextBox.cpp 173 KB

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