lua_Label.cpp 173 KB

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