lua_Form.cpp 191 KB

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