lua_Slider.cpp 179 KB

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