lua_Container.cpp 179 KB

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