lua_Container.cpp 192 KB

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