lua_Label.cpp 164 KB

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