lua_Slider.cpp 153 KB

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