lua_ImageControl.cpp 162 KB

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