lua_Slider.cpp 189 KB

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