From 3fe3b4ca19dda4ad19262b3aad70e35e4eb9c143 Mon Sep 17 00:00:00 2001 From: MysterD Date: Fri, 6 May 2022 22:06:35 -0700 Subject: [PATCH] Add custom hud texture example --- docs/lua/examples/custom-hud-texture/main.lua | 7 +++++++ .../custom-hud-texture/textures/test.png | Bin 0 -> 990 bytes .../custom-hud-texture/textures/test.tex | Bin 0 -> 1000 bytes docs/lua/lua.md | 1 + 4 files changed, 8 insertions(+) create mode 100644 docs/lua/examples/custom-hud-texture/main.lua create mode 100644 docs/lua/examples/custom-hud-texture/textures/test.png create mode 100644 docs/lua/examples/custom-hud-texture/textures/test.tex diff --git a/docs/lua/examples/custom-hud-texture/main.lua b/docs/lua/examples/custom-hud-texture/main.lua new file mode 100644 index 00000000..13ded5d2 --- /dev/null +++ b/docs/lua/examples/custom-hud-texture/main.lua @@ -0,0 +1,7 @@ +function on_hud_render() + local texInfo = get_texture_info('test') + djui_hud_set_resolution(RESOLUTION_N64); + djui_hud_render_texture(texInfo, 0, 0, 1, 1) +end + +hook_event(HOOK_ON_HUD_RENDER, on_hud_render) \ No newline at end of file diff --git a/docs/lua/examples/custom-hud-texture/textures/test.png b/docs/lua/examples/custom-hud-texture/textures/test.png new file mode 100644 index 0000000000000000000000000000000000000000..9302f8d362f47aa763897a1e97fa1cd1f092a7e4 GIT binary patch literal 990 zcmV<410np0P)vT@l>5U~|(ECdVD z##iA#&{nWj5ClaKvGND_YDCsM*+4{emf8DpX3k~i3}}ghX?qPZu!|)(IT6=q=jQeB zGa`r4}W#zkRWaZ<1y4nDTd6#T7@6ym+VcI+L*M^8g8BzIFV_6alGDh$=vy_ddmkd}aC%YG z(mQar0Uh^_;TjdGUZ$4K!pjM?&OzHXG%W;KRo6MbgVdTl(G~3OL9gtOEPey@oM;7l z`vQ&t000SaNLh0L01sgR01sgSs6VG^0006NNkl;q7*NP|tWI2Vg*Jdmu^xRpgoz0M7wf@B~B-eUoGD>49hhz@a1{a+d@B zp_Ygflt3V1m6#gsx4P17UNYJXLVr35TYBbgIqxEzygMC&%H zF>_CckvA6~d&XyyB1yLB+|vSa_%s~t`9q!1jro`?rr+~lwEJA{@r10#n%m@n*D7NS z<5-&O@xzFKOL>KuWm_z*)%brQ>;-B7sv68vtpw>hd&nZ5;rSSJ$$<1<8h- z(xh7D+Psix17((-5o6VTpkkpq1+m!$phaHm-UX}1k}UYuY^V|CB1aDG8GSaGWT54k z`R=9EH+$C8fKmd#9k(=3K*InMOiO~ji2nq@t4@0B51)od!TbaG0V1~~J=I_hk^lez M07*qoM6N<$g1$}0OaK4? literal 0 HcmV?d00001 diff --git a/docs/lua/examples/custom-hud-texture/textures/test.tex b/docs/lua/examples/custom-hud-texture/textures/test.tex new file mode 100644 index 0000000000000000000000000000000000000000..afaef79b4859b282e9752b4f4f96ffbfb57dfe88 GIT binary patch literal 1000 zcmVP6ibbTO%RC@d^MZRCK0l6 z*-a3!6>Ka73(>|`;Xlw;uvHKQMG&#_2l#44);rliM0A$f`*CK@W#$ZMiGpc+4Kc8b zB{w+{*JtPE_3$$x!f5m{WSE{aHZ_&t-|=xvovJrc)$9L#e~#vi<(W{|C_HRBZb^7l zII&W46mJT*n|UK6d?4KK$^nHhm7WgxNpUXVH^pu$IS!iYspo!h`UjhN*B0&*?zRhM zvw9wNlNPHuGcC1KW)~hwCWxbxrpyurN<^g=C9}VMv5Ie!W$~EucUZ+0M~=LB`$a8F zS4(PEbW6Sht19>3d3xEwfuMU!972!2|JnoLZTQ;q{m(<+|2l&D2RJX*{L7Nl$h+uU zHLZIeBI|H^QPa{paJB&*_m1Hj6{%jPmd(P;3AD~Z+ch*T1X)$rIlhC`nmo}J?CwFY z?2jyd1N59|1$z4ejsO4v32;bRa{vGjVE_ORVF9Q=r)dBH0u@O_K~z{r?UuoA!!Qg( z*I|eDmi+%mwzu@QjR9W4GP2_$1A1A2BCcag6e-C*eg8fmZ+t%A=zDej^(uh-{l0GD z&HnTGybgJf+8qWUhx#qcvT^PpE|<#+Vid?OfOO1%ITaW^a!U02F6W~_PQ4_QvFr7^ zM$8!cD+!2tp63S(j9Zd48NlJ~c6(6Icq9j4Kx=y-N&r>lniBxe0a)+^L=JtEW9{jI zXac~YBp`B^1O1_vh!d1RAYql58vvf^MC*(=2-nqi`0&(~>9PRl-ozRW>m@KB>^Ix?4T<-CN ztj3z#h{XqpcE!bQcJKz=9ajT!P7IrPMcj*3*De0>2%%G*3Xo01`|~g1w0U1i-6Kdg~9LhDX8t1NZ?V Ww