lua_Label.cpp 164 KB

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