lua_Slider.cpp 183 KB

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