lua_TextBox.cpp 172 KB

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