lua_Form.cpp 219 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699
  1. #include "Base.h"
  2. #include "ScriptController.h"
  3. #include "lua_Form.h"
  4. #include "AbsoluteLayout.h"
  5. #include "Animation.h"
  6. #include "AnimationTarget.h"
  7. #include "Base.h"
  8. #include "Button.h"
  9. #include "CheckBox.h"
  10. #include "Container.h"
  11. #include "Control.h"
  12. #include "ControlFactory.h"
  13. #include "FlowLayout.h"
  14. #include "Form.h"
  15. #include "Game.h"
  16. #include "ImageControl.h"
  17. #include "Joystick.h"
  18. #include "Label.h"
  19. #include "Layout.h"
  20. #include "Node.h"
  21. #include "RadioButton.h"
  22. #include "Ref.h"
  23. #include "Scene.h"
  24. #include "ScriptController.h"
  25. #include "ScriptTarget.h"
  26. #include "Slider.h"
  27. #include "TextBox.h"
  28. #include "Theme.h"
  29. #include "VerticalLayout.h"
  30. #include "lua_ContainerScroll.h"
  31. #include "lua_ControlAlignment.h"
  32. #include "lua_ControlAutoSize.h"
  33. #include "lua_ControlListenerEventType.h"
  34. #include "lua_ControlState.h"
  35. #include "lua_CurveInterpolationType.h"
  36. #include "lua_FontJustify.h"
  37. #include "lua_LayoutType.h"
  38. namespace gameplay
  39. {
  40. void luaRegister_Form()
  41. {
  42. const luaL_Reg lua_members[] =
  43. {
  44. {"addControl", lua_Form_addControl},
  45. {"addListener", lua_Form_addListener},
  46. {"addRef", lua_Form_addRef},
  47. {"addScriptCallback", lua_Form_addScriptCallback},
  48. {"canFocus", lua_Form_canFocus},
  49. {"createAnimation", lua_Form_createAnimation},
  50. {"createAnimationFromBy", lua_Form_createAnimationFromBy},
  51. {"createAnimationFromTo", lua_Form_createAnimationFromTo},
  52. {"destroyAnimation", lua_Form_destroyAnimation},
  53. {"draw", lua_Form_draw},
  54. {"getAbsoluteBounds", lua_Form_getAbsoluteBounds},
  55. {"getActiveControl", lua_Form_getActiveControl},
  56. {"getAlignment", lua_Form_getAlignment},
  57. {"getAnimation", lua_Form_getAnimation},
  58. {"getAnimationPropertyComponentCount", lua_Form_getAnimationPropertyComponentCount},
  59. {"getAnimationPropertyValue", lua_Form_getAnimationPropertyValue},
  60. {"getAutoHeight", lua_Form_getAutoHeight},
  61. {"getAutoWidth", lua_Form_getAutoWidth},
  62. {"getBorder", lua_Form_getBorder},
  63. {"getBounds", lua_Form_getBounds},
  64. {"getClip", lua_Form_getClip},
  65. {"getClipBounds", lua_Form_getClipBounds},
  66. {"getConsumeInputEvents", lua_Form_getConsumeInputEvents},
  67. {"getControl", lua_Form_getControl},
  68. {"getControlCount", lua_Form_getControlCount},
  69. {"getCursorColor", lua_Form_getCursorColor},
  70. {"getCursorRegion", lua_Form_getCursorRegion},
  71. {"getCursorUVs", lua_Form_getCursorUVs},
  72. {"getFocusIndex", lua_Form_getFocusIndex},
  73. {"getFont", lua_Form_getFont},
  74. {"getFontSize", lua_Form_getFontSize},
  75. {"getHeight", lua_Form_getHeight},
  76. {"getId", lua_Form_getId},
  77. {"getImageColor", lua_Form_getImageColor},
  78. {"getImageRegion", lua_Form_getImageRegion},
  79. {"getImageUVs", lua_Form_getImageUVs},
  80. {"getLayout", lua_Form_getLayout},
  81. {"getMargin", lua_Form_getMargin},
  82. {"getOpacity", lua_Form_getOpacity},
  83. {"getPadding", lua_Form_getPadding},
  84. {"getParent", lua_Form_getParent},
  85. {"getRefCount", lua_Form_getRefCount},
  86. {"getScroll", lua_Form_getScroll},
  87. {"getScrollPosition", lua_Form_getScrollPosition},
  88. {"getScrollWheelRequiresFocus", lua_Form_getScrollWheelRequiresFocus},
  89. {"getScrollWheelSpeed", lua_Form_getScrollWheelSpeed},
  90. {"getScrollingFriction", lua_Form_getScrollingFriction},
  91. {"getSkinColor", lua_Form_getSkinColor},
  92. {"getSkinRegion", lua_Form_getSkinRegion},
  93. {"getState", lua_Form_getState},
  94. {"getStyle", lua_Form_getStyle},
  95. {"getTextAlignment", lua_Form_getTextAlignment},
  96. {"getTextColor", lua_Form_getTextColor},
  97. {"getTextRightToLeft", lua_Form_getTextRightToLeft},
  98. {"getTheme", lua_Form_getTheme},
  99. {"getTopLevelForm", lua_Form_getTopLevelForm},
  100. {"getType", lua_Form_getType},
  101. {"getWidth", lua_Form_getWidth},
  102. {"getX", lua_Form_getX},
  103. {"getY", lua_Form_getY},
  104. {"getZIndex", lua_Form_getZIndex},
  105. {"hasFocus", lua_Form_hasFocus},
  106. {"insertControl", lua_Form_insertControl},
  107. {"isBatchingEnabled", lua_Form_isBatchingEnabled},
  108. {"isChild", lua_Form_isChild},
  109. {"isContainer", lua_Form_isContainer},
  110. {"isEnabled", lua_Form_isEnabled},
  111. {"isEnabledInHierarchy", lua_Form_isEnabledInHierarchy},
  112. {"isForm", lua_Form_isForm},
  113. {"isHeightPercentage", lua_Form_isHeightPercentage},
  114. {"isScrollBarsAutoHide", lua_Form_isScrollBarsAutoHide},
  115. {"isScrolling", lua_Form_isScrolling},
  116. {"isVisible", lua_Form_isVisible},
  117. {"isVisibleInHierarchy", lua_Form_isVisibleInHierarchy},
  118. {"isWidthPercentage", lua_Form_isWidthPercentage},
  119. {"isXPercentage", lua_Form_isXPercentage},
  120. {"isYPercentage", lua_Form_isYPercentage},
  121. {"release", lua_Form_release},
  122. {"removeControl", lua_Form_removeControl},
  123. {"removeListener", lua_Form_removeListener},
  124. {"removeScriptCallback", lua_Form_removeScriptCallback},
  125. {"setActiveControl", lua_Form_setActiveControl},
  126. {"setAlignment", lua_Form_setAlignment},
  127. {"setAnimationPropertyValue", lua_Form_setAnimationPropertyValue},
  128. {"setAutoHeight", lua_Form_setAutoHeight},
  129. {"setAutoWidth", lua_Form_setAutoWidth},
  130. {"setBatchingEnabled", lua_Form_setBatchingEnabled},
  131. {"setBorder", lua_Form_setBorder},
  132. {"setBounds", lua_Form_setBounds},
  133. {"setCanFocus", lua_Form_setCanFocus},
  134. {"setConsumeInputEvents", lua_Form_setConsumeInputEvents},
  135. {"setCursorColor", lua_Form_setCursorColor},
  136. {"setCursorRegion", lua_Form_setCursorRegion},
  137. {"setEnabled", lua_Form_setEnabled},
  138. {"setFocus", lua_Form_setFocus},
  139. {"setFocusIndex", lua_Form_setFocusIndex},
  140. {"setFont", lua_Form_setFont},
  141. {"setFontSize", lua_Form_setFontSize},
  142. {"setHeight", lua_Form_setHeight},
  143. {"setId", lua_Form_setId},
  144. {"setImageColor", lua_Form_setImageColor},
  145. {"setImageRegion", lua_Form_setImageRegion},
  146. {"setLayout", lua_Form_setLayout},
  147. {"setMargin", lua_Form_setMargin},
  148. {"setNode", lua_Form_setNode},
  149. {"setOpacity", lua_Form_setOpacity},
  150. {"setPadding", lua_Form_setPadding},
  151. {"setPosition", lua_Form_setPosition},
  152. {"setScroll", lua_Form_setScroll},
  153. {"setScrollBarsAutoHide", lua_Form_setScrollBarsAutoHide},
  154. {"setScrollPosition", lua_Form_setScrollPosition},
  155. {"setScrollWheelRequiresFocus", lua_Form_setScrollWheelRequiresFocus},
  156. {"setScrollWheelSpeed", lua_Form_setScrollWheelSpeed},
  157. {"setScrollingFriction", lua_Form_setScrollingFriction},
  158. {"setSize", lua_Form_setSize},
  159. {"setSkinColor", lua_Form_setSkinColor},
  160. {"setSkinRegion", lua_Form_setSkinRegion},
  161. {"setStyle", lua_Form_setStyle},
  162. {"setTextAlignment", lua_Form_setTextAlignment},
  163. {"setTextColor", lua_Form_setTextColor},
  164. {"setTextRightToLeft", lua_Form_setTextRightToLeft},
  165. {"setVisible", lua_Form_setVisible},
  166. {"setWidth", lua_Form_setWidth},
  167. {"setX", lua_Form_setX},
  168. {"setY", lua_Form_setY},
  169. {"setZIndex", lua_Form_setZIndex},
  170. {"stopScrolling", lua_Form_stopScrolling},
  171. {"update", lua_Form_update},
  172. {NULL, NULL}
  173. };
  174. const luaL_Reg lua_statics[] =
  175. {
  176. {"ANIMATE_OPACITY", lua_Form_static_ANIMATE_OPACITY},
  177. {"ANIMATE_POSITION", lua_Form_static_ANIMATE_POSITION},
  178. {"ANIMATE_POSITION_X", lua_Form_static_ANIMATE_POSITION_X},
  179. {"ANIMATE_POSITION_Y", lua_Form_static_ANIMATE_POSITION_Y},
  180. {"ANIMATE_SCROLLBAR_OPACITY", lua_Form_static_ANIMATE_SCROLLBAR_OPACITY},
  181. {"ANIMATE_SIZE", lua_Form_static_ANIMATE_SIZE},
  182. {"ANIMATE_SIZE_HEIGHT", lua_Form_static_ANIMATE_SIZE_HEIGHT},
  183. {"ANIMATE_SIZE_WIDTH", lua_Form_static_ANIMATE_SIZE_WIDTH},
  184. {"clearFocus", lua_Form_static_clearFocus},
  185. {"create", lua_Form_static_create},
  186. {"getActiveControl", lua_Form_static_getActiveControl},
  187. {"getFocusControl", lua_Form_static_getFocusControl},
  188. {"getForm", lua_Form_static_getForm},
  189. {NULL, NULL}
  190. };
  191. std::vector<std::string> scopePath;
  192. gameplay::ScriptUtil::registerClass("Form", lua_members, NULL, lua_Form__gc, lua_statics, scopePath);
  193. }
  194. static Form* getInstance(lua_State* state)
  195. {
  196. void* userdata = luaL_checkudata(state, 1, "Form");
  197. luaL_argcheck(state, userdata != NULL, 1, "'Form' expected.");
  198. return (Form*)((gameplay::ScriptUtil::LuaObject*)userdata)->instance;
  199. }
  200. int lua_Form__gc(lua_State* state)
  201. {
  202. // Get the number of parameters.
  203. int paramCount = lua_gettop(state);
  204. // Attempt to match the parameters to a valid binding.
  205. switch (paramCount)
  206. {
  207. case 1:
  208. {
  209. if ((lua_type(state, 1) == LUA_TUSERDATA))
  210. {
  211. void* userdata = luaL_checkudata(state, 1, "Form");
  212. luaL_argcheck(state, userdata != NULL, 1, "'Form' expected.");
  213. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)userdata;
  214. if (object->owns)
  215. {
  216. Form* instance = (Form*)object->instance;
  217. SAFE_RELEASE(instance);
  218. }
  219. return 0;
  220. }
  221. lua_pushstring(state, "lua_Form__gc - Failed to match the given parameters to a valid function signature.");
  222. lua_error(state);
  223. break;
  224. }
  225. default:
  226. {
  227. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  228. lua_error(state);
  229. break;
  230. }
  231. }
  232. return 0;
  233. }
  234. int lua_Form_addControl(lua_State* state)
  235. {
  236. // Get the number of parameters.
  237. int paramCount = lua_gettop(state);
  238. // Attempt to match the parameters to a valid binding.
  239. switch (paramCount)
  240. {
  241. case 2:
  242. {
  243. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  244. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  245. {
  246. // Get parameter 1 off the stack.
  247. bool param1Valid;
  248. gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
  249. if (!param1Valid)
  250. {
  251. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
  252. lua_error(state);
  253. }
  254. Form* instance = getInstance(state);
  255. unsigned int result = instance->addControl(param1);
  256. // Push the return value onto the stack.
  257. lua_pushunsigned(state, result);
  258. return 1;
  259. }
  260. lua_pushstring(state, "lua_Form_addControl - Failed to match the given parameters to a valid function signature.");
  261. lua_error(state);
  262. break;
  263. }
  264. default:
  265. {
  266. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  267. lua_error(state);
  268. break;
  269. }
  270. }
  271. return 0;
  272. }
  273. int lua_Form_addListener(lua_State* state)
  274. {
  275. // Get the number of parameters.
  276. int paramCount = lua_gettop(state);
  277. // Attempt to match the parameters to a valid binding.
  278. switch (paramCount)
  279. {
  280. case 3:
  281. {
  282. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  283. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  284. lua_type(state, 3) == LUA_TNUMBER)
  285. {
  286. // Get parameter 1 off the stack.
  287. bool param1Valid;
  288. gameplay::ScriptUtil::LuaArray<Control::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false, &param1Valid);
  289. if (!param1Valid)
  290. {
  291. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control::Listener'.");
  292. lua_error(state);
  293. }
  294. // Get parameter 2 off the stack.
  295. int param2 = (int)luaL_checkint(state, 3);
  296. Form* instance = getInstance(state);
  297. instance->addListener(param1, param2);
  298. return 0;
  299. }
  300. lua_pushstring(state, "lua_Form_addListener - Failed to match the given parameters to a valid function signature.");
  301. lua_error(state);
  302. break;
  303. }
  304. default:
  305. {
  306. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  307. lua_error(state);
  308. break;
  309. }
  310. }
  311. return 0;
  312. }
  313. int lua_Form_addRef(lua_State* state)
  314. {
  315. // Get the number of parameters.
  316. int paramCount = lua_gettop(state);
  317. // Attempt to match the parameters to a valid binding.
  318. switch (paramCount)
  319. {
  320. case 1:
  321. {
  322. if ((lua_type(state, 1) == LUA_TUSERDATA))
  323. {
  324. Form* instance = getInstance(state);
  325. instance->addRef();
  326. return 0;
  327. }
  328. lua_pushstring(state, "lua_Form_addRef - Failed to match the given parameters to a valid function signature.");
  329. lua_error(state);
  330. break;
  331. }
  332. default:
  333. {
  334. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  335. lua_error(state);
  336. break;
  337. }
  338. }
  339. return 0;
  340. }
  341. int lua_Form_addScriptCallback(lua_State* state)
  342. {
  343. // Get the number of parameters.
  344. int paramCount = lua_gettop(state);
  345. // Attempt to match the parameters to a valid binding.
  346. switch (paramCount)
  347. {
  348. case 3:
  349. {
  350. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  351. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  352. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  353. {
  354. // Get parameter 1 off the stack.
  355. std::string param1 = gameplay::ScriptUtil::getString(2, true);
  356. // Get parameter 2 off the stack.
  357. std::string param2 = gameplay::ScriptUtil::getString(3, true);
  358. Form* instance = getInstance(state);
  359. instance->addScriptCallback(param1, param2);
  360. return 0;
  361. }
  362. lua_pushstring(state, "lua_Form_addScriptCallback - Failed to match the given parameters to a valid function signature.");
  363. lua_error(state);
  364. break;
  365. }
  366. default:
  367. {
  368. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  369. lua_error(state);
  370. break;
  371. }
  372. }
  373. return 0;
  374. }
  375. int lua_Form_canFocus(lua_State* state)
  376. {
  377. // Get the number of parameters.
  378. int paramCount = lua_gettop(state);
  379. // Attempt to match the parameters to a valid binding.
  380. switch (paramCount)
  381. {
  382. case 1:
  383. {
  384. if ((lua_type(state, 1) == LUA_TUSERDATA))
  385. {
  386. Form* instance = getInstance(state);
  387. bool result = instance->canFocus();
  388. // Push the return value onto the stack.
  389. lua_pushboolean(state, result);
  390. return 1;
  391. }
  392. lua_pushstring(state, "lua_Form_canFocus - Failed to match the given parameters to a valid function signature.");
  393. lua_error(state);
  394. break;
  395. }
  396. default:
  397. {
  398. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  399. lua_error(state);
  400. break;
  401. }
  402. }
  403. return 0;
  404. }
  405. int lua_Form_createAnimation(lua_State* state)
  406. {
  407. // Get the number of parameters.
  408. int paramCount = lua_gettop(state);
  409. // Attempt to match the parameters to a valid binding.
  410. switch (paramCount)
  411. {
  412. case 3:
  413. {
  414. do
  415. {
  416. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  417. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  418. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  419. {
  420. // Get parameter 1 off the stack.
  421. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  422. // Get parameter 2 off the stack.
  423. const char* param2 = gameplay::ScriptUtil::getString(3, false);
  424. Form* instance = getInstance(state);
  425. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  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. do
  442. {
  443. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  444. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  445. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  446. {
  447. // Get parameter 1 off the stack.
  448. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  449. // Get parameter 2 off the stack.
  450. bool param2Valid;
  451. gameplay::ScriptUtil::LuaArray<Properties> param2 = gameplay::ScriptUtil::getObjectPointer<Properties>(3, "Properties", false, &param2Valid);
  452. if (!param2Valid)
  453. break;
  454. Form* instance = getInstance(state);
  455. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  456. if (returnPtr)
  457. {
  458. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  459. object->instance = returnPtr;
  460. object->owns = false;
  461. luaL_getmetatable(state, "Animation");
  462. lua_setmetatable(state, -2);
  463. }
  464. else
  465. {
  466. lua_pushnil(state);
  467. }
  468. return 1;
  469. }
  470. } while (0);
  471. lua_pushstring(state, "lua_Form_createAnimation - Failed to match the given parameters to a valid function signature.");
  472. lua_error(state);
  473. break;
  474. }
  475. case 7:
  476. {
  477. do
  478. {
  479. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  480. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  481. lua_type(state, 3) == LUA_TNUMBER &&
  482. lua_type(state, 4) == LUA_TNUMBER &&
  483. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  484. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  485. (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
  486. {
  487. // Get parameter 1 off the stack.
  488. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  489. // Get parameter 2 off the stack.
  490. int param2 = (int)luaL_checkint(state, 3);
  491. // Get parameter 3 off the stack.
  492. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  493. // Get parameter 4 off the stack.
  494. gameplay::ScriptUtil::LuaArray<unsigned int> param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5);
  495. // Get parameter 5 off the stack.
  496. gameplay::ScriptUtil::LuaArray<float> param5 = gameplay::ScriptUtil::getFloatPointer(6);
  497. // Get parameter 6 off the stack.
  498. Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7));
  499. Form* instance = getInstance(state);
  500. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6);
  501. if (returnPtr)
  502. {
  503. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  504. object->instance = returnPtr;
  505. object->owns = false;
  506. luaL_getmetatable(state, "Animation");
  507. lua_setmetatable(state, -2);
  508. }
  509. else
  510. {
  511. lua_pushnil(state);
  512. }
  513. return 1;
  514. }
  515. } while (0);
  516. lua_pushstring(state, "lua_Form_createAnimation - Failed to match the given parameters to a valid function signature.");
  517. lua_error(state);
  518. break;
  519. }
  520. case 9:
  521. {
  522. do
  523. {
  524. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  525. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  526. lua_type(state, 3) == LUA_TNUMBER &&
  527. lua_type(state, 4) == LUA_TNUMBER &&
  528. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  529. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  530. (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) &&
  531. (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) &&
  532. (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL))
  533. {
  534. // Get parameter 1 off the stack.
  535. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  536. // Get parameter 2 off the stack.
  537. int param2 = (int)luaL_checkint(state, 3);
  538. // Get parameter 3 off the stack.
  539. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  540. // Get parameter 4 off the stack.
  541. gameplay::ScriptUtil::LuaArray<unsigned int> param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5);
  542. // Get parameter 5 off the stack.
  543. gameplay::ScriptUtil::LuaArray<float> param5 = gameplay::ScriptUtil::getFloatPointer(6);
  544. // Get parameter 6 off the stack.
  545. gameplay::ScriptUtil::LuaArray<float> param6 = gameplay::ScriptUtil::getFloatPointer(7);
  546. // Get parameter 7 off the stack.
  547. gameplay::ScriptUtil::LuaArray<float> param7 = gameplay::ScriptUtil::getFloatPointer(8);
  548. // Get parameter 8 off the stack.
  549. Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9));
  550. Form* instance = getInstance(state);
  551. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8);
  552. if (returnPtr)
  553. {
  554. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  555. object->instance = returnPtr;
  556. object->owns = false;
  557. luaL_getmetatable(state, "Animation");
  558. lua_setmetatable(state, -2);
  559. }
  560. else
  561. {
  562. lua_pushnil(state);
  563. }
  564. return 1;
  565. }
  566. } while (0);
  567. lua_pushstring(state, "lua_Form_createAnimation - Failed to match the given parameters to a valid function signature.");
  568. lua_error(state);
  569. break;
  570. }
  571. default:
  572. {
  573. lua_pushstring(state, "Invalid number of parameters (expected 3, 7 or 9).");
  574. lua_error(state);
  575. break;
  576. }
  577. }
  578. return 0;
  579. }
  580. int lua_Form_createAnimationFromBy(lua_State* state)
  581. {
  582. // Get the number of parameters.
  583. int paramCount = lua_gettop(state);
  584. // Attempt to match the parameters to a valid binding.
  585. switch (paramCount)
  586. {
  587. case 7:
  588. {
  589. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  590. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  591. lua_type(state, 3) == LUA_TNUMBER &&
  592. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  593. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  594. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  595. lua_type(state, 7) == LUA_TNUMBER)
  596. {
  597. // Get parameter 1 off the stack.
  598. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  599. // Get parameter 2 off the stack.
  600. int param2 = (int)luaL_checkint(state, 3);
  601. // Get parameter 3 off the stack.
  602. gameplay::ScriptUtil::LuaArray<float> param3 = gameplay::ScriptUtil::getFloatPointer(4);
  603. // Get parameter 4 off the stack.
  604. gameplay::ScriptUtil::LuaArray<float> param4 = gameplay::ScriptUtil::getFloatPointer(5);
  605. // Get parameter 5 off the stack.
  606. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  607. // Get parameter 6 off the stack.
  608. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  609. Form* instance = getInstance(state);
  610. void* returnPtr = (void*)instance->createAnimationFromBy(param1, param2, param3, param4, param5, param6);
  611. if (returnPtr)
  612. {
  613. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  614. object->instance = returnPtr;
  615. object->owns = false;
  616. luaL_getmetatable(state, "Animation");
  617. lua_setmetatable(state, -2);
  618. }
  619. else
  620. {
  621. lua_pushnil(state);
  622. }
  623. return 1;
  624. }
  625. lua_pushstring(state, "lua_Form_createAnimationFromBy - Failed to match the given parameters to a valid function signature.");
  626. lua_error(state);
  627. break;
  628. }
  629. default:
  630. {
  631. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  632. lua_error(state);
  633. break;
  634. }
  635. }
  636. return 0;
  637. }
  638. int lua_Form_createAnimationFromTo(lua_State* state)
  639. {
  640. // Get the number of parameters.
  641. int paramCount = lua_gettop(state);
  642. // Attempt to match the parameters to a valid binding.
  643. switch (paramCount)
  644. {
  645. case 7:
  646. {
  647. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  648. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  649. lua_type(state, 3) == LUA_TNUMBER &&
  650. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  651. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  652. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  653. lua_type(state, 7) == LUA_TNUMBER)
  654. {
  655. // Get parameter 1 off the stack.
  656. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  657. // Get parameter 2 off the stack.
  658. int param2 = (int)luaL_checkint(state, 3);
  659. // Get parameter 3 off the stack.
  660. gameplay::ScriptUtil::LuaArray<float> param3 = gameplay::ScriptUtil::getFloatPointer(4);
  661. // Get parameter 4 off the stack.
  662. gameplay::ScriptUtil::LuaArray<float> param4 = gameplay::ScriptUtil::getFloatPointer(5);
  663. // Get parameter 5 off the stack.
  664. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  665. // Get parameter 6 off the stack.
  666. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  667. Form* instance = getInstance(state);
  668. void* returnPtr = (void*)instance->createAnimationFromTo(param1, param2, param3, param4, param5, param6);
  669. if (returnPtr)
  670. {
  671. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  672. object->instance = returnPtr;
  673. object->owns = false;
  674. luaL_getmetatable(state, "Animation");
  675. lua_setmetatable(state, -2);
  676. }
  677. else
  678. {
  679. lua_pushnil(state);
  680. }
  681. return 1;
  682. }
  683. lua_pushstring(state, "lua_Form_createAnimationFromTo - Failed to match the given parameters to a valid function signature.");
  684. lua_error(state);
  685. break;
  686. }
  687. default:
  688. {
  689. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  690. lua_error(state);
  691. break;
  692. }
  693. }
  694. return 0;
  695. }
  696. int lua_Form_destroyAnimation(lua_State* state)
  697. {
  698. // Get the number of parameters.
  699. int paramCount = lua_gettop(state);
  700. // Attempt to match the parameters to a valid binding.
  701. switch (paramCount)
  702. {
  703. case 1:
  704. {
  705. if ((lua_type(state, 1) == LUA_TUSERDATA))
  706. {
  707. Form* instance = getInstance(state);
  708. instance->destroyAnimation();
  709. return 0;
  710. }
  711. lua_pushstring(state, "lua_Form_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  712. lua_error(state);
  713. break;
  714. }
  715. case 2:
  716. {
  717. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  718. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  719. {
  720. // Get parameter 1 off the stack.
  721. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  722. Form* instance = getInstance(state);
  723. instance->destroyAnimation(param1);
  724. return 0;
  725. }
  726. lua_pushstring(state, "lua_Form_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  727. lua_error(state);
  728. break;
  729. }
  730. default:
  731. {
  732. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  733. lua_error(state);
  734. break;
  735. }
  736. }
  737. return 0;
  738. }
  739. int lua_Form_draw(lua_State* state)
  740. {
  741. // Get the number of parameters.
  742. int paramCount = lua_gettop(state);
  743. // Attempt to match the parameters to a valid binding.
  744. switch (paramCount)
  745. {
  746. case 1:
  747. {
  748. if ((lua_type(state, 1) == LUA_TUSERDATA))
  749. {
  750. Form* instance = getInstance(state);
  751. unsigned int result = instance->draw();
  752. // Push the return value onto the stack.
  753. lua_pushunsigned(state, result);
  754. return 1;
  755. }
  756. lua_pushstring(state, "lua_Form_draw - Failed to match the given parameters to a valid function signature.");
  757. lua_error(state);
  758. break;
  759. }
  760. default:
  761. {
  762. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  763. lua_error(state);
  764. break;
  765. }
  766. }
  767. return 0;
  768. }
  769. int lua_Form_getAbsoluteBounds(lua_State* state)
  770. {
  771. // Get the number of parameters.
  772. int paramCount = lua_gettop(state);
  773. // Attempt to match the parameters to a valid binding.
  774. switch (paramCount)
  775. {
  776. case 1:
  777. {
  778. if ((lua_type(state, 1) == LUA_TUSERDATA))
  779. {
  780. Form* instance = getInstance(state);
  781. void* returnPtr = (void*)&(instance->getAbsoluteBounds());
  782. if (returnPtr)
  783. {
  784. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  785. object->instance = returnPtr;
  786. object->owns = false;
  787. luaL_getmetatable(state, "Rectangle");
  788. lua_setmetatable(state, -2);
  789. }
  790. else
  791. {
  792. lua_pushnil(state);
  793. }
  794. return 1;
  795. }
  796. lua_pushstring(state, "lua_Form_getAbsoluteBounds - Failed to match the given parameters to a valid function signature.");
  797. lua_error(state);
  798. break;
  799. }
  800. default:
  801. {
  802. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  803. lua_error(state);
  804. break;
  805. }
  806. }
  807. return 0;
  808. }
  809. int lua_Form_getActiveControl(lua_State* state)
  810. {
  811. // Get the number of parameters.
  812. int paramCount = lua_gettop(state);
  813. // Attempt to match the parameters to a valid binding.
  814. switch (paramCount)
  815. {
  816. case 1:
  817. {
  818. if ((lua_type(state, 1) == LUA_TUSERDATA))
  819. {
  820. Form* instance = getInstance(state);
  821. void* returnPtr = (void*)instance->getActiveControl();
  822. if (returnPtr)
  823. {
  824. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  825. object->instance = returnPtr;
  826. object->owns = false;
  827. luaL_getmetatable(state, "Control");
  828. lua_setmetatable(state, -2);
  829. }
  830. else
  831. {
  832. lua_pushnil(state);
  833. }
  834. return 1;
  835. }
  836. lua_pushstring(state, "lua_Form_getActiveControl - Failed to match the given parameters to a valid function signature.");
  837. lua_error(state);
  838. break;
  839. }
  840. default:
  841. {
  842. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  843. lua_error(state);
  844. break;
  845. }
  846. }
  847. return 0;
  848. }
  849. int lua_Form_getAlignment(lua_State* state)
  850. {
  851. // Get the number of parameters.
  852. int paramCount = lua_gettop(state);
  853. // Attempt to match the parameters to a valid binding.
  854. switch (paramCount)
  855. {
  856. case 1:
  857. {
  858. if ((lua_type(state, 1) == LUA_TUSERDATA))
  859. {
  860. Form* instance = getInstance(state);
  861. Control::Alignment result = instance->getAlignment();
  862. // Push the return value onto the stack.
  863. lua_pushstring(state, lua_stringFromEnum_ControlAlignment(result));
  864. return 1;
  865. }
  866. lua_pushstring(state, "lua_Form_getAlignment - Failed to match the given parameters to a valid function signature.");
  867. lua_error(state);
  868. break;
  869. }
  870. default:
  871. {
  872. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  873. lua_error(state);
  874. break;
  875. }
  876. }
  877. return 0;
  878. }
  879. int lua_Form_getAnimation(lua_State* state)
  880. {
  881. // Get the number of parameters.
  882. int paramCount = lua_gettop(state);
  883. // Attempt to match the parameters to a valid binding.
  884. switch (paramCount)
  885. {
  886. case 1:
  887. {
  888. if ((lua_type(state, 1) == LUA_TUSERDATA))
  889. {
  890. Form* instance = getInstance(state);
  891. void* returnPtr = (void*)instance->getAnimation();
  892. if (returnPtr)
  893. {
  894. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  895. object->instance = returnPtr;
  896. object->owns = false;
  897. luaL_getmetatable(state, "Animation");
  898. lua_setmetatable(state, -2);
  899. }
  900. else
  901. {
  902. lua_pushnil(state);
  903. }
  904. return 1;
  905. }
  906. lua_pushstring(state, "lua_Form_getAnimation - Failed to match the given parameters to a valid function signature.");
  907. lua_error(state);
  908. break;
  909. }
  910. case 2:
  911. {
  912. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  913. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  914. {
  915. // Get parameter 1 off the stack.
  916. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  917. Form* instance = getInstance(state);
  918. void* returnPtr = (void*)instance->getAnimation(param1);
  919. if (returnPtr)
  920. {
  921. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  922. object->instance = returnPtr;
  923. object->owns = false;
  924. luaL_getmetatable(state, "Animation");
  925. lua_setmetatable(state, -2);
  926. }
  927. else
  928. {
  929. lua_pushnil(state);
  930. }
  931. return 1;
  932. }
  933. lua_pushstring(state, "lua_Form_getAnimation - Failed to match the given parameters to a valid function signature.");
  934. lua_error(state);
  935. break;
  936. }
  937. default:
  938. {
  939. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  940. lua_error(state);
  941. break;
  942. }
  943. }
  944. return 0;
  945. }
  946. int lua_Form_getAnimationPropertyComponentCount(lua_State* state)
  947. {
  948. // Get the number of parameters.
  949. int paramCount = lua_gettop(state);
  950. // Attempt to match the parameters to a valid binding.
  951. switch (paramCount)
  952. {
  953. case 2:
  954. {
  955. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  956. lua_type(state, 2) == LUA_TNUMBER)
  957. {
  958. // Get parameter 1 off the stack.
  959. int param1 = (int)luaL_checkint(state, 2);
  960. Form* instance = getInstance(state);
  961. unsigned int result = instance->getAnimationPropertyComponentCount(param1);
  962. // Push the return value onto the stack.
  963. lua_pushunsigned(state, result);
  964. return 1;
  965. }
  966. lua_pushstring(state, "lua_Form_getAnimationPropertyComponentCount - Failed to match the given parameters to a valid function signature.");
  967. lua_error(state);
  968. break;
  969. }
  970. default:
  971. {
  972. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  973. lua_error(state);
  974. break;
  975. }
  976. }
  977. return 0;
  978. }
  979. int lua_Form_getAnimationPropertyValue(lua_State* state)
  980. {
  981. // Get the number of parameters.
  982. int paramCount = lua_gettop(state);
  983. // Attempt to match the parameters to a valid binding.
  984. switch (paramCount)
  985. {
  986. case 3:
  987. {
  988. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  989. lua_type(state, 2) == LUA_TNUMBER &&
  990. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  991. {
  992. // Get parameter 1 off the stack.
  993. int param1 = (int)luaL_checkint(state, 2);
  994. // Get parameter 2 off the stack.
  995. bool param2Valid;
  996. gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
  997. if (!param2Valid)
  998. {
  999. lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
  1000. lua_error(state);
  1001. }
  1002. Form* instance = getInstance(state);
  1003. instance->getAnimationPropertyValue(param1, param2);
  1004. return 0;
  1005. }
  1006. lua_pushstring(state, "lua_Form_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  1007. lua_error(state);
  1008. break;
  1009. }
  1010. default:
  1011. {
  1012. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1013. lua_error(state);
  1014. break;
  1015. }
  1016. }
  1017. return 0;
  1018. }
  1019. int lua_Form_getAutoHeight(lua_State* state)
  1020. {
  1021. // Get the number of parameters.
  1022. int paramCount = lua_gettop(state);
  1023. // Attempt to match the parameters to a valid binding.
  1024. switch (paramCount)
  1025. {
  1026. case 1:
  1027. {
  1028. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1029. {
  1030. Form* instance = getInstance(state);
  1031. Control::AutoSize result = instance->getAutoHeight();
  1032. // Push the return value onto the stack.
  1033. lua_pushstring(state, lua_stringFromEnum_ControlAutoSize(result));
  1034. return 1;
  1035. }
  1036. lua_pushstring(state, "lua_Form_getAutoHeight - Failed to match the given parameters to a valid function signature.");
  1037. lua_error(state);
  1038. break;
  1039. }
  1040. default:
  1041. {
  1042. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1043. lua_error(state);
  1044. break;
  1045. }
  1046. }
  1047. return 0;
  1048. }
  1049. int lua_Form_getAutoWidth(lua_State* state)
  1050. {
  1051. // Get the number of parameters.
  1052. int paramCount = lua_gettop(state);
  1053. // Attempt to match the parameters to a valid binding.
  1054. switch (paramCount)
  1055. {
  1056. case 1:
  1057. {
  1058. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1059. {
  1060. Form* instance = getInstance(state);
  1061. Control::AutoSize result = instance->getAutoWidth();
  1062. // Push the return value onto the stack.
  1063. lua_pushstring(state, lua_stringFromEnum_ControlAutoSize(result));
  1064. return 1;
  1065. }
  1066. lua_pushstring(state, "lua_Form_getAutoWidth - Failed to match the given parameters to a valid function signature.");
  1067. lua_error(state);
  1068. break;
  1069. }
  1070. default:
  1071. {
  1072. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1073. lua_error(state);
  1074. break;
  1075. }
  1076. }
  1077. return 0;
  1078. }
  1079. int lua_Form_getBorder(lua_State* state)
  1080. {
  1081. // Get the number of parameters.
  1082. int paramCount = lua_gettop(state);
  1083. // Attempt to match the parameters to a valid binding.
  1084. switch (paramCount)
  1085. {
  1086. case 1:
  1087. {
  1088. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1089. {
  1090. Form* instance = getInstance(state);
  1091. void* returnPtr = (void*)&(instance->getBorder());
  1092. if (returnPtr)
  1093. {
  1094. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1095. object->instance = returnPtr;
  1096. object->owns = false;
  1097. luaL_getmetatable(state, "ThemeSideRegions");
  1098. lua_setmetatable(state, -2);
  1099. }
  1100. else
  1101. {
  1102. lua_pushnil(state);
  1103. }
  1104. return 1;
  1105. }
  1106. lua_pushstring(state, "lua_Form_getBorder - Failed to match the given parameters to a valid function signature.");
  1107. lua_error(state);
  1108. break;
  1109. }
  1110. case 2:
  1111. {
  1112. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1113. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1114. {
  1115. // Get parameter 1 off the stack.
  1116. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1117. Form* instance = getInstance(state);
  1118. void* returnPtr = (void*)&(instance->getBorder(param1));
  1119. if (returnPtr)
  1120. {
  1121. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1122. object->instance = returnPtr;
  1123. object->owns = false;
  1124. luaL_getmetatable(state, "ThemeSideRegions");
  1125. lua_setmetatable(state, -2);
  1126. }
  1127. else
  1128. {
  1129. lua_pushnil(state);
  1130. }
  1131. return 1;
  1132. }
  1133. lua_pushstring(state, "lua_Form_getBorder - Failed to match the given parameters to a valid function signature.");
  1134. lua_error(state);
  1135. break;
  1136. }
  1137. default:
  1138. {
  1139. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1140. lua_error(state);
  1141. break;
  1142. }
  1143. }
  1144. return 0;
  1145. }
  1146. int lua_Form_getBounds(lua_State* state)
  1147. {
  1148. // Get the number of parameters.
  1149. int paramCount = lua_gettop(state);
  1150. // Attempt to match the parameters to a valid binding.
  1151. switch (paramCount)
  1152. {
  1153. case 1:
  1154. {
  1155. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1156. {
  1157. Form* instance = getInstance(state);
  1158. void* returnPtr = (void*)&(instance->getBounds());
  1159. if (returnPtr)
  1160. {
  1161. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1162. object->instance = returnPtr;
  1163. object->owns = false;
  1164. luaL_getmetatable(state, "Rectangle");
  1165. lua_setmetatable(state, -2);
  1166. }
  1167. else
  1168. {
  1169. lua_pushnil(state);
  1170. }
  1171. return 1;
  1172. }
  1173. lua_pushstring(state, "lua_Form_getBounds - Failed to match the given parameters to a valid function signature.");
  1174. lua_error(state);
  1175. break;
  1176. }
  1177. default:
  1178. {
  1179. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1180. lua_error(state);
  1181. break;
  1182. }
  1183. }
  1184. return 0;
  1185. }
  1186. int lua_Form_getClip(lua_State* state)
  1187. {
  1188. // Get the number of parameters.
  1189. int paramCount = lua_gettop(state);
  1190. // Attempt to match the parameters to a valid binding.
  1191. switch (paramCount)
  1192. {
  1193. case 1:
  1194. {
  1195. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1196. {
  1197. Form* instance = getInstance(state);
  1198. void* returnPtr = (void*)&(instance->getClip());
  1199. if (returnPtr)
  1200. {
  1201. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1202. object->instance = returnPtr;
  1203. object->owns = false;
  1204. luaL_getmetatable(state, "Rectangle");
  1205. lua_setmetatable(state, -2);
  1206. }
  1207. else
  1208. {
  1209. lua_pushnil(state);
  1210. }
  1211. return 1;
  1212. }
  1213. lua_pushstring(state, "lua_Form_getClip - Failed to match the given parameters to a valid function signature.");
  1214. lua_error(state);
  1215. break;
  1216. }
  1217. default:
  1218. {
  1219. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1220. lua_error(state);
  1221. break;
  1222. }
  1223. }
  1224. return 0;
  1225. }
  1226. int lua_Form_getClipBounds(lua_State* state)
  1227. {
  1228. // Get the number of parameters.
  1229. int paramCount = lua_gettop(state);
  1230. // Attempt to match the parameters to a valid binding.
  1231. switch (paramCount)
  1232. {
  1233. case 1:
  1234. {
  1235. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1236. {
  1237. Form* instance = getInstance(state);
  1238. void* returnPtr = (void*)&(instance->getClipBounds());
  1239. if (returnPtr)
  1240. {
  1241. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1242. object->instance = returnPtr;
  1243. object->owns = false;
  1244. luaL_getmetatable(state, "Rectangle");
  1245. lua_setmetatable(state, -2);
  1246. }
  1247. else
  1248. {
  1249. lua_pushnil(state);
  1250. }
  1251. return 1;
  1252. }
  1253. lua_pushstring(state, "lua_Form_getClipBounds - Failed to match the given parameters to a valid function signature.");
  1254. lua_error(state);
  1255. break;
  1256. }
  1257. default:
  1258. {
  1259. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1260. lua_error(state);
  1261. break;
  1262. }
  1263. }
  1264. return 0;
  1265. }
  1266. int lua_Form_getConsumeInputEvents(lua_State* state)
  1267. {
  1268. // Get the number of parameters.
  1269. int paramCount = lua_gettop(state);
  1270. // Attempt to match the parameters to a valid binding.
  1271. switch (paramCount)
  1272. {
  1273. case 1:
  1274. {
  1275. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1276. {
  1277. Form* instance = getInstance(state);
  1278. bool result = instance->getConsumeInputEvents();
  1279. // Push the return value onto the stack.
  1280. lua_pushboolean(state, result);
  1281. return 1;
  1282. }
  1283. lua_pushstring(state, "lua_Form_getConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  1284. lua_error(state);
  1285. break;
  1286. }
  1287. default:
  1288. {
  1289. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1290. lua_error(state);
  1291. break;
  1292. }
  1293. }
  1294. return 0;
  1295. }
  1296. int lua_Form_getControl(lua_State* state)
  1297. {
  1298. // Get the number of parameters.
  1299. int paramCount = lua_gettop(state);
  1300. // Attempt to match the parameters to a valid binding.
  1301. switch (paramCount)
  1302. {
  1303. case 2:
  1304. {
  1305. do
  1306. {
  1307. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1308. lua_type(state, 2) == LUA_TNUMBER)
  1309. {
  1310. // Get parameter 1 off the stack.
  1311. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  1312. Form* instance = getInstance(state);
  1313. void* returnPtr = (void*)instance->getControl(param1);
  1314. if (returnPtr)
  1315. {
  1316. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1317. object->instance = returnPtr;
  1318. object->owns = false;
  1319. luaL_getmetatable(state, "Control");
  1320. lua_setmetatable(state, -2);
  1321. }
  1322. else
  1323. {
  1324. lua_pushnil(state);
  1325. }
  1326. return 1;
  1327. }
  1328. } while (0);
  1329. do
  1330. {
  1331. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1332. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1333. {
  1334. // Get parameter 1 off the stack.
  1335. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1336. Form* instance = getInstance(state);
  1337. void* returnPtr = (void*)instance->getControl(param1);
  1338. if (returnPtr)
  1339. {
  1340. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1341. object->instance = returnPtr;
  1342. object->owns = false;
  1343. luaL_getmetatable(state, "Control");
  1344. lua_setmetatable(state, -2);
  1345. }
  1346. else
  1347. {
  1348. lua_pushnil(state);
  1349. }
  1350. return 1;
  1351. }
  1352. } while (0);
  1353. lua_pushstring(state, "lua_Form_getControl - Failed to match the given parameters to a valid function signature.");
  1354. lua_error(state);
  1355. break;
  1356. }
  1357. default:
  1358. {
  1359. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1360. lua_error(state);
  1361. break;
  1362. }
  1363. }
  1364. return 0;
  1365. }
  1366. int lua_Form_getControlCount(lua_State* state)
  1367. {
  1368. // Get the number of parameters.
  1369. int paramCount = lua_gettop(state);
  1370. // Attempt to match the parameters to a valid binding.
  1371. switch (paramCount)
  1372. {
  1373. case 1:
  1374. {
  1375. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1376. {
  1377. Form* instance = getInstance(state);
  1378. unsigned int result = instance->getControlCount();
  1379. // Push the return value onto the stack.
  1380. lua_pushunsigned(state, result);
  1381. return 1;
  1382. }
  1383. lua_pushstring(state, "lua_Form_getControlCount - Failed to match the given parameters to a valid function signature.");
  1384. lua_error(state);
  1385. break;
  1386. }
  1387. default:
  1388. {
  1389. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1390. lua_error(state);
  1391. break;
  1392. }
  1393. }
  1394. return 0;
  1395. }
  1396. int lua_Form_getCursorColor(lua_State* state)
  1397. {
  1398. // Get the number of parameters.
  1399. int paramCount = lua_gettop(state);
  1400. // Attempt to match the parameters to a valid binding.
  1401. switch (paramCount)
  1402. {
  1403. case 2:
  1404. {
  1405. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1406. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1407. {
  1408. // Get parameter 1 off the stack.
  1409. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1410. Form* instance = getInstance(state);
  1411. void* returnPtr = (void*)&(instance->getCursorColor(param1));
  1412. if (returnPtr)
  1413. {
  1414. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1415. object->instance = returnPtr;
  1416. object->owns = false;
  1417. luaL_getmetatable(state, "Vector4");
  1418. lua_setmetatable(state, -2);
  1419. }
  1420. else
  1421. {
  1422. lua_pushnil(state);
  1423. }
  1424. return 1;
  1425. }
  1426. lua_pushstring(state, "lua_Form_getCursorColor - Failed to match the given parameters to a valid function signature.");
  1427. lua_error(state);
  1428. break;
  1429. }
  1430. default:
  1431. {
  1432. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1433. lua_error(state);
  1434. break;
  1435. }
  1436. }
  1437. return 0;
  1438. }
  1439. int lua_Form_getCursorRegion(lua_State* state)
  1440. {
  1441. // Get the number of parameters.
  1442. int paramCount = lua_gettop(state);
  1443. // Attempt to match the parameters to a valid binding.
  1444. switch (paramCount)
  1445. {
  1446. case 2:
  1447. {
  1448. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1449. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1450. {
  1451. // Get parameter 1 off the stack.
  1452. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1453. Form* instance = getInstance(state);
  1454. void* returnPtr = (void*)&(instance->getCursorRegion(param1));
  1455. if (returnPtr)
  1456. {
  1457. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1458. object->instance = returnPtr;
  1459. object->owns = false;
  1460. luaL_getmetatable(state, "Rectangle");
  1461. lua_setmetatable(state, -2);
  1462. }
  1463. else
  1464. {
  1465. lua_pushnil(state);
  1466. }
  1467. return 1;
  1468. }
  1469. lua_pushstring(state, "lua_Form_getCursorRegion - Failed to match the given parameters to a valid function signature.");
  1470. lua_error(state);
  1471. break;
  1472. }
  1473. default:
  1474. {
  1475. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1476. lua_error(state);
  1477. break;
  1478. }
  1479. }
  1480. return 0;
  1481. }
  1482. int lua_Form_getCursorUVs(lua_State* state)
  1483. {
  1484. // Get the number of parameters.
  1485. int paramCount = lua_gettop(state);
  1486. // Attempt to match the parameters to a valid binding.
  1487. switch (paramCount)
  1488. {
  1489. case 2:
  1490. {
  1491. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1492. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1493. {
  1494. // Get parameter 1 off the stack.
  1495. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1496. Form* instance = getInstance(state);
  1497. void* returnPtr = (void*)&(instance->getCursorUVs(param1));
  1498. if (returnPtr)
  1499. {
  1500. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1501. object->instance = returnPtr;
  1502. object->owns = false;
  1503. luaL_getmetatable(state, "ThemeUVs");
  1504. lua_setmetatable(state, -2);
  1505. }
  1506. else
  1507. {
  1508. lua_pushnil(state);
  1509. }
  1510. return 1;
  1511. }
  1512. lua_pushstring(state, "lua_Form_getCursorUVs - Failed to match the given parameters to a valid function signature.");
  1513. lua_error(state);
  1514. break;
  1515. }
  1516. default:
  1517. {
  1518. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1519. lua_error(state);
  1520. break;
  1521. }
  1522. }
  1523. return 0;
  1524. }
  1525. int lua_Form_getFocusIndex(lua_State* state)
  1526. {
  1527. // Get the number of parameters.
  1528. int paramCount = lua_gettop(state);
  1529. // Attempt to match the parameters to a valid binding.
  1530. switch (paramCount)
  1531. {
  1532. case 1:
  1533. {
  1534. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1535. {
  1536. Form* instance = getInstance(state);
  1537. int result = instance->getFocusIndex();
  1538. // Push the return value onto the stack.
  1539. lua_pushinteger(state, result);
  1540. return 1;
  1541. }
  1542. lua_pushstring(state, "lua_Form_getFocusIndex - Failed to match the given parameters to a valid function signature.");
  1543. lua_error(state);
  1544. break;
  1545. }
  1546. default:
  1547. {
  1548. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1549. lua_error(state);
  1550. break;
  1551. }
  1552. }
  1553. return 0;
  1554. }
  1555. int lua_Form_getFont(lua_State* state)
  1556. {
  1557. // Get the number of parameters.
  1558. int paramCount = lua_gettop(state);
  1559. // Attempt to match the parameters to a valid binding.
  1560. switch (paramCount)
  1561. {
  1562. case 1:
  1563. {
  1564. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1565. {
  1566. Form* instance = getInstance(state);
  1567. void* returnPtr = (void*)instance->getFont();
  1568. if (returnPtr)
  1569. {
  1570. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1571. object->instance = returnPtr;
  1572. object->owns = false;
  1573. luaL_getmetatable(state, "Font");
  1574. lua_setmetatable(state, -2);
  1575. }
  1576. else
  1577. {
  1578. lua_pushnil(state);
  1579. }
  1580. return 1;
  1581. }
  1582. lua_pushstring(state, "lua_Form_getFont - Failed to match the given parameters to a valid function signature.");
  1583. lua_error(state);
  1584. break;
  1585. }
  1586. case 2:
  1587. {
  1588. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1589. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1590. {
  1591. // Get parameter 1 off the stack.
  1592. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1593. Form* instance = getInstance(state);
  1594. void* returnPtr = (void*)instance->getFont(param1);
  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, "Font");
  1601. lua_setmetatable(state, -2);
  1602. }
  1603. else
  1604. {
  1605. lua_pushnil(state);
  1606. }
  1607. return 1;
  1608. }
  1609. lua_pushstring(state, "lua_Form_getFont - 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 1 or 2).");
  1616. lua_error(state);
  1617. break;
  1618. }
  1619. }
  1620. return 0;
  1621. }
  1622. int lua_Form_getFontSize(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. Form* instance = getInstance(state);
  1634. unsigned int result = instance->getFontSize();
  1635. // Push the return value onto the stack.
  1636. lua_pushunsigned(state, result);
  1637. return 1;
  1638. }
  1639. lua_pushstring(state, "lua_Form_getFontSize - Failed to match the given parameters to a valid function signature.");
  1640. lua_error(state);
  1641. break;
  1642. }
  1643. case 2:
  1644. {
  1645. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1646. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1647. {
  1648. // Get parameter 1 off the stack.
  1649. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1650. Form* instance = getInstance(state);
  1651. unsigned int result = instance->getFontSize(param1);
  1652. // Push the return value onto the stack.
  1653. lua_pushunsigned(state, result);
  1654. return 1;
  1655. }
  1656. lua_pushstring(state, "lua_Form_getFontSize - Failed to match the given parameters to a valid function signature.");
  1657. lua_error(state);
  1658. break;
  1659. }
  1660. default:
  1661. {
  1662. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1663. lua_error(state);
  1664. break;
  1665. }
  1666. }
  1667. return 0;
  1668. }
  1669. int lua_Form_getHeight(lua_State* state)
  1670. {
  1671. // Get the number of parameters.
  1672. int paramCount = lua_gettop(state);
  1673. // Attempt to match the parameters to a valid binding.
  1674. switch (paramCount)
  1675. {
  1676. case 1:
  1677. {
  1678. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1679. {
  1680. Form* instance = getInstance(state);
  1681. float result = instance->getHeight();
  1682. // Push the return value onto the stack.
  1683. lua_pushnumber(state, result);
  1684. return 1;
  1685. }
  1686. lua_pushstring(state, "lua_Form_getHeight - Failed to match the given parameters to a valid function signature.");
  1687. lua_error(state);
  1688. break;
  1689. }
  1690. default:
  1691. {
  1692. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1693. lua_error(state);
  1694. break;
  1695. }
  1696. }
  1697. return 0;
  1698. }
  1699. int lua_Form_getId(lua_State* state)
  1700. {
  1701. // Get the number of parameters.
  1702. int paramCount = lua_gettop(state);
  1703. // Attempt to match the parameters to a valid binding.
  1704. switch (paramCount)
  1705. {
  1706. case 1:
  1707. {
  1708. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1709. {
  1710. Form* instance = getInstance(state);
  1711. const char* result = instance->getId();
  1712. // Push the return value onto the stack.
  1713. lua_pushstring(state, result);
  1714. return 1;
  1715. }
  1716. lua_pushstring(state, "lua_Form_getId - Failed to match the given parameters to a valid function signature.");
  1717. lua_error(state);
  1718. break;
  1719. }
  1720. default:
  1721. {
  1722. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1723. lua_error(state);
  1724. break;
  1725. }
  1726. }
  1727. return 0;
  1728. }
  1729. int lua_Form_getImageColor(lua_State* state)
  1730. {
  1731. // Get the number of parameters.
  1732. int paramCount = lua_gettop(state);
  1733. // Attempt to match the parameters to a valid binding.
  1734. switch (paramCount)
  1735. {
  1736. case 3:
  1737. {
  1738. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1739. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1740. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1741. {
  1742. // Get parameter 1 off the stack.
  1743. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1744. // Get parameter 2 off the stack.
  1745. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1746. Form* instance = getInstance(state);
  1747. void* returnPtr = (void*)&(instance->getImageColor(param1, param2));
  1748. if (returnPtr)
  1749. {
  1750. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1751. object->instance = returnPtr;
  1752. object->owns = false;
  1753. luaL_getmetatable(state, "Vector4");
  1754. lua_setmetatable(state, -2);
  1755. }
  1756. else
  1757. {
  1758. lua_pushnil(state);
  1759. }
  1760. return 1;
  1761. }
  1762. lua_pushstring(state, "lua_Form_getImageColor - Failed to match the given parameters to a valid function signature.");
  1763. lua_error(state);
  1764. break;
  1765. }
  1766. default:
  1767. {
  1768. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1769. lua_error(state);
  1770. break;
  1771. }
  1772. }
  1773. return 0;
  1774. }
  1775. int lua_Form_getImageRegion(lua_State* state)
  1776. {
  1777. // Get the number of parameters.
  1778. int paramCount = lua_gettop(state);
  1779. // Attempt to match the parameters to a valid binding.
  1780. switch (paramCount)
  1781. {
  1782. case 3:
  1783. {
  1784. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1785. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1786. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1787. {
  1788. // Get parameter 1 off the stack.
  1789. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1790. // Get parameter 2 off the stack.
  1791. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1792. Form* instance = getInstance(state);
  1793. void* returnPtr = (void*)&(instance->getImageRegion(param1, param2));
  1794. if (returnPtr)
  1795. {
  1796. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1797. object->instance = returnPtr;
  1798. object->owns = false;
  1799. luaL_getmetatable(state, "Rectangle");
  1800. lua_setmetatable(state, -2);
  1801. }
  1802. else
  1803. {
  1804. lua_pushnil(state);
  1805. }
  1806. return 1;
  1807. }
  1808. lua_pushstring(state, "lua_Form_getImageRegion - Failed to match the given parameters to a valid function signature.");
  1809. lua_error(state);
  1810. break;
  1811. }
  1812. default:
  1813. {
  1814. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1815. lua_error(state);
  1816. break;
  1817. }
  1818. }
  1819. return 0;
  1820. }
  1821. int lua_Form_getImageUVs(lua_State* state)
  1822. {
  1823. // Get the number of parameters.
  1824. int paramCount = lua_gettop(state);
  1825. // Attempt to match the parameters to a valid binding.
  1826. switch (paramCount)
  1827. {
  1828. case 3:
  1829. {
  1830. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1831. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1832. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1833. {
  1834. // Get parameter 1 off the stack.
  1835. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1836. // Get parameter 2 off the stack.
  1837. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1838. Form* instance = getInstance(state);
  1839. void* returnPtr = (void*)&(instance->getImageUVs(param1, param2));
  1840. if (returnPtr)
  1841. {
  1842. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1843. object->instance = returnPtr;
  1844. object->owns = false;
  1845. luaL_getmetatable(state, "ThemeUVs");
  1846. lua_setmetatable(state, -2);
  1847. }
  1848. else
  1849. {
  1850. lua_pushnil(state);
  1851. }
  1852. return 1;
  1853. }
  1854. lua_pushstring(state, "lua_Form_getImageUVs - Failed to match the given parameters to a valid function signature.");
  1855. lua_error(state);
  1856. break;
  1857. }
  1858. default:
  1859. {
  1860. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1861. lua_error(state);
  1862. break;
  1863. }
  1864. }
  1865. return 0;
  1866. }
  1867. int lua_Form_getLayout(lua_State* state)
  1868. {
  1869. // Get the number of parameters.
  1870. int paramCount = lua_gettop(state);
  1871. // Attempt to match the parameters to a valid binding.
  1872. switch (paramCount)
  1873. {
  1874. case 1:
  1875. {
  1876. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1877. {
  1878. Form* instance = getInstance(state);
  1879. void* returnPtr = (void*)instance->getLayout();
  1880. if (returnPtr)
  1881. {
  1882. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1883. object->instance = returnPtr;
  1884. object->owns = false;
  1885. luaL_getmetatable(state, "Layout");
  1886. lua_setmetatable(state, -2);
  1887. }
  1888. else
  1889. {
  1890. lua_pushnil(state);
  1891. }
  1892. return 1;
  1893. }
  1894. lua_pushstring(state, "lua_Form_getLayout - Failed to match the given parameters to a valid function signature.");
  1895. lua_error(state);
  1896. break;
  1897. }
  1898. default:
  1899. {
  1900. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1901. lua_error(state);
  1902. break;
  1903. }
  1904. }
  1905. return 0;
  1906. }
  1907. int lua_Form_getMargin(lua_State* state)
  1908. {
  1909. // Get the number of parameters.
  1910. int paramCount = lua_gettop(state);
  1911. // Attempt to match the parameters to a valid binding.
  1912. switch (paramCount)
  1913. {
  1914. case 1:
  1915. {
  1916. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1917. {
  1918. Form* instance = getInstance(state);
  1919. void* returnPtr = (void*)&(instance->getMargin());
  1920. if (returnPtr)
  1921. {
  1922. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1923. object->instance = returnPtr;
  1924. object->owns = false;
  1925. luaL_getmetatable(state, "ThemeSideRegions");
  1926. lua_setmetatable(state, -2);
  1927. }
  1928. else
  1929. {
  1930. lua_pushnil(state);
  1931. }
  1932. return 1;
  1933. }
  1934. lua_pushstring(state, "lua_Form_getMargin - Failed to match the given parameters to a valid function signature.");
  1935. lua_error(state);
  1936. break;
  1937. }
  1938. default:
  1939. {
  1940. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1941. lua_error(state);
  1942. break;
  1943. }
  1944. }
  1945. return 0;
  1946. }
  1947. int lua_Form_getOpacity(lua_State* state)
  1948. {
  1949. // Get the number of parameters.
  1950. int paramCount = lua_gettop(state);
  1951. // Attempt to match the parameters to a valid binding.
  1952. switch (paramCount)
  1953. {
  1954. case 1:
  1955. {
  1956. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1957. {
  1958. Form* instance = getInstance(state);
  1959. float result = instance->getOpacity();
  1960. // Push the return value onto the stack.
  1961. lua_pushnumber(state, result);
  1962. return 1;
  1963. }
  1964. lua_pushstring(state, "lua_Form_getOpacity - Failed to match the given parameters to a valid function signature.");
  1965. lua_error(state);
  1966. break;
  1967. }
  1968. case 2:
  1969. {
  1970. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1971. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1972. {
  1973. // Get parameter 1 off the stack.
  1974. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1975. Form* instance = getInstance(state);
  1976. float result = instance->getOpacity(param1);
  1977. // Push the return value onto the stack.
  1978. lua_pushnumber(state, result);
  1979. return 1;
  1980. }
  1981. lua_pushstring(state, "lua_Form_getOpacity - Failed to match the given parameters to a valid function signature.");
  1982. lua_error(state);
  1983. break;
  1984. }
  1985. default:
  1986. {
  1987. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1988. lua_error(state);
  1989. break;
  1990. }
  1991. }
  1992. return 0;
  1993. }
  1994. int lua_Form_getPadding(lua_State* state)
  1995. {
  1996. // Get the number of parameters.
  1997. int paramCount = lua_gettop(state);
  1998. // Attempt to match the parameters to a valid binding.
  1999. switch (paramCount)
  2000. {
  2001. case 1:
  2002. {
  2003. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2004. {
  2005. Form* instance = getInstance(state);
  2006. void* returnPtr = (void*)&(instance->getPadding());
  2007. if (returnPtr)
  2008. {
  2009. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2010. object->instance = returnPtr;
  2011. object->owns = false;
  2012. luaL_getmetatable(state, "ThemeSideRegions");
  2013. lua_setmetatable(state, -2);
  2014. }
  2015. else
  2016. {
  2017. lua_pushnil(state);
  2018. }
  2019. return 1;
  2020. }
  2021. lua_pushstring(state, "lua_Form_getPadding - Failed to match the given parameters to a valid function signature.");
  2022. lua_error(state);
  2023. break;
  2024. }
  2025. default:
  2026. {
  2027. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2028. lua_error(state);
  2029. break;
  2030. }
  2031. }
  2032. return 0;
  2033. }
  2034. int lua_Form_getParent(lua_State* state)
  2035. {
  2036. // Get the number of parameters.
  2037. int paramCount = lua_gettop(state);
  2038. // Attempt to match the parameters to a valid binding.
  2039. switch (paramCount)
  2040. {
  2041. case 1:
  2042. {
  2043. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2044. {
  2045. Form* instance = getInstance(state);
  2046. void* returnPtr = (void*)instance->getParent();
  2047. if (returnPtr)
  2048. {
  2049. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2050. object->instance = returnPtr;
  2051. object->owns = false;
  2052. luaL_getmetatable(state, "Control");
  2053. lua_setmetatable(state, -2);
  2054. }
  2055. else
  2056. {
  2057. lua_pushnil(state);
  2058. }
  2059. return 1;
  2060. }
  2061. lua_pushstring(state, "lua_Form_getParent - Failed to match the given parameters to a valid function signature.");
  2062. lua_error(state);
  2063. break;
  2064. }
  2065. default:
  2066. {
  2067. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2068. lua_error(state);
  2069. break;
  2070. }
  2071. }
  2072. return 0;
  2073. }
  2074. int lua_Form_getRefCount(lua_State* state)
  2075. {
  2076. // Get the number of parameters.
  2077. int paramCount = lua_gettop(state);
  2078. // Attempt to match the parameters to a valid binding.
  2079. switch (paramCount)
  2080. {
  2081. case 1:
  2082. {
  2083. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2084. {
  2085. Form* instance = getInstance(state);
  2086. unsigned int result = instance->getRefCount();
  2087. // Push the return value onto the stack.
  2088. lua_pushunsigned(state, result);
  2089. return 1;
  2090. }
  2091. lua_pushstring(state, "lua_Form_getRefCount - Failed to match the given parameters to a valid function signature.");
  2092. lua_error(state);
  2093. break;
  2094. }
  2095. default:
  2096. {
  2097. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2098. lua_error(state);
  2099. break;
  2100. }
  2101. }
  2102. return 0;
  2103. }
  2104. int lua_Form_getScroll(lua_State* state)
  2105. {
  2106. // Get the number of parameters.
  2107. int paramCount = lua_gettop(state);
  2108. // Attempt to match the parameters to a valid binding.
  2109. switch (paramCount)
  2110. {
  2111. case 1:
  2112. {
  2113. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2114. {
  2115. Form* instance = getInstance(state);
  2116. Container::Scroll result = instance->getScroll();
  2117. // Push the return value onto the stack.
  2118. lua_pushstring(state, lua_stringFromEnum_ContainerScroll(result));
  2119. return 1;
  2120. }
  2121. lua_pushstring(state, "lua_Form_getScroll - Failed to match the given parameters to a valid function signature.");
  2122. lua_error(state);
  2123. break;
  2124. }
  2125. default:
  2126. {
  2127. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2128. lua_error(state);
  2129. break;
  2130. }
  2131. }
  2132. return 0;
  2133. }
  2134. int lua_Form_getScrollPosition(lua_State* state)
  2135. {
  2136. // Get the number of parameters.
  2137. int paramCount = lua_gettop(state);
  2138. // Attempt to match the parameters to a valid binding.
  2139. switch (paramCount)
  2140. {
  2141. case 1:
  2142. {
  2143. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2144. {
  2145. Form* instance = getInstance(state);
  2146. void* returnPtr = (void*)&(instance->getScrollPosition());
  2147. if (returnPtr)
  2148. {
  2149. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2150. object->instance = returnPtr;
  2151. object->owns = false;
  2152. luaL_getmetatable(state, "Vector2");
  2153. lua_setmetatable(state, -2);
  2154. }
  2155. else
  2156. {
  2157. lua_pushnil(state);
  2158. }
  2159. return 1;
  2160. }
  2161. lua_pushstring(state, "lua_Form_getScrollPosition - Failed to match the given parameters to a valid function signature.");
  2162. lua_error(state);
  2163. break;
  2164. }
  2165. default:
  2166. {
  2167. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2168. lua_error(state);
  2169. break;
  2170. }
  2171. }
  2172. return 0;
  2173. }
  2174. int lua_Form_getScrollWheelRequiresFocus(lua_State* state)
  2175. {
  2176. // Get the number of parameters.
  2177. int paramCount = lua_gettop(state);
  2178. // Attempt to match the parameters to a valid binding.
  2179. switch (paramCount)
  2180. {
  2181. case 1:
  2182. {
  2183. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2184. {
  2185. Form* instance = getInstance(state);
  2186. bool result = instance->getScrollWheelRequiresFocus();
  2187. // Push the return value onto the stack.
  2188. lua_pushboolean(state, result);
  2189. return 1;
  2190. }
  2191. lua_pushstring(state, "lua_Form_getScrollWheelRequiresFocus - Failed to match the given parameters to a valid function signature.");
  2192. lua_error(state);
  2193. break;
  2194. }
  2195. default:
  2196. {
  2197. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2198. lua_error(state);
  2199. break;
  2200. }
  2201. }
  2202. return 0;
  2203. }
  2204. int lua_Form_getScrollWheelSpeed(lua_State* state)
  2205. {
  2206. // Get the number of parameters.
  2207. int paramCount = lua_gettop(state);
  2208. // Attempt to match the parameters to a valid binding.
  2209. switch (paramCount)
  2210. {
  2211. case 1:
  2212. {
  2213. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2214. {
  2215. Form* instance = getInstance(state);
  2216. float result = instance->getScrollWheelSpeed();
  2217. // Push the return value onto the stack.
  2218. lua_pushnumber(state, result);
  2219. return 1;
  2220. }
  2221. lua_pushstring(state, "lua_Form_getScrollWheelSpeed - Failed to match the given parameters to a valid function signature.");
  2222. lua_error(state);
  2223. break;
  2224. }
  2225. default:
  2226. {
  2227. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2228. lua_error(state);
  2229. break;
  2230. }
  2231. }
  2232. return 0;
  2233. }
  2234. int lua_Form_getScrollingFriction(lua_State* state)
  2235. {
  2236. // Get the number of parameters.
  2237. int paramCount = lua_gettop(state);
  2238. // Attempt to match the parameters to a valid binding.
  2239. switch (paramCount)
  2240. {
  2241. case 1:
  2242. {
  2243. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2244. {
  2245. Form* instance = getInstance(state);
  2246. float result = instance->getScrollingFriction();
  2247. // Push the return value onto the stack.
  2248. lua_pushnumber(state, result);
  2249. return 1;
  2250. }
  2251. lua_pushstring(state, "lua_Form_getScrollingFriction - Failed to match the given parameters to a valid function signature.");
  2252. lua_error(state);
  2253. break;
  2254. }
  2255. default:
  2256. {
  2257. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2258. lua_error(state);
  2259. break;
  2260. }
  2261. }
  2262. return 0;
  2263. }
  2264. int lua_Form_getSkinColor(lua_State* state)
  2265. {
  2266. // Get the number of parameters.
  2267. int paramCount = lua_gettop(state);
  2268. // Attempt to match the parameters to a valid binding.
  2269. switch (paramCount)
  2270. {
  2271. case 1:
  2272. {
  2273. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2274. {
  2275. Form* instance = getInstance(state);
  2276. void* returnPtr = (void*)&(instance->getSkinColor());
  2277. if (returnPtr)
  2278. {
  2279. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2280. object->instance = returnPtr;
  2281. object->owns = false;
  2282. luaL_getmetatable(state, "Vector4");
  2283. lua_setmetatable(state, -2);
  2284. }
  2285. else
  2286. {
  2287. lua_pushnil(state);
  2288. }
  2289. return 1;
  2290. }
  2291. lua_pushstring(state, "lua_Form_getSkinColor - Failed to match the given parameters to a valid function signature.");
  2292. lua_error(state);
  2293. break;
  2294. }
  2295. case 2:
  2296. {
  2297. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2298. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2299. {
  2300. // Get parameter 1 off the stack.
  2301. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2302. Form* instance = getInstance(state);
  2303. void* returnPtr = (void*)&(instance->getSkinColor(param1));
  2304. if (returnPtr)
  2305. {
  2306. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2307. object->instance = returnPtr;
  2308. object->owns = false;
  2309. luaL_getmetatable(state, "Vector4");
  2310. lua_setmetatable(state, -2);
  2311. }
  2312. else
  2313. {
  2314. lua_pushnil(state);
  2315. }
  2316. return 1;
  2317. }
  2318. lua_pushstring(state, "lua_Form_getSkinColor - Failed to match the given parameters to a valid function signature.");
  2319. lua_error(state);
  2320. break;
  2321. }
  2322. default:
  2323. {
  2324. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2325. lua_error(state);
  2326. break;
  2327. }
  2328. }
  2329. return 0;
  2330. }
  2331. int lua_Form_getSkinRegion(lua_State* state)
  2332. {
  2333. // Get the number of parameters.
  2334. int paramCount = lua_gettop(state);
  2335. // Attempt to match the parameters to a valid binding.
  2336. switch (paramCount)
  2337. {
  2338. case 1:
  2339. {
  2340. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2341. {
  2342. Form* instance = getInstance(state);
  2343. void* returnPtr = (void*)&(instance->getSkinRegion());
  2344. if (returnPtr)
  2345. {
  2346. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2347. object->instance = returnPtr;
  2348. object->owns = false;
  2349. luaL_getmetatable(state, "Rectangle");
  2350. lua_setmetatable(state, -2);
  2351. }
  2352. else
  2353. {
  2354. lua_pushnil(state);
  2355. }
  2356. return 1;
  2357. }
  2358. lua_pushstring(state, "lua_Form_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  2359. lua_error(state);
  2360. break;
  2361. }
  2362. case 2:
  2363. {
  2364. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2365. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2366. {
  2367. // Get parameter 1 off the stack.
  2368. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2369. Form* instance = getInstance(state);
  2370. void* returnPtr = (void*)&(instance->getSkinRegion(param1));
  2371. if (returnPtr)
  2372. {
  2373. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2374. object->instance = returnPtr;
  2375. object->owns = false;
  2376. luaL_getmetatable(state, "Rectangle");
  2377. lua_setmetatable(state, -2);
  2378. }
  2379. else
  2380. {
  2381. lua_pushnil(state);
  2382. }
  2383. return 1;
  2384. }
  2385. lua_pushstring(state, "lua_Form_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  2386. lua_error(state);
  2387. break;
  2388. }
  2389. default:
  2390. {
  2391. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2392. lua_error(state);
  2393. break;
  2394. }
  2395. }
  2396. return 0;
  2397. }
  2398. int lua_Form_getState(lua_State* state)
  2399. {
  2400. // Get the number of parameters.
  2401. int paramCount = lua_gettop(state);
  2402. // Attempt to match the parameters to a valid binding.
  2403. switch (paramCount)
  2404. {
  2405. case 1:
  2406. {
  2407. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2408. {
  2409. Form* instance = getInstance(state);
  2410. Control::State result = instance->getState();
  2411. // Push the return value onto the stack.
  2412. lua_pushstring(state, lua_stringFromEnum_ControlState(result));
  2413. return 1;
  2414. }
  2415. lua_pushstring(state, "lua_Form_getState - Failed to match the given parameters to a valid function signature.");
  2416. lua_error(state);
  2417. break;
  2418. }
  2419. default:
  2420. {
  2421. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2422. lua_error(state);
  2423. break;
  2424. }
  2425. }
  2426. return 0;
  2427. }
  2428. int lua_Form_getStyle(lua_State* state)
  2429. {
  2430. // Get the number of parameters.
  2431. int paramCount = lua_gettop(state);
  2432. // Attempt to match the parameters to a valid binding.
  2433. switch (paramCount)
  2434. {
  2435. case 1:
  2436. {
  2437. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2438. {
  2439. Form* instance = getInstance(state);
  2440. void* returnPtr = (void*)instance->getStyle();
  2441. if (returnPtr)
  2442. {
  2443. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2444. object->instance = returnPtr;
  2445. object->owns = false;
  2446. luaL_getmetatable(state, "ThemeStyle");
  2447. lua_setmetatable(state, -2);
  2448. }
  2449. else
  2450. {
  2451. lua_pushnil(state);
  2452. }
  2453. return 1;
  2454. }
  2455. lua_pushstring(state, "lua_Form_getStyle - Failed to match the given parameters to a valid function signature.");
  2456. lua_error(state);
  2457. break;
  2458. }
  2459. default:
  2460. {
  2461. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2462. lua_error(state);
  2463. break;
  2464. }
  2465. }
  2466. return 0;
  2467. }
  2468. int lua_Form_getTextAlignment(lua_State* state)
  2469. {
  2470. // Get the number of parameters.
  2471. int paramCount = lua_gettop(state);
  2472. // Attempt to match the parameters to a valid binding.
  2473. switch (paramCount)
  2474. {
  2475. case 1:
  2476. {
  2477. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2478. {
  2479. Form* instance = getInstance(state);
  2480. Font::Justify result = instance->getTextAlignment();
  2481. // Push the return value onto the stack.
  2482. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2483. return 1;
  2484. }
  2485. lua_pushstring(state, "lua_Form_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2486. lua_error(state);
  2487. break;
  2488. }
  2489. case 2:
  2490. {
  2491. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2492. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2493. {
  2494. // Get parameter 1 off the stack.
  2495. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2496. Form* instance = getInstance(state);
  2497. Font::Justify result = instance->getTextAlignment(param1);
  2498. // Push the return value onto the stack.
  2499. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2500. return 1;
  2501. }
  2502. lua_pushstring(state, "lua_Form_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2503. lua_error(state);
  2504. break;
  2505. }
  2506. default:
  2507. {
  2508. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2509. lua_error(state);
  2510. break;
  2511. }
  2512. }
  2513. return 0;
  2514. }
  2515. int lua_Form_getTextColor(lua_State* state)
  2516. {
  2517. // Get the number of parameters.
  2518. int paramCount = lua_gettop(state);
  2519. // Attempt to match the parameters to a valid binding.
  2520. switch (paramCount)
  2521. {
  2522. case 1:
  2523. {
  2524. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2525. {
  2526. Form* instance = getInstance(state);
  2527. void* returnPtr = (void*)&(instance->getTextColor());
  2528. if (returnPtr)
  2529. {
  2530. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2531. object->instance = returnPtr;
  2532. object->owns = false;
  2533. luaL_getmetatable(state, "Vector4");
  2534. lua_setmetatable(state, -2);
  2535. }
  2536. else
  2537. {
  2538. lua_pushnil(state);
  2539. }
  2540. return 1;
  2541. }
  2542. lua_pushstring(state, "lua_Form_getTextColor - Failed to match the given parameters to a valid function signature.");
  2543. lua_error(state);
  2544. break;
  2545. }
  2546. case 2:
  2547. {
  2548. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2549. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2550. {
  2551. // Get parameter 1 off the stack.
  2552. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2553. Form* instance = getInstance(state);
  2554. void* returnPtr = (void*)&(instance->getTextColor(param1));
  2555. if (returnPtr)
  2556. {
  2557. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2558. object->instance = returnPtr;
  2559. object->owns = false;
  2560. luaL_getmetatable(state, "Vector4");
  2561. lua_setmetatable(state, -2);
  2562. }
  2563. else
  2564. {
  2565. lua_pushnil(state);
  2566. }
  2567. return 1;
  2568. }
  2569. lua_pushstring(state, "lua_Form_getTextColor - Failed to match the given parameters to a valid function signature.");
  2570. lua_error(state);
  2571. break;
  2572. }
  2573. default:
  2574. {
  2575. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2576. lua_error(state);
  2577. break;
  2578. }
  2579. }
  2580. return 0;
  2581. }
  2582. int lua_Form_getTextRightToLeft(lua_State* state)
  2583. {
  2584. // Get the number of parameters.
  2585. int paramCount = lua_gettop(state);
  2586. // Attempt to match the parameters to a valid binding.
  2587. switch (paramCount)
  2588. {
  2589. case 1:
  2590. {
  2591. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2592. {
  2593. Form* instance = getInstance(state);
  2594. bool result = instance->getTextRightToLeft();
  2595. // Push the return value onto the stack.
  2596. lua_pushboolean(state, result);
  2597. return 1;
  2598. }
  2599. lua_pushstring(state, "lua_Form_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2600. lua_error(state);
  2601. break;
  2602. }
  2603. case 2:
  2604. {
  2605. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2606. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2607. {
  2608. // Get parameter 1 off the stack.
  2609. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2610. Form* instance = getInstance(state);
  2611. bool result = instance->getTextRightToLeft(param1);
  2612. // Push the return value onto the stack.
  2613. lua_pushboolean(state, result);
  2614. return 1;
  2615. }
  2616. lua_pushstring(state, "lua_Form_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2617. lua_error(state);
  2618. break;
  2619. }
  2620. default:
  2621. {
  2622. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2623. lua_error(state);
  2624. break;
  2625. }
  2626. }
  2627. return 0;
  2628. }
  2629. int lua_Form_getTheme(lua_State* state)
  2630. {
  2631. // Get the number of parameters.
  2632. int paramCount = lua_gettop(state);
  2633. // Attempt to match the parameters to a valid binding.
  2634. switch (paramCount)
  2635. {
  2636. case 1:
  2637. {
  2638. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2639. {
  2640. Form* instance = getInstance(state);
  2641. void* returnPtr = (void*)instance->getTheme();
  2642. if (returnPtr)
  2643. {
  2644. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2645. object->instance = returnPtr;
  2646. object->owns = false;
  2647. luaL_getmetatable(state, "Theme");
  2648. lua_setmetatable(state, -2);
  2649. }
  2650. else
  2651. {
  2652. lua_pushnil(state);
  2653. }
  2654. return 1;
  2655. }
  2656. lua_pushstring(state, "lua_Form_getTheme - Failed to match the given parameters to a valid function signature.");
  2657. lua_error(state);
  2658. break;
  2659. }
  2660. default:
  2661. {
  2662. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2663. lua_error(state);
  2664. break;
  2665. }
  2666. }
  2667. return 0;
  2668. }
  2669. int lua_Form_getTopLevelForm(lua_State* state)
  2670. {
  2671. // Get the number of parameters.
  2672. int paramCount = lua_gettop(state);
  2673. // Attempt to match the parameters to a valid binding.
  2674. switch (paramCount)
  2675. {
  2676. case 1:
  2677. {
  2678. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2679. {
  2680. Form* instance = getInstance(state);
  2681. void* returnPtr = (void*)instance->getTopLevelForm();
  2682. if (returnPtr)
  2683. {
  2684. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2685. object->instance = returnPtr;
  2686. object->owns = false;
  2687. luaL_getmetatable(state, "Form");
  2688. lua_setmetatable(state, -2);
  2689. }
  2690. else
  2691. {
  2692. lua_pushnil(state);
  2693. }
  2694. return 1;
  2695. }
  2696. lua_pushstring(state, "lua_Form_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
  2697. lua_error(state);
  2698. break;
  2699. }
  2700. default:
  2701. {
  2702. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2703. lua_error(state);
  2704. break;
  2705. }
  2706. }
  2707. return 0;
  2708. }
  2709. int lua_Form_getType(lua_State* state)
  2710. {
  2711. // Get the number of parameters.
  2712. int paramCount = lua_gettop(state);
  2713. // Attempt to match the parameters to a valid binding.
  2714. switch (paramCount)
  2715. {
  2716. case 1:
  2717. {
  2718. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2719. {
  2720. Form* instance = getInstance(state);
  2721. const char* result = instance->getType();
  2722. // Push the return value onto the stack.
  2723. lua_pushstring(state, result);
  2724. return 1;
  2725. }
  2726. lua_pushstring(state, "lua_Form_getType - Failed to match the given parameters to a valid function signature.");
  2727. lua_error(state);
  2728. break;
  2729. }
  2730. default:
  2731. {
  2732. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2733. lua_error(state);
  2734. break;
  2735. }
  2736. }
  2737. return 0;
  2738. }
  2739. int lua_Form_getWidth(lua_State* state)
  2740. {
  2741. // Get the number of parameters.
  2742. int paramCount = lua_gettop(state);
  2743. // Attempt to match the parameters to a valid binding.
  2744. switch (paramCount)
  2745. {
  2746. case 1:
  2747. {
  2748. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2749. {
  2750. Form* instance = getInstance(state);
  2751. float result = instance->getWidth();
  2752. // Push the return value onto the stack.
  2753. lua_pushnumber(state, result);
  2754. return 1;
  2755. }
  2756. lua_pushstring(state, "lua_Form_getWidth - Failed to match the given parameters to a valid function signature.");
  2757. lua_error(state);
  2758. break;
  2759. }
  2760. default:
  2761. {
  2762. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2763. lua_error(state);
  2764. break;
  2765. }
  2766. }
  2767. return 0;
  2768. }
  2769. int lua_Form_getX(lua_State* state)
  2770. {
  2771. // Get the number of parameters.
  2772. int paramCount = lua_gettop(state);
  2773. // Attempt to match the parameters to a valid binding.
  2774. switch (paramCount)
  2775. {
  2776. case 1:
  2777. {
  2778. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2779. {
  2780. Form* instance = getInstance(state);
  2781. float result = instance->getX();
  2782. // Push the return value onto the stack.
  2783. lua_pushnumber(state, result);
  2784. return 1;
  2785. }
  2786. lua_pushstring(state, "lua_Form_getX - Failed to match the given parameters to a valid function signature.");
  2787. lua_error(state);
  2788. break;
  2789. }
  2790. default:
  2791. {
  2792. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2793. lua_error(state);
  2794. break;
  2795. }
  2796. }
  2797. return 0;
  2798. }
  2799. int lua_Form_getY(lua_State* state)
  2800. {
  2801. // Get the number of parameters.
  2802. int paramCount = lua_gettop(state);
  2803. // Attempt to match the parameters to a valid binding.
  2804. switch (paramCount)
  2805. {
  2806. case 1:
  2807. {
  2808. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2809. {
  2810. Form* instance = getInstance(state);
  2811. float result = instance->getY();
  2812. // Push the return value onto the stack.
  2813. lua_pushnumber(state, result);
  2814. return 1;
  2815. }
  2816. lua_pushstring(state, "lua_Form_getY - Failed to match the given parameters to a valid function signature.");
  2817. lua_error(state);
  2818. break;
  2819. }
  2820. default:
  2821. {
  2822. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2823. lua_error(state);
  2824. break;
  2825. }
  2826. }
  2827. return 0;
  2828. }
  2829. int lua_Form_getZIndex(lua_State* state)
  2830. {
  2831. // Get the number of parameters.
  2832. int paramCount = lua_gettop(state);
  2833. // Attempt to match the parameters to a valid binding.
  2834. switch (paramCount)
  2835. {
  2836. case 1:
  2837. {
  2838. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2839. {
  2840. Form* instance = getInstance(state);
  2841. int result = instance->getZIndex();
  2842. // Push the return value onto the stack.
  2843. lua_pushinteger(state, result);
  2844. return 1;
  2845. }
  2846. lua_pushstring(state, "lua_Form_getZIndex - Failed to match the given parameters to a valid function signature.");
  2847. lua_error(state);
  2848. break;
  2849. }
  2850. default:
  2851. {
  2852. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2853. lua_error(state);
  2854. break;
  2855. }
  2856. }
  2857. return 0;
  2858. }
  2859. int lua_Form_hasFocus(lua_State* state)
  2860. {
  2861. // Get the number of parameters.
  2862. int paramCount = lua_gettop(state);
  2863. // Attempt to match the parameters to a valid binding.
  2864. switch (paramCount)
  2865. {
  2866. case 1:
  2867. {
  2868. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2869. {
  2870. Form* instance = getInstance(state);
  2871. bool result = instance->hasFocus();
  2872. // Push the return value onto the stack.
  2873. lua_pushboolean(state, result);
  2874. return 1;
  2875. }
  2876. lua_pushstring(state, "lua_Form_hasFocus - Failed to match the given parameters to a valid function signature.");
  2877. lua_error(state);
  2878. break;
  2879. }
  2880. default:
  2881. {
  2882. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2883. lua_error(state);
  2884. break;
  2885. }
  2886. }
  2887. return 0;
  2888. }
  2889. int lua_Form_insertControl(lua_State* state)
  2890. {
  2891. // Get the number of parameters.
  2892. int paramCount = lua_gettop(state);
  2893. // Attempt to match the parameters to a valid binding.
  2894. switch (paramCount)
  2895. {
  2896. case 3:
  2897. {
  2898. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2899. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  2900. lua_type(state, 3) == LUA_TNUMBER)
  2901. {
  2902. // Get parameter 1 off the stack.
  2903. bool param1Valid;
  2904. gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
  2905. if (!param1Valid)
  2906. {
  2907. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
  2908. lua_error(state);
  2909. }
  2910. // Get parameter 2 off the stack.
  2911. unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
  2912. Form* instance = getInstance(state);
  2913. instance->insertControl(param1, param2);
  2914. return 0;
  2915. }
  2916. lua_pushstring(state, "lua_Form_insertControl - Failed to match the given parameters to a valid function signature.");
  2917. lua_error(state);
  2918. break;
  2919. }
  2920. default:
  2921. {
  2922. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2923. lua_error(state);
  2924. break;
  2925. }
  2926. }
  2927. return 0;
  2928. }
  2929. int lua_Form_isBatchingEnabled(lua_State* state)
  2930. {
  2931. // Get the number of parameters.
  2932. int paramCount = lua_gettop(state);
  2933. // Attempt to match the parameters to a valid binding.
  2934. switch (paramCount)
  2935. {
  2936. case 1:
  2937. {
  2938. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2939. {
  2940. Form* instance = getInstance(state);
  2941. bool result = instance->isBatchingEnabled();
  2942. // Push the return value onto the stack.
  2943. lua_pushboolean(state, result);
  2944. return 1;
  2945. }
  2946. lua_pushstring(state, "lua_Form_isBatchingEnabled - Failed to match the given parameters to a valid function signature.");
  2947. lua_error(state);
  2948. break;
  2949. }
  2950. default:
  2951. {
  2952. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2953. lua_error(state);
  2954. break;
  2955. }
  2956. }
  2957. return 0;
  2958. }
  2959. int lua_Form_isChild(lua_State* state)
  2960. {
  2961. // Get the number of parameters.
  2962. int paramCount = lua_gettop(state);
  2963. // Attempt to match the parameters to a valid binding.
  2964. switch (paramCount)
  2965. {
  2966. case 2:
  2967. {
  2968. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2969. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2970. {
  2971. // Get parameter 1 off the stack.
  2972. bool param1Valid;
  2973. gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
  2974. if (!param1Valid)
  2975. {
  2976. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
  2977. lua_error(state);
  2978. }
  2979. Form* instance = getInstance(state);
  2980. bool result = instance->isChild(param1);
  2981. // Push the return value onto the stack.
  2982. lua_pushboolean(state, result);
  2983. return 1;
  2984. }
  2985. lua_pushstring(state, "lua_Form_isChild - Failed to match the given parameters to a valid function signature.");
  2986. lua_error(state);
  2987. break;
  2988. }
  2989. default:
  2990. {
  2991. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2992. lua_error(state);
  2993. break;
  2994. }
  2995. }
  2996. return 0;
  2997. }
  2998. int lua_Form_isContainer(lua_State* state)
  2999. {
  3000. // Get the number of parameters.
  3001. int paramCount = lua_gettop(state);
  3002. // Attempt to match the parameters to a valid binding.
  3003. switch (paramCount)
  3004. {
  3005. case 1:
  3006. {
  3007. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3008. {
  3009. Form* instance = getInstance(state);
  3010. bool result = instance->isContainer();
  3011. // Push the return value onto the stack.
  3012. lua_pushboolean(state, result);
  3013. return 1;
  3014. }
  3015. lua_pushstring(state, "lua_Form_isContainer - Failed to match the given parameters to a valid function signature.");
  3016. lua_error(state);
  3017. break;
  3018. }
  3019. default:
  3020. {
  3021. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3022. lua_error(state);
  3023. break;
  3024. }
  3025. }
  3026. return 0;
  3027. }
  3028. int lua_Form_isEnabled(lua_State* state)
  3029. {
  3030. // Get the number of parameters.
  3031. int paramCount = lua_gettop(state);
  3032. // Attempt to match the parameters to a valid binding.
  3033. switch (paramCount)
  3034. {
  3035. case 1:
  3036. {
  3037. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3038. {
  3039. Form* instance = getInstance(state);
  3040. bool result = instance->isEnabled();
  3041. // Push the return value onto the stack.
  3042. lua_pushboolean(state, result);
  3043. return 1;
  3044. }
  3045. lua_pushstring(state, "lua_Form_isEnabled - Failed to match the given parameters to a valid function signature.");
  3046. lua_error(state);
  3047. break;
  3048. }
  3049. default:
  3050. {
  3051. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3052. lua_error(state);
  3053. break;
  3054. }
  3055. }
  3056. return 0;
  3057. }
  3058. int lua_Form_isEnabledInHierarchy(lua_State* state)
  3059. {
  3060. // Get the number of parameters.
  3061. int paramCount = lua_gettop(state);
  3062. // Attempt to match the parameters to a valid binding.
  3063. switch (paramCount)
  3064. {
  3065. case 1:
  3066. {
  3067. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3068. {
  3069. Form* instance = getInstance(state);
  3070. bool result = instance->isEnabledInHierarchy();
  3071. // Push the return value onto the stack.
  3072. lua_pushboolean(state, result);
  3073. return 1;
  3074. }
  3075. lua_pushstring(state, "lua_Form_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
  3076. lua_error(state);
  3077. break;
  3078. }
  3079. default:
  3080. {
  3081. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3082. lua_error(state);
  3083. break;
  3084. }
  3085. }
  3086. return 0;
  3087. }
  3088. int lua_Form_isForm(lua_State* state)
  3089. {
  3090. // Get the number of parameters.
  3091. int paramCount = lua_gettop(state);
  3092. // Attempt to match the parameters to a valid binding.
  3093. switch (paramCount)
  3094. {
  3095. case 1:
  3096. {
  3097. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3098. {
  3099. Form* instance = getInstance(state);
  3100. bool result = instance->isForm();
  3101. // Push the return value onto the stack.
  3102. lua_pushboolean(state, result);
  3103. return 1;
  3104. }
  3105. lua_pushstring(state, "lua_Form_isForm - Failed to match the given parameters to a valid function signature.");
  3106. lua_error(state);
  3107. break;
  3108. }
  3109. default:
  3110. {
  3111. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3112. lua_error(state);
  3113. break;
  3114. }
  3115. }
  3116. return 0;
  3117. }
  3118. int lua_Form_isHeightPercentage(lua_State* state)
  3119. {
  3120. // Get the number of parameters.
  3121. int paramCount = lua_gettop(state);
  3122. // Attempt to match the parameters to a valid binding.
  3123. switch (paramCount)
  3124. {
  3125. case 1:
  3126. {
  3127. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3128. {
  3129. Form* instance = getInstance(state);
  3130. bool result = instance->isHeightPercentage();
  3131. // Push the return value onto the stack.
  3132. lua_pushboolean(state, result);
  3133. return 1;
  3134. }
  3135. lua_pushstring(state, "lua_Form_isHeightPercentage - Failed to match the given parameters to a valid function signature.");
  3136. lua_error(state);
  3137. break;
  3138. }
  3139. default:
  3140. {
  3141. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3142. lua_error(state);
  3143. break;
  3144. }
  3145. }
  3146. return 0;
  3147. }
  3148. int lua_Form_isScrollBarsAutoHide(lua_State* state)
  3149. {
  3150. // Get the number of parameters.
  3151. int paramCount = lua_gettop(state);
  3152. // Attempt to match the parameters to a valid binding.
  3153. switch (paramCount)
  3154. {
  3155. case 1:
  3156. {
  3157. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3158. {
  3159. Form* instance = getInstance(state);
  3160. bool result = instance->isScrollBarsAutoHide();
  3161. // Push the return value onto the stack.
  3162. lua_pushboolean(state, result);
  3163. return 1;
  3164. }
  3165. lua_pushstring(state, "lua_Form_isScrollBarsAutoHide - Failed to match the given parameters to a valid function signature.");
  3166. lua_error(state);
  3167. break;
  3168. }
  3169. default:
  3170. {
  3171. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3172. lua_error(state);
  3173. break;
  3174. }
  3175. }
  3176. return 0;
  3177. }
  3178. int lua_Form_isScrolling(lua_State* state)
  3179. {
  3180. // Get the number of parameters.
  3181. int paramCount = lua_gettop(state);
  3182. // Attempt to match the parameters to a valid binding.
  3183. switch (paramCount)
  3184. {
  3185. case 1:
  3186. {
  3187. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3188. {
  3189. Form* instance = getInstance(state);
  3190. bool result = instance->isScrolling();
  3191. // Push the return value onto the stack.
  3192. lua_pushboolean(state, result);
  3193. return 1;
  3194. }
  3195. lua_pushstring(state, "lua_Form_isScrolling - Failed to match the given parameters to a valid function signature.");
  3196. lua_error(state);
  3197. break;
  3198. }
  3199. default:
  3200. {
  3201. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3202. lua_error(state);
  3203. break;
  3204. }
  3205. }
  3206. return 0;
  3207. }
  3208. int lua_Form_isVisible(lua_State* state)
  3209. {
  3210. // Get the number of parameters.
  3211. int paramCount = lua_gettop(state);
  3212. // Attempt to match the parameters to a valid binding.
  3213. switch (paramCount)
  3214. {
  3215. case 1:
  3216. {
  3217. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3218. {
  3219. Form* instance = getInstance(state);
  3220. bool result = instance->isVisible();
  3221. // Push the return value onto the stack.
  3222. lua_pushboolean(state, result);
  3223. return 1;
  3224. }
  3225. lua_pushstring(state, "lua_Form_isVisible - Failed to match the given parameters to a valid function signature.");
  3226. lua_error(state);
  3227. break;
  3228. }
  3229. default:
  3230. {
  3231. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3232. lua_error(state);
  3233. break;
  3234. }
  3235. }
  3236. return 0;
  3237. }
  3238. int lua_Form_isVisibleInHierarchy(lua_State* state)
  3239. {
  3240. // Get the number of parameters.
  3241. int paramCount = lua_gettop(state);
  3242. // Attempt to match the parameters to a valid binding.
  3243. switch (paramCount)
  3244. {
  3245. case 1:
  3246. {
  3247. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3248. {
  3249. Form* instance = getInstance(state);
  3250. bool result = instance->isVisibleInHierarchy();
  3251. // Push the return value onto the stack.
  3252. lua_pushboolean(state, result);
  3253. return 1;
  3254. }
  3255. lua_pushstring(state, "lua_Form_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
  3256. lua_error(state);
  3257. break;
  3258. }
  3259. default:
  3260. {
  3261. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3262. lua_error(state);
  3263. break;
  3264. }
  3265. }
  3266. return 0;
  3267. }
  3268. int lua_Form_isWidthPercentage(lua_State* state)
  3269. {
  3270. // Get the number of parameters.
  3271. int paramCount = lua_gettop(state);
  3272. // Attempt to match the parameters to a valid binding.
  3273. switch (paramCount)
  3274. {
  3275. case 1:
  3276. {
  3277. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3278. {
  3279. Form* instance = getInstance(state);
  3280. bool result = instance->isWidthPercentage();
  3281. // Push the return value onto the stack.
  3282. lua_pushboolean(state, result);
  3283. return 1;
  3284. }
  3285. lua_pushstring(state, "lua_Form_isWidthPercentage - Failed to match the given parameters to a valid function signature.");
  3286. lua_error(state);
  3287. break;
  3288. }
  3289. default:
  3290. {
  3291. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3292. lua_error(state);
  3293. break;
  3294. }
  3295. }
  3296. return 0;
  3297. }
  3298. int lua_Form_isXPercentage(lua_State* state)
  3299. {
  3300. // Get the number of parameters.
  3301. int paramCount = lua_gettop(state);
  3302. // Attempt to match the parameters to a valid binding.
  3303. switch (paramCount)
  3304. {
  3305. case 1:
  3306. {
  3307. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3308. {
  3309. Form* instance = getInstance(state);
  3310. bool result = instance->isXPercentage();
  3311. // Push the return value onto the stack.
  3312. lua_pushboolean(state, result);
  3313. return 1;
  3314. }
  3315. lua_pushstring(state, "lua_Form_isXPercentage - Failed to match the given parameters to a valid function signature.");
  3316. lua_error(state);
  3317. break;
  3318. }
  3319. default:
  3320. {
  3321. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3322. lua_error(state);
  3323. break;
  3324. }
  3325. }
  3326. return 0;
  3327. }
  3328. int lua_Form_isYPercentage(lua_State* state)
  3329. {
  3330. // Get the number of parameters.
  3331. int paramCount = lua_gettop(state);
  3332. // Attempt to match the parameters to a valid binding.
  3333. switch (paramCount)
  3334. {
  3335. case 1:
  3336. {
  3337. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3338. {
  3339. Form* instance = getInstance(state);
  3340. bool result = instance->isYPercentage();
  3341. // Push the return value onto the stack.
  3342. lua_pushboolean(state, result);
  3343. return 1;
  3344. }
  3345. lua_pushstring(state, "lua_Form_isYPercentage - Failed to match the given parameters to a valid function signature.");
  3346. lua_error(state);
  3347. break;
  3348. }
  3349. default:
  3350. {
  3351. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3352. lua_error(state);
  3353. break;
  3354. }
  3355. }
  3356. return 0;
  3357. }
  3358. int lua_Form_release(lua_State* state)
  3359. {
  3360. // Get the number of parameters.
  3361. int paramCount = lua_gettop(state);
  3362. // Attempt to match the parameters to a valid binding.
  3363. switch (paramCount)
  3364. {
  3365. case 1:
  3366. {
  3367. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3368. {
  3369. Form* instance = getInstance(state);
  3370. instance->release();
  3371. return 0;
  3372. }
  3373. lua_pushstring(state, "lua_Form_release - Failed to match the given parameters to a valid function signature.");
  3374. lua_error(state);
  3375. break;
  3376. }
  3377. default:
  3378. {
  3379. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3380. lua_error(state);
  3381. break;
  3382. }
  3383. }
  3384. return 0;
  3385. }
  3386. int lua_Form_removeControl(lua_State* state)
  3387. {
  3388. // Get the number of parameters.
  3389. int paramCount = lua_gettop(state);
  3390. // Attempt to match the parameters to a valid binding.
  3391. switch (paramCount)
  3392. {
  3393. case 2:
  3394. {
  3395. do
  3396. {
  3397. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3398. lua_type(state, 2) == LUA_TNUMBER)
  3399. {
  3400. // Get parameter 1 off the stack.
  3401. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  3402. Form* instance = getInstance(state);
  3403. instance->removeControl(param1);
  3404. return 0;
  3405. }
  3406. } while (0);
  3407. do
  3408. {
  3409. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3410. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3411. {
  3412. // Get parameter 1 off the stack.
  3413. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  3414. Form* instance = getInstance(state);
  3415. instance->removeControl(param1);
  3416. return 0;
  3417. }
  3418. } while (0);
  3419. do
  3420. {
  3421. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3422. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3423. {
  3424. // Get parameter 1 off the stack.
  3425. bool param1Valid;
  3426. gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
  3427. if (!param1Valid)
  3428. break;
  3429. Form* instance = getInstance(state);
  3430. instance->removeControl(param1);
  3431. return 0;
  3432. }
  3433. } while (0);
  3434. lua_pushstring(state, "lua_Form_removeControl - Failed to match the given parameters to a valid function signature.");
  3435. lua_error(state);
  3436. break;
  3437. }
  3438. default:
  3439. {
  3440. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3441. lua_error(state);
  3442. break;
  3443. }
  3444. }
  3445. return 0;
  3446. }
  3447. int lua_Form_removeListener(lua_State* state)
  3448. {
  3449. // Get the number of parameters.
  3450. int paramCount = lua_gettop(state);
  3451. // Attempt to match the parameters to a valid binding.
  3452. switch (paramCount)
  3453. {
  3454. case 2:
  3455. {
  3456. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3457. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3458. {
  3459. // Get parameter 1 off the stack.
  3460. bool param1Valid;
  3461. gameplay::ScriptUtil::LuaArray<Control::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false, &param1Valid);
  3462. if (!param1Valid)
  3463. {
  3464. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control::Listener'.");
  3465. lua_error(state);
  3466. }
  3467. Form* instance = getInstance(state);
  3468. instance->removeListener(param1);
  3469. return 0;
  3470. }
  3471. lua_pushstring(state, "lua_Form_removeListener - Failed to match the given parameters to a valid function signature.");
  3472. lua_error(state);
  3473. break;
  3474. }
  3475. default:
  3476. {
  3477. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3478. lua_error(state);
  3479. break;
  3480. }
  3481. }
  3482. return 0;
  3483. }
  3484. int lua_Form_removeScriptCallback(lua_State* state)
  3485. {
  3486. // Get the number of parameters.
  3487. int paramCount = lua_gettop(state);
  3488. // Attempt to match the parameters to a valid binding.
  3489. switch (paramCount)
  3490. {
  3491. case 3:
  3492. {
  3493. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3494. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3495. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  3496. {
  3497. // Get parameter 1 off the stack.
  3498. std::string param1 = gameplay::ScriptUtil::getString(2, true);
  3499. // Get parameter 2 off the stack.
  3500. std::string param2 = gameplay::ScriptUtil::getString(3, true);
  3501. Form* instance = getInstance(state);
  3502. instance->removeScriptCallback(param1, param2);
  3503. return 0;
  3504. }
  3505. lua_pushstring(state, "lua_Form_removeScriptCallback - Failed to match the given parameters to a valid function signature.");
  3506. lua_error(state);
  3507. break;
  3508. }
  3509. default:
  3510. {
  3511. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3512. lua_error(state);
  3513. break;
  3514. }
  3515. }
  3516. return 0;
  3517. }
  3518. int lua_Form_setActiveControl(lua_State* state)
  3519. {
  3520. // Get the number of parameters.
  3521. int paramCount = lua_gettop(state);
  3522. // Attempt to match the parameters to a valid binding.
  3523. switch (paramCount)
  3524. {
  3525. case 2:
  3526. {
  3527. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3528. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3529. {
  3530. // Get parameter 1 off the stack.
  3531. bool param1Valid;
  3532. gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
  3533. if (!param1Valid)
  3534. {
  3535. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
  3536. lua_error(state);
  3537. }
  3538. Form* instance = getInstance(state);
  3539. instance->setActiveControl(param1);
  3540. return 0;
  3541. }
  3542. lua_pushstring(state, "lua_Form_setActiveControl - Failed to match the given parameters to a valid function signature.");
  3543. lua_error(state);
  3544. break;
  3545. }
  3546. default:
  3547. {
  3548. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3549. lua_error(state);
  3550. break;
  3551. }
  3552. }
  3553. return 0;
  3554. }
  3555. int lua_Form_setAlignment(lua_State* state)
  3556. {
  3557. // Get the number of parameters.
  3558. int paramCount = lua_gettop(state);
  3559. // Attempt to match the parameters to a valid binding.
  3560. switch (paramCount)
  3561. {
  3562. case 2:
  3563. {
  3564. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3565. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3566. {
  3567. // Get parameter 1 off the stack.
  3568. Control::Alignment param1 = (Control::Alignment)lua_enumFromString_ControlAlignment(luaL_checkstring(state, 2));
  3569. Form* instance = getInstance(state);
  3570. instance->setAlignment(param1);
  3571. return 0;
  3572. }
  3573. lua_pushstring(state, "lua_Form_setAlignment - Failed to match the given parameters to a valid function signature.");
  3574. lua_error(state);
  3575. break;
  3576. }
  3577. default:
  3578. {
  3579. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3580. lua_error(state);
  3581. break;
  3582. }
  3583. }
  3584. return 0;
  3585. }
  3586. int lua_Form_setAnimationPropertyValue(lua_State* state)
  3587. {
  3588. // Get the number of parameters.
  3589. int paramCount = lua_gettop(state);
  3590. // Attempt to match the parameters to a valid binding.
  3591. switch (paramCount)
  3592. {
  3593. case 3:
  3594. {
  3595. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3596. lua_type(state, 2) == LUA_TNUMBER &&
  3597. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  3598. {
  3599. // Get parameter 1 off the stack.
  3600. int param1 = (int)luaL_checkint(state, 2);
  3601. // Get parameter 2 off the stack.
  3602. bool param2Valid;
  3603. gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
  3604. if (!param2Valid)
  3605. {
  3606. lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
  3607. lua_error(state);
  3608. }
  3609. Form* instance = getInstance(state);
  3610. instance->setAnimationPropertyValue(param1, param2);
  3611. return 0;
  3612. }
  3613. lua_pushstring(state, "lua_Form_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  3614. lua_error(state);
  3615. break;
  3616. }
  3617. case 4:
  3618. {
  3619. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3620. lua_type(state, 2) == LUA_TNUMBER &&
  3621. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL) &&
  3622. lua_type(state, 4) == LUA_TNUMBER)
  3623. {
  3624. // Get parameter 1 off the stack.
  3625. int param1 = (int)luaL_checkint(state, 2);
  3626. // Get parameter 2 off the stack.
  3627. bool param2Valid;
  3628. gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
  3629. if (!param2Valid)
  3630. {
  3631. lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
  3632. lua_error(state);
  3633. }
  3634. // Get parameter 3 off the stack.
  3635. float param3 = (float)luaL_checknumber(state, 4);
  3636. Form* instance = getInstance(state);
  3637. instance->setAnimationPropertyValue(param1, param2, param3);
  3638. return 0;
  3639. }
  3640. lua_pushstring(state, "lua_Form_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  3641. lua_error(state);
  3642. break;
  3643. }
  3644. default:
  3645. {
  3646. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  3647. lua_error(state);
  3648. break;
  3649. }
  3650. }
  3651. return 0;
  3652. }
  3653. int lua_Form_setAutoHeight(lua_State* state)
  3654. {
  3655. // Get the number of parameters.
  3656. int paramCount = lua_gettop(state);
  3657. // Attempt to match the parameters to a valid binding.
  3658. switch (paramCount)
  3659. {
  3660. case 2:
  3661. {
  3662. do
  3663. {
  3664. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3665. lua_type(state, 2) == LUA_TBOOLEAN)
  3666. {
  3667. // Get parameter 1 off the stack.
  3668. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  3669. Form* instance = getInstance(state);
  3670. instance->setAutoHeight(param1);
  3671. return 0;
  3672. }
  3673. } while (0);
  3674. do
  3675. {
  3676. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3677. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3678. {
  3679. // Get parameter 1 off the stack.
  3680. Control::AutoSize param1 = (Control::AutoSize)lua_enumFromString_ControlAutoSize(luaL_checkstring(state, 2));
  3681. Form* instance = getInstance(state);
  3682. instance->setAutoHeight(param1);
  3683. return 0;
  3684. }
  3685. } while (0);
  3686. lua_pushstring(state, "lua_Form_setAutoHeight - Failed to match the given parameters to a valid function signature.");
  3687. lua_error(state);
  3688. break;
  3689. }
  3690. default:
  3691. {
  3692. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3693. lua_error(state);
  3694. break;
  3695. }
  3696. }
  3697. return 0;
  3698. }
  3699. int lua_Form_setAutoWidth(lua_State* state)
  3700. {
  3701. // Get the number of parameters.
  3702. int paramCount = lua_gettop(state);
  3703. // Attempt to match the parameters to a valid binding.
  3704. switch (paramCount)
  3705. {
  3706. case 2:
  3707. {
  3708. do
  3709. {
  3710. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3711. lua_type(state, 2) == LUA_TBOOLEAN)
  3712. {
  3713. // Get parameter 1 off the stack.
  3714. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  3715. Form* instance = getInstance(state);
  3716. instance->setAutoWidth(param1);
  3717. return 0;
  3718. }
  3719. } while (0);
  3720. do
  3721. {
  3722. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3723. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3724. {
  3725. // Get parameter 1 off the stack.
  3726. Control::AutoSize param1 = (Control::AutoSize)lua_enumFromString_ControlAutoSize(luaL_checkstring(state, 2));
  3727. Form* instance = getInstance(state);
  3728. instance->setAutoWidth(param1);
  3729. return 0;
  3730. }
  3731. } while (0);
  3732. lua_pushstring(state, "lua_Form_setAutoWidth - Failed to match the given parameters to a valid function signature.");
  3733. lua_error(state);
  3734. break;
  3735. }
  3736. default:
  3737. {
  3738. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3739. lua_error(state);
  3740. break;
  3741. }
  3742. }
  3743. return 0;
  3744. }
  3745. int lua_Form_setBatchingEnabled(lua_State* state)
  3746. {
  3747. // Get the number of parameters.
  3748. int paramCount = lua_gettop(state);
  3749. // Attempt to match the parameters to a valid binding.
  3750. switch (paramCount)
  3751. {
  3752. case 2:
  3753. {
  3754. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3755. lua_type(state, 2) == LUA_TBOOLEAN)
  3756. {
  3757. // Get parameter 1 off the stack.
  3758. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  3759. Form* instance = getInstance(state);
  3760. instance->setBatchingEnabled(param1);
  3761. return 0;
  3762. }
  3763. lua_pushstring(state, "lua_Form_setBatchingEnabled - Failed to match the given parameters to a valid function signature.");
  3764. lua_error(state);
  3765. break;
  3766. }
  3767. default:
  3768. {
  3769. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3770. lua_error(state);
  3771. break;
  3772. }
  3773. }
  3774. return 0;
  3775. }
  3776. int lua_Form_setBorder(lua_State* state)
  3777. {
  3778. // Get the number of parameters.
  3779. int paramCount = lua_gettop(state);
  3780. // Attempt to match the parameters to a valid binding.
  3781. switch (paramCount)
  3782. {
  3783. case 5:
  3784. {
  3785. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3786. lua_type(state, 2) == LUA_TNUMBER &&
  3787. lua_type(state, 3) == LUA_TNUMBER &&
  3788. lua_type(state, 4) == LUA_TNUMBER &&
  3789. lua_type(state, 5) == LUA_TNUMBER)
  3790. {
  3791. // Get parameter 1 off the stack.
  3792. float param1 = (float)luaL_checknumber(state, 2);
  3793. // Get parameter 2 off the stack.
  3794. float param2 = (float)luaL_checknumber(state, 3);
  3795. // Get parameter 3 off the stack.
  3796. float param3 = (float)luaL_checknumber(state, 4);
  3797. // Get parameter 4 off the stack.
  3798. float param4 = (float)luaL_checknumber(state, 5);
  3799. Form* instance = getInstance(state);
  3800. instance->setBorder(param1, param2, param3, param4);
  3801. return 0;
  3802. }
  3803. lua_pushstring(state, "lua_Form_setBorder - Failed to match the given parameters to a valid function signature.");
  3804. lua_error(state);
  3805. break;
  3806. }
  3807. case 6:
  3808. {
  3809. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3810. lua_type(state, 2) == LUA_TNUMBER &&
  3811. lua_type(state, 3) == LUA_TNUMBER &&
  3812. lua_type(state, 4) == LUA_TNUMBER &&
  3813. lua_type(state, 5) == LUA_TNUMBER &&
  3814. lua_type(state, 6) == LUA_TNUMBER)
  3815. {
  3816. // Get parameter 1 off the stack.
  3817. float param1 = (float)luaL_checknumber(state, 2);
  3818. // Get parameter 2 off the stack.
  3819. float param2 = (float)luaL_checknumber(state, 3);
  3820. // Get parameter 3 off the stack.
  3821. float param3 = (float)luaL_checknumber(state, 4);
  3822. // Get parameter 4 off the stack.
  3823. float param4 = (float)luaL_checknumber(state, 5);
  3824. // Get parameter 5 off the stack.
  3825. unsigned char param5 = (unsigned char)luaL_checkunsigned(state, 6);
  3826. Form* instance = getInstance(state);
  3827. instance->setBorder(param1, param2, param3, param4, param5);
  3828. return 0;
  3829. }
  3830. lua_pushstring(state, "lua_Form_setBorder - Failed to match the given parameters to a valid function signature.");
  3831. lua_error(state);
  3832. break;
  3833. }
  3834. default:
  3835. {
  3836. lua_pushstring(state, "Invalid number of parameters (expected 5 or 6).");
  3837. lua_error(state);
  3838. break;
  3839. }
  3840. }
  3841. return 0;
  3842. }
  3843. int lua_Form_setBounds(lua_State* state)
  3844. {
  3845. // Get the number of parameters.
  3846. int paramCount = lua_gettop(state);
  3847. // Attempt to match the parameters to a valid binding.
  3848. switch (paramCount)
  3849. {
  3850. case 2:
  3851. {
  3852. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3853. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3854. {
  3855. // Get parameter 1 off the stack.
  3856. bool param1Valid;
  3857. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  3858. if (!param1Valid)
  3859. {
  3860. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  3861. lua_error(state);
  3862. }
  3863. Form* instance = getInstance(state);
  3864. instance->setBounds(*param1);
  3865. return 0;
  3866. }
  3867. lua_pushstring(state, "lua_Form_setBounds - Failed to match the given parameters to a valid function signature.");
  3868. lua_error(state);
  3869. break;
  3870. }
  3871. default:
  3872. {
  3873. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3874. lua_error(state);
  3875. break;
  3876. }
  3877. }
  3878. return 0;
  3879. }
  3880. int lua_Form_setCanFocus(lua_State* state)
  3881. {
  3882. // Get the number of parameters.
  3883. int paramCount = lua_gettop(state);
  3884. // Attempt to match the parameters to a valid binding.
  3885. switch (paramCount)
  3886. {
  3887. case 2:
  3888. {
  3889. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3890. lua_type(state, 2) == LUA_TBOOLEAN)
  3891. {
  3892. // Get parameter 1 off the stack.
  3893. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  3894. Form* instance = getInstance(state);
  3895. instance->setCanFocus(param1);
  3896. return 0;
  3897. }
  3898. lua_pushstring(state, "lua_Form_setCanFocus - Failed to match the given parameters to a valid function signature.");
  3899. lua_error(state);
  3900. break;
  3901. }
  3902. default:
  3903. {
  3904. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3905. lua_error(state);
  3906. break;
  3907. }
  3908. }
  3909. return 0;
  3910. }
  3911. int lua_Form_setConsumeInputEvents(lua_State* state)
  3912. {
  3913. // Get the number of parameters.
  3914. int paramCount = lua_gettop(state);
  3915. // Attempt to match the parameters to a valid binding.
  3916. switch (paramCount)
  3917. {
  3918. case 2:
  3919. {
  3920. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3921. lua_type(state, 2) == LUA_TBOOLEAN)
  3922. {
  3923. // Get parameter 1 off the stack.
  3924. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  3925. Form* instance = getInstance(state);
  3926. instance->setConsumeInputEvents(param1);
  3927. return 0;
  3928. }
  3929. lua_pushstring(state, "lua_Form_setConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  3930. lua_error(state);
  3931. break;
  3932. }
  3933. default:
  3934. {
  3935. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3936. lua_error(state);
  3937. break;
  3938. }
  3939. }
  3940. return 0;
  3941. }
  3942. int lua_Form_setCursorColor(lua_State* state)
  3943. {
  3944. // Get the number of parameters.
  3945. int paramCount = lua_gettop(state);
  3946. // Attempt to match the parameters to a valid binding.
  3947. switch (paramCount)
  3948. {
  3949. case 3:
  3950. {
  3951. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3952. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3953. lua_type(state, 3) == LUA_TNUMBER)
  3954. {
  3955. // Get parameter 1 off the stack.
  3956. bool param1Valid;
  3957. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  3958. if (!param1Valid)
  3959. {
  3960. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  3961. lua_error(state);
  3962. }
  3963. // Get parameter 2 off the stack.
  3964. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3965. Form* instance = getInstance(state);
  3966. instance->setCursorColor(*param1, param2);
  3967. return 0;
  3968. }
  3969. lua_pushstring(state, "lua_Form_setCursorColor - Failed to match the given parameters to a valid function signature.");
  3970. lua_error(state);
  3971. break;
  3972. }
  3973. default:
  3974. {
  3975. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3976. lua_error(state);
  3977. break;
  3978. }
  3979. }
  3980. return 0;
  3981. }
  3982. int lua_Form_setCursorRegion(lua_State* state)
  3983. {
  3984. // Get the number of parameters.
  3985. int paramCount = lua_gettop(state);
  3986. // Attempt to match the parameters to a valid binding.
  3987. switch (paramCount)
  3988. {
  3989. case 3:
  3990. {
  3991. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3992. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3993. lua_type(state, 3) == LUA_TNUMBER)
  3994. {
  3995. // Get parameter 1 off the stack.
  3996. bool param1Valid;
  3997. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  3998. if (!param1Valid)
  3999. {
  4000. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  4001. lua_error(state);
  4002. }
  4003. // Get parameter 2 off the stack.
  4004. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4005. Form* instance = getInstance(state);
  4006. instance->setCursorRegion(*param1, param2);
  4007. return 0;
  4008. }
  4009. lua_pushstring(state, "lua_Form_setCursorRegion - Failed to match the given parameters to a valid function signature.");
  4010. lua_error(state);
  4011. break;
  4012. }
  4013. default:
  4014. {
  4015. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  4016. lua_error(state);
  4017. break;
  4018. }
  4019. }
  4020. return 0;
  4021. }
  4022. int lua_Form_setEnabled(lua_State* state)
  4023. {
  4024. // Get the number of parameters.
  4025. int paramCount = lua_gettop(state);
  4026. // Attempt to match the parameters to a valid binding.
  4027. switch (paramCount)
  4028. {
  4029. case 2:
  4030. {
  4031. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4032. lua_type(state, 2) == LUA_TBOOLEAN)
  4033. {
  4034. // Get parameter 1 off the stack.
  4035. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  4036. Form* instance = getInstance(state);
  4037. instance->setEnabled(param1);
  4038. return 0;
  4039. }
  4040. lua_pushstring(state, "lua_Form_setEnabled - Failed to match the given parameters to a valid function signature.");
  4041. lua_error(state);
  4042. break;
  4043. }
  4044. default:
  4045. {
  4046. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4047. lua_error(state);
  4048. break;
  4049. }
  4050. }
  4051. return 0;
  4052. }
  4053. int lua_Form_setFocus(lua_State* state)
  4054. {
  4055. // Get the number of parameters.
  4056. int paramCount = lua_gettop(state);
  4057. // Attempt to match the parameters to a valid binding.
  4058. switch (paramCount)
  4059. {
  4060. case 1:
  4061. {
  4062. if ((lua_type(state, 1) == LUA_TUSERDATA))
  4063. {
  4064. Form* instance = getInstance(state);
  4065. bool result = instance->setFocus();
  4066. // Push the return value onto the stack.
  4067. lua_pushboolean(state, result);
  4068. return 1;
  4069. }
  4070. lua_pushstring(state, "lua_Form_setFocus - Failed to match the given parameters to a valid function signature.");
  4071. lua_error(state);
  4072. break;
  4073. }
  4074. default:
  4075. {
  4076. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  4077. lua_error(state);
  4078. break;
  4079. }
  4080. }
  4081. return 0;
  4082. }
  4083. int lua_Form_setFocusIndex(lua_State* state)
  4084. {
  4085. // Get the number of parameters.
  4086. int paramCount = lua_gettop(state);
  4087. // Attempt to match the parameters to a valid binding.
  4088. switch (paramCount)
  4089. {
  4090. case 2:
  4091. {
  4092. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4093. lua_type(state, 2) == LUA_TNUMBER)
  4094. {
  4095. // Get parameter 1 off the stack.
  4096. int param1 = (int)luaL_checkint(state, 2);
  4097. Form* instance = getInstance(state);
  4098. instance->setFocusIndex(param1);
  4099. return 0;
  4100. }
  4101. lua_pushstring(state, "lua_Form_setFocusIndex - Failed to match the given parameters to a valid function signature.");
  4102. lua_error(state);
  4103. break;
  4104. }
  4105. default:
  4106. {
  4107. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4108. lua_error(state);
  4109. break;
  4110. }
  4111. }
  4112. return 0;
  4113. }
  4114. int lua_Form_setFont(lua_State* state)
  4115. {
  4116. // Get the number of parameters.
  4117. int paramCount = lua_gettop(state);
  4118. // Attempt to match the parameters to a valid binding.
  4119. switch (paramCount)
  4120. {
  4121. case 2:
  4122. {
  4123. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4124. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4125. {
  4126. // Get parameter 1 off the stack.
  4127. bool param1Valid;
  4128. gameplay::ScriptUtil::LuaArray<Font> param1 = gameplay::ScriptUtil::getObjectPointer<Font>(2, "Font", false, &param1Valid);
  4129. if (!param1Valid)
  4130. {
  4131. lua_pushstring(state, "Failed to convert parameter 1 to type 'Font'.");
  4132. lua_error(state);
  4133. }
  4134. Form* instance = getInstance(state);
  4135. instance->setFont(param1);
  4136. return 0;
  4137. }
  4138. lua_pushstring(state, "lua_Form_setFont - Failed to match the given parameters to a valid function signature.");
  4139. lua_error(state);
  4140. break;
  4141. }
  4142. case 3:
  4143. {
  4144. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4145. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  4146. lua_type(state, 3) == LUA_TNUMBER)
  4147. {
  4148. // Get parameter 1 off the stack.
  4149. bool param1Valid;
  4150. gameplay::ScriptUtil::LuaArray<Font> param1 = gameplay::ScriptUtil::getObjectPointer<Font>(2, "Font", false, &param1Valid);
  4151. if (!param1Valid)
  4152. {
  4153. lua_pushstring(state, "Failed to convert parameter 1 to type 'Font'.");
  4154. lua_error(state);
  4155. }
  4156. // Get parameter 2 off the stack.
  4157. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4158. Form* instance = getInstance(state);
  4159. instance->setFont(param1, param2);
  4160. return 0;
  4161. }
  4162. lua_pushstring(state, "lua_Form_setFont - Failed to match the given parameters to a valid function signature.");
  4163. lua_error(state);
  4164. break;
  4165. }
  4166. default:
  4167. {
  4168. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4169. lua_error(state);
  4170. break;
  4171. }
  4172. }
  4173. return 0;
  4174. }
  4175. int lua_Form_setFontSize(lua_State* state)
  4176. {
  4177. // Get the number of parameters.
  4178. int paramCount = lua_gettop(state);
  4179. // Attempt to match the parameters to a valid binding.
  4180. switch (paramCount)
  4181. {
  4182. case 2:
  4183. {
  4184. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4185. lua_type(state, 2) == LUA_TNUMBER)
  4186. {
  4187. // Get parameter 1 off the stack.
  4188. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  4189. Form* instance = getInstance(state);
  4190. instance->setFontSize(param1);
  4191. return 0;
  4192. }
  4193. lua_pushstring(state, "lua_Form_setFontSize - Failed to match the given parameters to a valid function signature.");
  4194. lua_error(state);
  4195. break;
  4196. }
  4197. case 3:
  4198. {
  4199. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4200. lua_type(state, 2) == LUA_TNUMBER &&
  4201. lua_type(state, 3) == LUA_TNUMBER)
  4202. {
  4203. // Get parameter 1 off the stack.
  4204. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  4205. // Get parameter 2 off the stack.
  4206. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4207. Form* instance = getInstance(state);
  4208. instance->setFontSize(param1, param2);
  4209. return 0;
  4210. }
  4211. lua_pushstring(state, "lua_Form_setFontSize - Failed to match the given parameters to a valid function signature.");
  4212. lua_error(state);
  4213. break;
  4214. }
  4215. default:
  4216. {
  4217. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4218. lua_error(state);
  4219. break;
  4220. }
  4221. }
  4222. return 0;
  4223. }
  4224. int lua_Form_setHeight(lua_State* state)
  4225. {
  4226. // Get the number of parameters.
  4227. int paramCount = lua_gettop(state);
  4228. // Attempt to match the parameters to a valid binding.
  4229. switch (paramCount)
  4230. {
  4231. case 2:
  4232. {
  4233. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4234. lua_type(state, 2) == LUA_TNUMBER)
  4235. {
  4236. // Get parameter 1 off the stack.
  4237. float param1 = (float)luaL_checknumber(state, 2);
  4238. Form* instance = getInstance(state);
  4239. instance->setHeight(param1);
  4240. return 0;
  4241. }
  4242. lua_pushstring(state, "lua_Form_setHeight - Failed to match the given parameters to a valid function signature.");
  4243. lua_error(state);
  4244. break;
  4245. }
  4246. case 3:
  4247. {
  4248. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4249. lua_type(state, 2) == LUA_TNUMBER &&
  4250. lua_type(state, 3) == LUA_TBOOLEAN)
  4251. {
  4252. // Get parameter 1 off the stack.
  4253. float param1 = (float)luaL_checknumber(state, 2);
  4254. // Get parameter 2 off the stack.
  4255. bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
  4256. Form* instance = getInstance(state);
  4257. instance->setHeight(param1, param2);
  4258. return 0;
  4259. }
  4260. lua_pushstring(state, "lua_Form_setHeight - Failed to match the given parameters to a valid function signature.");
  4261. lua_error(state);
  4262. break;
  4263. }
  4264. default:
  4265. {
  4266. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4267. lua_error(state);
  4268. break;
  4269. }
  4270. }
  4271. return 0;
  4272. }
  4273. int lua_Form_setId(lua_State* state)
  4274. {
  4275. // Get the number of parameters.
  4276. int paramCount = lua_gettop(state);
  4277. // Attempt to match the parameters to a valid binding.
  4278. switch (paramCount)
  4279. {
  4280. case 2:
  4281. {
  4282. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4283. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4284. {
  4285. // Get parameter 1 off the stack.
  4286. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  4287. Form* instance = getInstance(state);
  4288. instance->setId(param1);
  4289. return 0;
  4290. }
  4291. lua_pushstring(state, "lua_Form_setId - Failed to match the given parameters to a valid function signature.");
  4292. lua_error(state);
  4293. break;
  4294. }
  4295. default:
  4296. {
  4297. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4298. lua_error(state);
  4299. break;
  4300. }
  4301. }
  4302. return 0;
  4303. }
  4304. int lua_Form_setImageColor(lua_State* state)
  4305. {
  4306. // Get the number of parameters.
  4307. int paramCount = lua_gettop(state);
  4308. // Attempt to match the parameters to a valid binding.
  4309. switch (paramCount)
  4310. {
  4311. case 3:
  4312. {
  4313. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4314. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4315. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  4316. {
  4317. // Get parameter 1 off the stack.
  4318. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  4319. // Get parameter 2 off the stack.
  4320. bool param2Valid;
  4321. gameplay::ScriptUtil::LuaArray<Vector4> param2 = gameplay::ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true, &param2Valid);
  4322. if (!param2Valid)
  4323. {
  4324. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector4'.");
  4325. lua_error(state);
  4326. }
  4327. Form* instance = getInstance(state);
  4328. instance->setImageColor(param1, *param2);
  4329. return 0;
  4330. }
  4331. lua_pushstring(state, "lua_Form_setImageColor - Failed to match the given parameters to a valid function signature.");
  4332. lua_error(state);
  4333. break;
  4334. }
  4335. case 4:
  4336. {
  4337. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4338. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4339. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  4340. lua_type(state, 4) == LUA_TNUMBER)
  4341. {
  4342. // Get parameter 1 off the stack.
  4343. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  4344. // Get parameter 2 off the stack.
  4345. bool param2Valid;
  4346. gameplay::ScriptUtil::LuaArray<Vector4> param2 = gameplay::ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true, &param2Valid);
  4347. if (!param2Valid)
  4348. {
  4349. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector4'.");
  4350. lua_error(state);
  4351. }
  4352. // Get parameter 3 off the stack.
  4353. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  4354. Form* instance = getInstance(state);
  4355. instance->setImageColor(param1, *param2, param3);
  4356. return 0;
  4357. }
  4358. lua_pushstring(state, "lua_Form_setImageColor - Failed to match the given parameters to a valid function signature.");
  4359. lua_error(state);
  4360. break;
  4361. }
  4362. default:
  4363. {
  4364. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  4365. lua_error(state);
  4366. break;
  4367. }
  4368. }
  4369. return 0;
  4370. }
  4371. int lua_Form_setImageRegion(lua_State* state)
  4372. {
  4373. // Get the number of parameters.
  4374. int paramCount = lua_gettop(state);
  4375. // Attempt to match the parameters to a valid binding.
  4376. switch (paramCount)
  4377. {
  4378. case 3:
  4379. {
  4380. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4381. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4382. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  4383. {
  4384. // Get parameter 1 off the stack.
  4385. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  4386. // Get parameter 2 off the stack.
  4387. bool param2Valid;
  4388. gameplay::ScriptUtil::LuaArray<Rectangle> param2 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true, &param2Valid);
  4389. if (!param2Valid)
  4390. {
  4391. lua_pushstring(state, "Failed to convert parameter 2 to type 'Rectangle'.");
  4392. lua_error(state);
  4393. }
  4394. Form* instance = getInstance(state);
  4395. instance->setImageRegion(param1, *param2);
  4396. return 0;
  4397. }
  4398. lua_pushstring(state, "lua_Form_setImageRegion - Failed to match the given parameters to a valid function signature.");
  4399. lua_error(state);
  4400. break;
  4401. }
  4402. case 4:
  4403. {
  4404. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4405. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4406. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  4407. lua_type(state, 4) == LUA_TNUMBER)
  4408. {
  4409. // Get parameter 1 off the stack.
  4410. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  4411. // Get parameter 2 off the stack.
  4412. bool param2Valid;
  4413. gameplay::ScriptUtil::LuaArray<Rectangle> param2 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true, &param2Valid);
  4414. if (!param2Valid)
  4415. {
  4416. lua_pushstring(state, "Failed to convert parameter 2 to type 'Rectangle'.");
  4417. lua_error(state);
  4418. }
  4419. // Get parameter 3 off the stack.
  4420. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  4421. Form* instance = getInstance(state);
  4422. instance->setImageRegion(param1, *param2, param3);
  4423. return 0;
  4424. }
  4425. lua_pushstring(state, "lua_Form_setImageRegion - Failed to match the given parameters to a valid function signature.");
  4426. lua_error(state);
  4427. break;
  4428. }
  4429. default:
  4430. {
  4431. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  4432. lua_error(state);
  4433. break;
  4434. }
  4435. }
  4436. return 0;
  4437. }
  4438. int lua_Form_setLayout(lua_State* state)
  4439. {
  4440. // Get the number of parameters.
  4441. int paramCount = lua_gettop(state);
  4442. // Attempt to match the parameters to a valid binding.
  4443. switch (paramCount)
  4444. {
  4445. case 2:
  4446. {
  4447. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4448. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4449. {
  4450. // Get parameter 1 off the stack.
  4451. Layout::Type param1 = (Layout::Type)lua_enumFromString_LayoutType(luaL_checkstring(state, 2));
  4452. Form* instance = getInstance(state);
  4453. instance->setLayout(param1);
  4454. return 0;
  4455. }
  4456. lua_pushstring(state, "lua_Form_setLayout - Failed to match the given parameters to a valid function signature.");
  4457. lua_error(state);
  4458. break;
  4459. }
  4460. default:
  4461. {
  4462. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4463. lua_error(state);
  4464. break;
  4465. }
  4466. }
  4467. return 0;
  4468. }
  4469. int lua_Form_setMargin(lua_State* state)
  4470. {
  4471. // Get the number of parameters.
  4472. int paramCount = lua_gettop(state);
  4473. // Attempt to match the parameters to a valid binding.
  4474. switch (paramCount)
  4475. {
  4476. case 5:
  4477. {
  4478. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4479. lua_type(state, 2) == LUA_TNUMBER &&
  4480. lua_type(state, 3) == LUA_TNUMBER &&
  4481. lua_type(state, 4) == LUA_TNUMBER &&
  4482. lua_type(state, 5) == LUA_TNUMBER)
  4483. {
  4484. // Get parameter 1 off the stack.
  4485. float param1 = (float)luaL_checknumber(state, 2);
  4486. // Get parameter 2 off the stack.
  4487. float param2 = (float)luaL_checknumber(state, 3);
  4488. // Get parameter 3 off the stack.
  4489. float param3 = (float)luaL_checknumber(state, 4);
  4490. // Get parameter 4 off the stack.
  4491. float param4 = (float)luaL_checknumber(state, 5);
  4492. Form* instance = getInstance(state);
  4493. instance->setMargin(param1, param2, param3, param4);
  4494. return 0;
  4495. }
  4496. lua_pushstring(state, "lua_Form_setMargin - Failed to match the given parameters to a valid function signature.");
  4497. lua_error(state);
  4498. break;
  4499. }
  4500. default:
  4501. {
  4502. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  4503. lua_error(state);
  4504. break;
  4505. }
  4506. }
  4507. return 0;
  4508. }
  4509. int lua_Form_setNode(lua_State* state)
  4510. {
  4511. // Get the number of parameters.
  4512. int paramCount = lua_gettop(state);
  4513. // Attempt to match the parameters to a valid binding.
  4514. switch (paramCount)
  4515. {
  4516. case 2:
  4517. {
  4518. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4519. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4520. {
  4521. // Get parameter 1 off the stack.
  4522. bool param1Valid;
  4523. gameplay::ScriptUtil::LuaArray<Node> param1 = gameplay::ScriptUtil::getObjectPointer<Node>(2, "Node", false, &param1Valid);
  4524. if (!param1Valid)
  4525. {
  4526. lua_pushstring(state, "Failed to convert parameter 1 to type 'Node'.");
  4527. lua_error(state);
  4528. }
  4529. Form* instance = getInstance(state);
  4530. instance->setNode(param1);
  4531. return 0;
  4532. }
  4533. lua_pushstring(state, "lua_Form_setNode - Failed to match the given parameters to a valid function signature.");
  4534. lua_error(state);
  4535. break;
  4536. }
  4537. default:
  4538. {
  4539. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4540. lua_error(state);
  4541. break;
  4542. }
  4543. }
  4544. return 0;
  4545. }
  4546. int lua_Form_setOpacity(lua_State* state)
  4547. {
  4548. // Get the number of parameters.
  4549. int paramCount = lua_gettop(state);
  4550. // Attempt to match the parameters to a valid binding.
  4551. switch (paramCount)
  4552. {
  4553. case 2:
  4554. {
  4555. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4556. lua_type(state, 2) == LUA_TNUMBER)
  4557. {
  4558. // Get parameter 1 off the stack.
  4559. float param1 = (float)luaL_checknumber(state, 2);
  4560. Form* instance = getInstance(state);
  4561. instance->setOpacity(param1);
  4562. return 0;
  4563. }
  4564. lua_pushstring(state, "lua_Form_setOpacity - Failed to match the given parameters to a valid function signature.");
  4565. lua_error(state);
  4566. break;
  4567. }
  4568. case 3:
  4569. {
  4570. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4571. lua_type(state, 2) == LUA_TNUMBER &&
  4572. lua_type(state, 3) == LUA_TNUMBER)
  4573. {
  4574. // Get parameter 1 off the stack.
  4575. float param1 = (float)luaL_checknumber(state, 2);
  4576. // Get parameter 2 off the stack.
  4577. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4578. Form* instance = getInstance(state);
  4579. instance->setOpacity(param1, param2);
  4580. return 0;
  4581. }
  4582. lua_pushstring(state, "lua_Form_setOpacity - Failed to match the given parameters to a valid function signature.");
  4583. lua_error(state);
  4584. break;
  4585. }
  4586. default:
  4587. {
  4588. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4589. lua_error(state);
  4590. break;
  4591. }
  4592. }
  4593. return 0;
  4594. }
  4595. int lua_Form_setPadding(lua_State* state)
  4596. {
  4597. // Get the number of parameters.
  4598. int paramCount = lua_gettop(state);
  4599. // Attempt to match the parameters to a valid binding.
  4600. switch (paramCount)
  4601. {
  4602. case 5:
  4603. {
  4604. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4605. lua_type(state, 2) == LUA_TNUMBER &&
  4606. lua_type(state, 3) == LUA_TNUMBER &&
  4607. lua_type(state, 4) == LUA_TNUMBER &&
  4608. lua_type(state, 5) == LUA_TNUMBER)
  4609. {
  4610. // Get parameter 1 off the stack.
  4611. float param1 = (float)luaL_checknumber(state, 2);
  4612. // Get parameter 2 off the stack.
  4613. float param2 = (float)luaL_checknumber(state, 3);
  4614. // Get parameter 3 off the stack.
  4615. float param3 = (float)luaL_checknumber(state, 4);
  4616. // Get parameter 4 off the stack.
  4617. float param4 = (float)luaL_checknumber(state, 5);
  4618. Form* instance = getInstance(state);
  4619. instance->setPadding(param1, param2, param3, param4);
  4620. return 0;
  4621. }
  4622. lua_pushstring(state, "lua_Form_setPadding - Failed to match the given parameters to a valid function signature.");
  4623. lua_error(state);
  4624. break;
  4625. }
  4626. default:
  4627. {
  4628. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  4629. lua_error(state);
  4630. break;
  4631. }
  4632. }
  4633. return 0;
  4634. }
  4635. int lua_Form_setPosition(lua_State* state)
  4636. {
  4637. // Get the number of parameters.
  4638. int paramCount = lua_gettop(state);
  4639. // Attempt to match the parameters to a valid binding.
  4640. switch (paramCount)
  4641. {
  4642. case 3:
  4643. {
  4644. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4645. lua_type(state, 2) == LUA_TNUMBER &&
  4646. lua_type(state, 3) == LUA_TNUMBER)
  4647. {
  4648. // Get parameter 1 off the stack.
  4649. float param1 = (float)luaL_checknumber(state, 2);
  4650. // Get parameter 2 off the stack.
  4651. float param2 = (float)luaL_checknumber(state, 3);
  4652. Form* instance = getInstance(state);
  4653. instance->setPosition(param1, param2);
  4654. return 0;
  4655. }
  4656. lua_pushstring(state, "lua_Form_setPosition - Failed to match the given parameters to a valid function signature.");
  4657. lua_error(state);
  4658. break;
  4659. }
  4660. default:
  4661. {
  4662. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  4663. lua_error(state);
  4664. break;
  4665. }
  4666. }
  4667. return 0;
  4668. }
  4669. int lua_Form_setScroll(lua_State* state)
  4670. {
  4671. // Get the number of parameters.
  4672. int paramCount = lua_gettop(state);
  4673. // Attempt to match the parameters to a valid binding.
  4674. switch (paramCount)
  4675. {
  4676. case 2:
  4677. {
  4678. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4679. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4680. {
  4681. // Get parameter 1 off the stack.
  4682. Container::Scroll param1 = (Container::Scroll)lua_enumFromString_ContainerScroll(luaL_checkstring(state, 2));
  4683. Form* instance = getInstance(state);
  4684. instance->setScroll(param1);
  4685. return 0;
  4686. }
  4687. lua_pushstring(state, "lua_Form_setScroll - Failed to match the given parameters to a valid function signature.");
  4688. lua_error(state);
  4689. break;
  4690. }
  4691. default:
  4692. {
  4693. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4694. lua_error(state);
  4695. break;
  4696. }
  4697. }
  4698. return 0;
  4699. }
  4700. int lua_Form_setScrollBarsAutoHide(lua_State* state)
  4701. {
  4702. // Get the number of parameters.
  4703. int paramCount = lua_gettop(state);
  4704. // Attempt to match the parameters to a valid binding.
  4705. switch (paramCount)
  4706. {
  4707. case 2:
  4708. {
  4709. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4710. lua_type(state, 2) == LUA_TBOOLEAN)
  4711. {
  4712. // Get parameter 1 off the stack.
  4713. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  4714. Form* instance = getInstance(state);
  4715. instance->setScrollBarsAutoHide(param1);
  4716. return 0;
  4717. }
  4718. lua_pushstring(state, "lua_Form_setScrollBarsAutoHide - Failed to match the given parameters to a valid function signature.");
  4719. lua_error(state);
  4720. break;
  4721. }
  4722. default:
  4723. {
  4724. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4725. lua_error(state);
  4726. break;
  4727. }
  4728. }
  4729. return 0;
  4730. }
  4731. int lua_Form_setScrollPosition(lua_State* state)
  4732. {
  4733. // Get the number of parameters.
  4734. int paramCount = lua_gettop(state);
  4735. // Attempt to match the parameters to a valid binding.
  4736. switch (paramCount)
  4737. {
  4738. case 2:
  4739. {
  4740. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4741. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4742. {
  4743. // Get parameter 1 off the stack.
  4744. bool param1Valid;
  4745. gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", true, &param1Valid);
  4746. if (!param1Valid)
  4747. {
  4748. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector2'.");
  4749. lua_error(state);
  4750. }
  4751. Form* instance = getInstance(state);
  4752. instance->setScrollPosition(*param1);
  4753. return 0;
  4754. }
  4755. lua_pushstring(state, "lua_Form_setScrollPosition - Failed to match the given parameters to a valid function signature.");
  4756. lua_error(state);
  4757. break;
  4758. }
  4759. default:
  4760. {
  4761. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4762. lua_error(state);
  4763. break;
  4764. }
  4765. }
  4766. return 0;
  4767. }
  4768. int lua_Form_setScrollWheelRequiresFocus(lua_State* state)
  4769. {
  4770. // Get the number of parameters.
  4771. int paramCount = lua_gettop(state);
  4772. // Attempt to match the parameters to a valid binding.
  4773. switch (paramCount)
  4774. {
  4775. case 2:
  4776. {
  4777. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4778. lua_type(state, 2) == LUA_TBOOLEAN)
  4779. {
  4780. // Get parameter 1 off the stack.
  4781. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  4782. Form* instance = getInstance(state);
  4783. instance->setScrollWheelRequiresFocus(param1);
  4784. return 0;
  4785. }
  4786. lua_pushstring(state, "lua_Form_setScrollWheelRequiresFocus - Failed to match the given parameters to a valid function signature.");
  4787. lua_error(state);
  4788. break;
  4789. }
  4790. default:
  4791. {
  4792. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4793. lua_error(state);
  4794. break;
  4795. }
  4796. }
  4797. return 0;
  4798. }
  4799. int lua_Form_setScrollWheelSpeed(lua_State* state)
  4800. {
  4801. // Get the number of parameters.
  4802. int paramCount = lua_gettop(state);
  4803. // Attempt to match the parameters to a valid binding.
  4804. switch (paramCount)
  4805. {
  4806. case 2:
  4807. {
  4808. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4809. lua_type(state, 2) == LUA_TNUMBER)
  4810. {
  4811. // Get parameter 1 off the stack.
  4812. float param1 = (float)luaL_checknumber(state, 2);
  4813. Form* instance = getInstance(state);
  4814. instance->setScrollWheelSpeed(param1);
  4815. return 0;
  4816. }
  4817. lua_pushstring(state, "lua_Form_setScrollWheelSpeed - Failed to match the given parameters to a valid function signature.");
  4818. lua_error(state);
  4819. break;
  4820. }
  4821. default:
  4822. {
  4823. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4824. lua_error(state);
  4825. break;
  4826. }
  4827. }
  4828. return 0;
  4829. }
  4830. int lua_Form_setScrollingFriction(lua_State* state)
  4831. {
  4832. // Get the number of parameters.
  4833. int paramCount = lua_gettop(state);
  4834. // Attempt to match the parameters to a valid binding.
  4835. switch (paramCount)
  4836. {
  4837. case 2:
  4838. {
  4839. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4840. lua_type(state, 2) == LUA_TNUMBER)
  4841. {
  4842. // Get parameter 1 off the stack.
  4843. float param1 = (float)luaL_checknumber(state, 2);
  4844. Form* instance = getInstance(state);
  4845. instance->setScrollingFriction(param1);
  4846. return 0;
  4847. }
  4848. lua_pushstring(state, "lua_Form_setScrollingFriction - Failed to match the given parameters to a valid function signature.");
  4849. lua_error(state);
  4850. break;
  4851. }
  4852. default:
  4853. {
  4854. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4855. lua_error(state);
  4856. break;
  4857. }
  4858. }
  4859. return 0;
  4860. }
  4861. int lua_Form_setSize(lua_State* state)
  4862. {
  4863. // Get the number of parameters.
  4864. int paramCount = lua_gettop(state);
  4865. // Attempt to match the parameters to a valid binding.
  4866. switch (paramCount)
  4867. {
  4868. case 3:
  4869. {
  4870. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4871. lua_type(state, 2) == LUA_TNUMBER &&
  4872. lua_type(state, 3) == LUA_TNUMBER)
  4873. {
  4874. // Get parameter 1 off the stack.
  4875. float param1 = (float)luaL_checknumber(state, 2);
  4876. // Get parameter 2 off the stack.
  4877. float param2 = (float)luaL_checknumber(state, 3);
  4878. Form* instance = getInstance(state);
  4879. instance->setSize(param1, param2);
  4880. return 0;
  4881. }
  4882. lua_pushstring(state, "lua_Form_setSize - Failed to match the given parameters to a valid function signature.");
  4883. lua_error(state);
  4884. break;
  4885. }
  4886. default:
  4887. {
  4888. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  4889. lua_error(state);
  4890. break;
  4891. }
  4892. }
  4893. return 0;
  4894. }
  4895. int lua_Form_setSkinColor(lua_State* state)
  4896. {
  4897. // Get the number of parameters.
  4898. int paramCount = lua_gettop(state);
  4899. // Attempt to match the parameters to a valid binding.
  4900. switch (paramCount)
  4901. {
  4902. case 2:
  4903. {
  4904. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4905. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4906. {
  4907. // Get parameter 1 off the stack.
  4908. bool param1Valid;
  4909. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  4910. if (!param1Valid)
  4911. {
  4912. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  4913. lua_error(state);
  4914. }
  4915. Form* instance = getInstance(state);
  4916. instance->setSkinColor(*param1);
  4917. return 0;
  4918. }
  4919. lua_pushstring(state, "lua_Form_setSkinColor - Failed to match the given parameters to a valid function signature.");
  4920. lua_error(state);
  4921. break;
  4922. }
  4923. case 3:
  4924. {
  4925. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4926. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  4927. lua_type(state, 3) == LUA_TNUMBER)
  4928. {
  4929. // Get parameter 1 off the stack.
  4930. bool param1Valid;
  4931. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  4932. if (!param1Valid)
  4933. {
  4934. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  4935. lua_error(state);
  4936. }
  4937. // Get parameter 2 off the stack.
  4938. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4939. Form* instance = getInstance(state);
  4940. instance->setSkinColor(*param1, param2);
  4941. return 0;
  4942. }
  4943. lua_pushstring(state, "lua_Form_setSkinColor - Failed to match the given parameters to a valid function signature.");
  4944. lua_error(state);
  4945. break;
  4946. }
  4947. default:
  4948. {
  4949. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4950. lua_error(state);
  4951. break;
  4952. }
  4953. }
  4954. return 0;
  4955. }
  4956. int lua_Form_setSkinRegion(lua_State* state)
  4957. {
  4958. // Get the number of parameters.
  4959. int paramCount = lua_gettop(state);
  4960. // Attempt to match the parameters to a valid binding.
  4961. switch (paramCount)
  4962. {
  4963. case 2:
  4964. {
  4965. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4966. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4967. {
  4968. // Get parameter 1 off the stack.
  4969. bool param1Valid;
  4970. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  4971. if (!param1Valid)
  4972. {
  4973. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  4974. lua_error(state);
  4975. }
  4976. Form* instance = getInstance(state);
  4977. instance->setSkinRegion(*param1);
  4978. return 0;
  4979. }
  4980. lua_pushstring(state, "lua_Form_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  4981. lua_error(state);
  4982. break;
  4983. }
  4984. case 3:
  4985. {
  4986. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4987. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  4988. lua_type(state, 3) == LUA_TNUMBER)
  4989. {
  4990. // Get parameter 1 off the stack.
  4991. bool param1Valid;
  4992. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  4993. if (!param1Valid)
  4994. {
  4995. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  4996. lua_error(state);
  4997. }
  4998. // Get parameter 2 off the stack.
  4999. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  5000. Form* instance = getInstance(state);
  5001. instance->setSkinRegion(*param1, param2);
  5002. return 0;
  5003. }
  5004. lua_pushstring(state, "lua_Form_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  5005. lua_error(state);
  5006. break;
  5007. }
  5008. default:
  5009. {
  5010. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5011. lua_error(state);
  5012. break;
  5013. }
  5014. }
  5015. return 0;
  5016. }
  5017. int lua_Form_setStyle(lua_State* state)
  5018. {
  5019. // Get the number of parameters.
  5020. int paramCount = lua_gettop(state);
  5021. // Attempt to match the parameters to a valid binding.
  5022. switch (paramCount)
  5023. {
  5024. case 2:
  5025. {
  5026. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5027. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  5028. {
  5029. // Get parameter 1 off the stack.
  5030. bool param1Valid;
  5031. gameplay::ScriptUtil::LuaArray<Theme::Style> param1 = gameplay::ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false, &param1Valid);
  5032. if (!param1Valid)
  5033. {
  5034. lua_pushstring(state, "Failed to convert parameter 1 to type 'Theme::Style'.");
  5035. lua_error(state);
  5036. }
  5037. Form* instance = getInstance(state);
  5038. instance->setStyle(param1);
  5039. return 0;
  5040. }
  5041. lua_pushstring(state, "lua_Form_setStyle - Failed to match the given parameters to a valid function signature.");
  5042. lua_error(state);
  5043. break;
  5044. }
  5045. default:
  5046. {
  5047. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5048. lua_error(state);
  5049. break;
  5050. }
  5051. }
  5052. return 0;
  5053. }
  5054. int lua_Form_setTextAlignment(lua_State* state)
  5055. {
  5056. // Get the number of parameters.
  5057. int paramCount = lua_gettop(state);
  5058. // Attempt to match the parameters to a valid binding.
  5059. switch (paramCount)
  5060. {
  5061. case 2:
  5062. {
  5063. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5064. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  5065. {
  5066. // Get parameter 1 off the stack.
  5067. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  5068. Form* instance = getInstance(state);
  5069. instance->setTextAlignment(param1);
  5070. return 0;
  5071. }
  5072. lua_pushstring(state, "lua_Form_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  5073. lua_error(state);
  5074. break;
  5075. }
  5076. case 3:
  5077. {
  5078. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5079. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  5080. lua_type(state, 3) == LUA_TNUMBER)
  5081. {
  5082. // Get parameter 1 off the stack.
  5083. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  5084. // Get parameter 2 off the stack.
  5085. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  5086. Form* instance = getInstance(state);
  5087. instance->setTextAlignment(param1, param2);
  5088. return 0;
  5089. }
  5090. lua_pushstring(state, "lua_Form_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  5091. lua_error(state);
  5092. break;
  5093. }
  5094. default:
  5095. {
  5096. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5097. lua_error(state);
  5098. break;
  5099. }
  5100. }
  5101. return 0;
  5102. }
  5103. int lua_Form_setTextColor(lua_State* state)
  5104. {
  5105. // Get the number of parameters.
  5106. int paramCount = lua_gettop(state);
  5107. // Attempt to match the parameters to a valid binding.
  5108. switch (paramCount)
  5109. {
  5110. case 2:
  5111. {
  5112. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5113. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  5114. {
  5115. // Get parameter 1 off the stack.
  5116. bool param1Valid;
  5117. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  5118. if (!param1Valid)
  5119. {
  5120. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  5121. lua_error(state);
  5122. }
  5123. Form* instance = getInstance(state);
  5124. instance->setTextColor(*param1);
  5125. return 0;
  5126. }
  5127. lua_pushstring(state, "lua_Form_setTextColor - Failed to match the given parameters to a valid function signature.");
  5128. lua_error(state);
  5129. break;
  5130. }
  5131. case 3:
  5132. {
  5133. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5134. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  5135. lua_type(state, 3) == LUA_TNUMBER)
  5136. {
  5137. // Get parameter 1 off the stack.
  5138. bool param1Valid;
  5139. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  5140. if (!param1Valid)
  5141. {
  5142. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  5143. lua_error(state);
  5144. }
  5145. // Get parameter 2 off the stack.
  5146. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  5147. Form* instance = getInstance(state);
  5148. instance->setTextColor(*param1, param2);
  5149. return 0;
  5150. }
  5151. lua_pushstring(state, "lua_Form_setTextColor - Failed to match the given parameters to a valid function signature.");
  5152. lua_error(state);
  5153. break;
  5154. }
  5155. default:
  5156. {
  5157. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5158. lua_error(state);
  5159. break;
  5160. }
  5161. }
  5162. return 0;
  5163. }
  5164. int lua_Form_setTextRightToLeft(lua_State* state)
  5165. {
  5166. // Get the number of parameters.
  5167. int paramCount = lua_gettop(state);
  5168. // Attempt to match the parameters to a valid binding.
  5169. switch (paramCount)
  5170. {
  5171. case 2:
  5172. {
  5173. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5174. lua_type(state, 2) == LUA_TBOOLEAN)
  5175. {
  5176. // Get parameter 1 off the stack.
  5177. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  5178. Form* instance = getInstance(state);
  5179. instance->setTextRightToLeft(param1);
  5180. return 0;
  5181. }
  5182. lua_pushstring(state, "lua_Form_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  5183. lua_error(state);
  5184. break;
  5185. }
  5186. case 3:
  5187. {
  5188. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5189. lua_type(state, 2) == LUA_TBOOLEAN &&
  5190. lua_type(state, 3) == LUA_TNUMBER)
  5191. {
  5192. // Get parameter 1 off the stack.
  5193. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  5194. // Get parameter 2 off the stack.
  5195. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  5196. Form* instance = getInstance(state);
  5197. instance->setTextRightToLeft(param1, param2);
  5198. return 0;
  5199. }
  5200. lua_pushstring(state, "lua_Form_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  5201. lua_error(state);
  5202. break;
  5203. }
  5204. default:
  5205. {
  5206. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5207. lua_error(state);
  5208. break;
  5209. }
  5210. }
  5211. return 0;
  5212. }
  5213. int lua_Form_setVisible(lua_State* state)
  5214. {
  5215. // Get the number of parameters.
  5216. int paramCount = lua_gettop(state);
  5217. // Attempt to match the parameters to a valid binding.
  5218. switch (paramCount)
  5219. {
  5220. case 2:
  5221. {
  5222. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5223. lua_type(state, 2) == LUA_TBOOLEAN)
  5224. {
  5225. // Get parameter 1 off the stack.
  5226. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  5227. Form* instance = getInstance(state);
  5228. instance->setVisible(param1);
  5229. return 0;
  5230. }
  5231. lua_pushstring(state, "lua_Form_setVisible - Failed to match the given parameters to a valid function signature.");
  5232. lua_error(state);
  5233. break;
  5234. }
  5235. default:
  5236. {
  5237. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5238. lua_error(state);
  5239. break;
  5240. }
  5241. }
  5242. return 0;
  5243. }
  5244. int lua_Form_setWidth(lua_State* state)
  5245. {
  5246. // Get the number of parameters.
  5247. int paramCount = lua_gettop(state);
  5248. // Attempt to match the parameters to a valid binding.
  5249. switch (paramCount)
  5250. {
  5251. case 2:
  5252. {
  5253. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5254. lua_type(state, 2) == LUA_TNUMBER)
  5255. {
  5256. // Get parameter 1 off the stack.
  5257. float param1 = (float)luaL_checknumber(state, 2);
  5258. Form* instance = getInstance(state);
  5259. instance->setWidth(param1);
  5260. return 0;
  5261. }
  5262. lua_pushstring(state, "lua_Form_setWidth - Failed to match the given parameters to a valid function signature.");
  5263. lua_error(state);
  5264. break;
  5265. }
  5266. case 3:
  5267. {
  5268. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5269. lua_type(state, 2) == LUA_TNUMBER &&
  5270. lua_type(state, 3) == LUA_TBOOLEAN)
  5271. {
  5272. // Get parameter 1 off the stack.
  5273. float param1 = (float)luaL_checknumber(state, 2);
  5274. // Get parameter 2 off the stack.
  5275. bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
  5276. Form* instance = getInstance(state);
  5277. instance->setWidth(param1, param2);
  5278. return 0;
  5279. }
  5280. lua_pushstring(state, "lua_Form_setWidth - Failed to match the given parameters to a valid function signature.");
  5281. lua_error(state);
  5282. break;
  5283. }
  5284. default:
  5285. {
  5286. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5287. lua_error(state);
  5288. break;
  5289. }
  5290. }
  5291. return 0;
  5292. }
  5293. int lua_Form_setX(lua_State* state)
  5294. {
  5295. // Get the number of parameters.
  5296. int paramCount = lua_gettop(state);
  5297. // Attempt to match the parameters to a valid binding.
  5298. switch (paramCount)
  5299. {
  5300. case 2:
  5301. {
  5302. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5303. lua_type(state, 2) == LUA_TNUMBER)
  5304. {
  5305. // Get parameter 1 off the stack.
  5306. float param1 = (float)luaL_checknumber(state, 2);
  5307. Form* instance = getInstance(state);
  5308. instance->setX(param1);
  5309. return 0;
  5310. }
  5311. lua_pushstring(state, "lua_Form_setX - Failed to match the given parameters to a valid function signature.");
  5312. lua_error(state);
  5313. break;
  5314. }
  5315. case 3:
  5316. {
  5317. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5318. lua_type(state, 2) == LUA_TNUMBER &&
  5319. lua_type(state, 3) == LUA_TBOOLEAN)
  5320. {
  5321. // Get parameter 1 off the stack.
  5322. float param1 = (float)luaL_checknumber(state, 2);
  5323. // Get parameter 2 off the stack.
  5324. bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
  5325. Form* instance = getInstance(state);
  5326. instance->setX(param1, param2);
  5327. return 0;
  5328. }
  5329. lua_pushstring(state, "lua_Form_setX - Failed to match the given parameters to a valid function signature.");
  5330. lua_error(state);
  5331. break;
  5332. }
  5333. default:
  5334. {
  5335. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5336. lua_error(state);
  5337. break;
  5338. }
  5339. }
  5340. return 0;
  5341. }
  5342. int lua_Form_setY(lua_State* state)
  5343. {
  5344. // Get the number of parameters.
  5345. int paramCount = lua_gettop(state);
  5346. // Attempt to match the parameters to a valid binding.
  5347. switch (paramCount)
  5348. {
  5349. case 2:
  5350. {
  5351. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5352. lua_type(state, 2) == LUA_TNUMBER)
  5353. {
  5354. // Get parameter 1 off the stack.
  5355. float param1 = (float)luaL_checknumber(state, 2);
  5356. Form* instance = getInstance(state);
  5357. instance->setY(param1);
  5358. return 0;
  5359. }
  5360. lua_pushstring(state, "lua_Form_setY - Failed to match the given parameters to a valid function signature.");
  5361. lua_error(state);
  5362. break;
  5363. }
  5364. case 3:
  5365. {
  5366. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5367. lua_type(state, 2) == LUA_TNUMBER &&
  5368. lua_type(state, 3) == LUA_TBOOLEAN)
  5369. {
  5370. // Get parameter 1 off the stack.
  5371. float param1 = (float)luaL_checknumber(state, 2);
  5372. // Get parameter 2 off the stack.
  5373. bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
  5374. Form* instance = getInstance(state);
  5375. instance->setY(param1, param2);
  5376. return 0;
  5377. }
  5378. lua_pushstring(state, "lua_Form_setY - Failed to match the given parameters to a valid function signature.");
  5379. lua_error(state);
  5380. break;
  5381. }
  5382. default:
  5383. {
  5384. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5385. lua_error(state);
  5386. break;
  5387. }
  5388. }
  5389. return 0;
  5390. }
  5391. int lua_Form_setZIndex(lua_State* state)
  5392. {
  5393. // Get the number of parameters.
  5394. int paramCount = lua_gettop(state);
  5395. // Attempt to match the parameters to a valid binding.
  5396. switch (paramCount)
  5397. {
  5398. case 2:
  5399. {
  5400. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5401. lua_type(state, 2) == LUA_TNUMBER)
  5402. {
  5403. // Get parameter 1 off the stack.
  5404. int param1 = (int)luaL_checkint(state, 2);
  5405. Form* instance = getInstance(state);
  5406. instance->setZIndex(param1);
  5407. return 0;
  5408. }
  5409. lua_pushstring(state, "lua_Form_setZIndex - Failed to match the given parameters to a valid function signature.");
  5410. lua_error(state);
  5411. break;
  5412. }
  5413. default:
  5414. {
  5415. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5416. lua_error(state);
  5417. break;
  5418. }
  5419. }
  5420. return 0;
  5421. }
  5422. int lua_Form_static_ANIMATE_OPACITY(lua_State* state)
  5423. {
  5424. // Validate the number of parameters.
  5425. if (lua_gettop(state) > 0)
  5426. {
  5427. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5428. lua_error(state);
  5429. }
  5430. int result = Form::ANIMATE_OPACITY;
  5431. // Push the return value onto the stack.
  5432. lua_pushinteger(state, result);
  5433. return 1;
  5434. }
  5435. int lua_Form_static_ANIMATE_POSITION(lua_State* state)
  5436. {
  5437. // Validate the number of parameters.
  5438. if (lua_gettop(state) > 0)
  5439. {
  5440. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5441. lua_error(state);
  5442. }
  5443. int result = Form::ANIMATE_POSITION;
  5444. // Push the return value onto the stack.
  5445. lua_pushinteger(state, result);
  5446. return 1;
  5447. }
  5448. int lua_Form_static_ANIMATE_POSITION_X(lua_State* state)
  5449. {
  5450. // Validate the number of parameters.
  5451. if (lua_gettop(state) > 0)
  5452. {
  5453. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5454. lua_error(state);
  5455. }
  5456. int result = Form::ANIMATE_POSITION_X;
  5457. // Push the return value onto the stack.
  5458. lua_pushinteger(state, result);
  5459. return 1;
  5460. }
  5461. int lua_Form_static_ANIMATE_POSITION_Y(lua_State* state)
  5462. {
  5463. // Validate the number of parameters.
  5464. if (lua_gettop(state) > 0)
  5465. {
  5466. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5467. lua_error(state);
  5468. }
  5469. int result = Form::ANIMATE_POSITION_Y;
  5470. // Push the return value onto the stack.
  5471. lua_pushinteger(state, result);
  5472. return 1;
  5473. }
  5474. int lua_Form_static_ANIMATE_SCROLLBAR_OPACITY(lua_State* state)
  5475. {
  5476. // Validate the number of parameters.
  5477. if (lua_gettop(state) > 0)
  5478. {
  5479. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5480. lua_error(state);
  5481. }
  5482. int result = Form::ANIMATE_SCROLLBAR_OPACITY;
  5483. // Push the return value onto the stack.
  5484. lua_pushinteger(state, result);
  5485. return 1;
  5486. }
  5487. int lua_Form_static_ANIMATE_SIZE(lua_State* state)
  5488. {
  5489. // Validate the number of parameters.
  5490. if (lua_gettop(state) > 0)
  5491. {
  5492. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5493. lua_error(state);
  5494. }
  5495. int result = Form::ANIMATE_SIZE;
  5496. // Push the return value onto the stack.
  5497. lua_pushinteger(state, result);
  5498. return 1;
  5499. }
  5500. int lua_Form_static_ANIMATE_SIZE_HEIGHT(lua_State* state)
  5501. {
  5502. // Validate the number of parameters.
  5503. if (lua_gettop(state) > 0)
  5504. {
  5505. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5506. lua_error(state);
  5507. }
  5508. int result = Form::ANIMATE_SIZE_HEIGHT;
  5509. // Push the return value onto the stack.
  5510. lua_pushinteger(state, result);
  5511. return 1;
  5512. }
  5513. int lua_Form_static_ANIMATE_SIZE_WIDTH(lua_State* state)
  5514. {
  5515. // Validate the number of parameters.
  5516. if (lua_gettop(state) > 0)
  5517. {
  5518. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5519. lua_error(state);
  5520. }
  5521. int result = Form::ANIMATE_SIZE_WIDTH;
  5522. // Push the return value onto the stack.
  5523. lua_pushinteger(state, result);
  5524. return 1;
  5525. }
  5526. int lua_Form_static_clearFocus(lua_State* state)
  5527. {
  5528. // Get the number of parameters.
  5529. int paramCount = lua_gettop(state);
  5530. // Attempt to match the parameters to a valid binding.
  5531. switch (paramCount)
  5532. {
  5533. case 0:
  5534. {
  5535. Form::clearFocus();
  5536. return 0;
  5537. break;
  5538. }
  5539. default:
  5540. {
  5541. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5542. lua_error(state);
  5543. break;
  5544. }
  5545. }
  5546. return 0;
  5547. }
  5548. int lua_Form_static_create(lua_State* state)
  5549. {
  5550. // Get the number of parameters.
  5551. int paramCount = lua_gettop(state);
  5552. // Attempt to match the parameters to a valid binding.
  5553. switch (paramCount)
  5554. {
  5555. case 1:
  5556. {
  5557. do
  5558. {
  5559. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
  5560. {
  5561. // Get parameter 1 off the stack.
  5562. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  5563. void* returnPtr = (void*)Form::create(param1);
  5564. if (returnPtr)
  5565. {
  5566. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5567. object->instance = returnPtr;
  5568. object->owns = true;
  5569. luaL_getmetatable(state, "Form");
  5570. lua_setmetatable(state, -2);
  5571. }
  5572. else
  5573. {
  5574. lua_pushnil(state);
  5575. }
  5576. return 1;
  5577. }
  5578. } while (0);
  5579. lua_pushstring(state, "lua_Form_static_create - Failed to match the given parameters to a valid function signature.");
  5580. lua_error(state);
  5581. break;
  5582. }
  5583. case 2:
  5584. {
  5585. do
  5586. {
  5587. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL) &&
  5588. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  5589. {
  5590. // Get parameter 1 off the stack.
  5591. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  5592. // Get parameter 2 off the stack.
  5593. bool param2Valid;
  5594. gameplay::ScriptUtil::LuaArray<Theme::Style> param2 = gameplay::ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false, &param2Valid);
  5595. if (!param2Valid)
  5596. break;
  5597. void* returnPtr = (void*)Form::create(param1, param2);
  5598. if (returnPtr)
  5599. {
  5600. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5601. object->instance = returnPtr;
  5602. object->owns = true;
  5603. luaL_getmetatable(state, "Form");
  5604. lua_setmetatable(state, -2);
  5605. }
  5606. else
  5607. {
  5608. lua_pushnil(state);
  5609. }
  5610. return 1;
  5611. }
  5612. } while (0);
  5613. lua_pushstring(state, "lua_Form_static_create - Failed to match the given parameters to a valid function signature.");
  5614. lua_error(state);
  5615. break;
  5616. }
  5617. case 3:
  5618. {
  5619. do
  5620. {
  5621. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL) &&
  5622. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  5623. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  5624. {
  5625. // Get parameter 1 off the stack.
  5626. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  5627. // Get parameter 2 off the stack.
  5628. bool param2Valid;
  5629. gameplay::ScriptUtil::LuaArray<Theme::Style> param2 = gameplay::ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false, &param2Valid);
  5630. if (!param2Valid)
  5631. break;
  5632. // Get parameter 3 off the stack.
  5633. Layout::Type param3 = (Layout::Type)lua_enumFromString_LayoutType(luaL_checkstring(state, 3));
  5634. void* returnPtr = (void*)Form::create(param1, param2, param3);
  5635. if (returnPtr)
  5636. {
  5637. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5638. object->instance = returnPtr;
  5639. object->owns = true;
  5640. luaL_getmetatable(state, "Form");
  5641. lua_setmetatable(state, -2);
  5642. }
  5643. else
  5644. {
  5645. lua_pushnil(state);
  5646. }
  5647. return 1;
  5648. }
  5649. } while (0);
  5650. lua_pushstring(state, "lua_Form_static_create - Failed to match the given parameters to a valid function signature.");
  5651. lua_error(state);
  5652. break;
  5653. }
  5654. default:
  5655. {
  5656. lua_pushstring(state, "Invalid number of parameters (expected 1, 2 or 3).");
  5657. lua_error(state);
  5658. break;
  5659. }
  5660. }
  5661. return 0;
  5662. }
  5663. int lua_Form_static_getActiveControl(lua_State* state)
  5664. {
  5665. // Get the number of parameters.
  5666. int paramCount = lua_gettop(state);
  5667. // Attempt to match the parameters to a valid binding.
  5668. switch (paramCount)
  5669. {
  5670. case 0:
  5671. {
  5672. void* returnPtr = (void*)Form::getActiveControl();
  5673. if (returnPtr)
  5674. {
  5675. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5676. object->instance = returnPtr;
  5677. object->owns = false;
  5678. luaL_getmetatable(state, "Control");
  5679. lua_setmetatable(state, -2);
  5680. }
  5681. else
  5682. {
  5683. lua_pushnil(state);
  5684. }
  5685. return 1;
  5686. break;
  5687. }
  5688. default:
  5689. {
  5690. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5691. lua_error(state);
  5692. break;
  5693. }
  5694. }
  5695. return 0;
  5696. }
  5697. int lua_Form_static_getFocusControl(lua_State* state)
  5698. {
  5699. // Get the number of parameters.
  5700. int paramCount = lua_gettop(state);
  5701. // Attempt to match the parameters to a valid binding.
  5702. switch (paramCount)
  5703. {
  5704. case 0:
  5705. {
  5706. void* returnPtr = (void*)Form::getFocusControl();
  5707. if (returnPtr)
  5708. {
  5709. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5710. object->instance = returnPtr;
  5711. object->owns = false;
  5712. luaL_getmetatable(state, "Control");
  5713. lua_setmetatable(state, -2);
  5714. }
  5715. else
  5716. {
  5717. lua_pushnil(state);
  5718. }
  5719. return 1;
  5720. break;
  5721. }
  5722. default:
  5723. {
  5724. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5725. lua_error(state);
  5726. break;
  5727. }
  5728. }
  5729. return 0;
  5730. }
  5731. int lua_Form_static_getForm(lua_State* state)
  5732. {
  5733. // Get the number of parameters.
  5734. int paramCount = lua_gettop(state);
  5735. // Attempt to match the parameters to a valid binding.
  5736. switch (paramCount)
  5737. {
  5738. case 1:
  5739. {
  5740. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
  5741. {
  5742. // Get parameter 1 off the stack.
  5743. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  5744. void* returnPtr = (void*)Form::getForm(param1);
  5745. if (returnPtr)
  5746. {
  5747. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5748. object->instance = returnPtr;
  5749. object->owns = false;
  5750. luaL_getmetatable(state, "Form");
  5751. lua_setmetatable(state, -2);
  5752. }
  5753. else
  5754. {
  5755. lua_pushnil(state);
  5756. }
  5757. return 1;
  5758. }
  5759. lua_pushstring(state, "lua_Form_static_getForm - Failed to match the given parameters to a valid function signature.");
  5760. lua_error(state);
  5761. break;
  5762. }
  5763. default:
  5764. {
  5765. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  5766. lua_error(state);
  5767. break;
  5768. }
  5769. }
  5770. return 0;
  5771. }
  5772. int lua_Form_stopScrolling(lua_State* state)
  5773. {
  5774. // Get the number of parameters.
  5775. int paramCount = lua_gettop(state);
  5776. // Attempt to match the parameters to a valid binding.
  5777. switch (paramCount)
  5778. {
  5779. case 1:
  5780. {
  5781. if ((lua_type(state, 1) == LUA_TUSERDATA))
  5782. {
  5783. Form* instance = getInstance(state);
  5784. instance->stopScrolling();
  5785. return 0;
  5786. }
  5787. lua_pushstring(state, "lua_Form_stopScrolling - Failed to match the given parameters to a valid function signature.");
  5788. lua_error(state);
  5789. break;
  5790. }
  5791. default:
  5792. {
  5793. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  5794. lua_error(state);
  5795. break;
  5796. }
  5797. }
  5798. return 0;
  5799. }
  5800. int lua_Form_update(lua_State* state)
  5801. {
  5802. // Get the number of parameters.
  5803. int paramCount = lua_gettop(state);
  5804. // Attempt to match the parameters to a valid binding.
  5805. switch (paramCount)
  5806. {
  5807. case 2:
  5808. {
  5809. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5810. lua_type(state, 2) == LUA_TNUMBER)
  5811. {
  5812. // Get parameter 1 off the stack.
  5813. float param1 = (float)luaL_checknumber(state, 2);
  5814. Form* instance = getInstance(state);
  5815. instance->update(param1);
  5816. return 0;
  5817. }
  5818. lua_pushstring(state, "lua_Form_update - Failed to match the given parameters to a valid function signature.");
  5819. lua_error(state);
  5820. break;
  5821. }
  5822. default:
  5823. {
  5824. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5825. lua_error(state);
  5826. break;
  5827. }
  5828. }
  5829. return 0;
  5830. }
  5831. }