lua_Container.cpp 181 KB

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