lua_CheckBox.cpp 170 KB

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