lua_Slider.cpp 180 KB

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