lua_Slider.cpp 168 KB

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