From dc3580d9764bcb526a230271023877eb9e6776cb Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Tue, 15 Sep 2020 16:18:12 +0200 Subject: [PATCH] 0.7 cursor --- data/editor/cursor.png | Bin 1238 -> 1717 bytes data/gui_cursor.png | Bin 1238 -> 1742 bytes src/game/client/components/emoticon.cpp | 2 ++ src/game/client/components/menus.cpp | 2 ++ src/game/client/components/spectator.cpp | 2 ++ src/game/editor/editor.cpp | 2 ++ 6 files changed, 8 insertions(+) diff --git a/data/editor/cursor.png b/data/editor/cursor.png index 4e0f0cefcf66ce5bd18efafbbf38efd13682f711..0b292de7076987d95213ccc045149da6ea852168 100644 GIT binary patch delta 1702 zcmV;X23h&m3AGK7BYy^bNkl}tZ56B7 zhSD~K3W9w~A4Dod3iYAMODvR-76nTlylY|-b5UdBJ>GBeevL7~Jd{#sp-^ZkZQ8V% z&VTf?-^}i&-DG#q?mF;iPue`}{PKNsX3reUvaHu+W@IL1-hZ*&7($4E55^kivYo$V zKG;nN7MncfPnmaj3xYEM1v`QUFg`vm;^X5v!mrlWA{n#@ z8o=h}rWhO?6mfBJ9N}k~^k7BM0Pf$vuhP@gBVuD?Il@meuLdK625|T8U9qvTq0-UO zA!1@;IKq!IuYUv^f(Ed@zOHiT&K>o6?bFBa;ve2pYiR;-bpZ(vk|tsHv$D z5fKp_VN)hP&=E9%g@px``T6;sYXSkp*|TTGo;`aw!heQLTp%N80JF2RDsyvlD$XD( zDk?-+SQtlGm5B{h1Px$jW=2d;PpjaXgAfKFPM)?K^0L}RwhD1LO8;-Omv_jXaExv6DpIFlPUy42n2y@Ku(@KX(EitJQqj^8UTI_ zQ8)y`tAB!5LuqNL`BQp8CNfYEG=Pzj5ivSCsxmeFw=R;SjtcPz|mS_&(wA z;ln1vm;Q#J0d#eBiSF)h6~aJxYq&z7g^}(Iv}4T4$uSW=_a_7m;O5PnqO-G8g)n$k zP=9-%8eCNZ7Dc{CKqX{mW||0}`3r&rz>OO>)F;QFs(2Ct-6Cm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VYH8G>|=k8GX^z<-+>)e%Xd>8&H~e(#_3Iw(QZ?(4+;nV}X)NwxpfVVpsj8IAH9X zc)ycD2$eY@@MW%j5r(k=_^>k*gsIns=(T7Wz(-w}Aqbs3^jfq8;FE655Vj19&}-2W zfX})!MSnQ;Kp(jl%?J3RN0Sl$+o&HQ^>mzEi{=A-)ss2Gu(N{1S~MHrn_hN6Al9PU z0N?h}hVYKL2utsYstv?$<^z1+mqbWP9n3*kkcl94Cf1@^0RJZYWknDls@wK!Ej z$<6IeNBBtOhrGC++KZRR)S8BndcH_)E#8(pf>wZE2JM9)j%w6&w|8itFt$u>)Q+%5JHoJY!n)U@ zc7R_8??MpAv{Gv}t>oiu5T_o^A-TSd;Rt+r##&661MvHhZ3yD{HtNmqUPYH>d$NR! zx_@!&g(XO?ZEYCB();7O*P=FnKLv;r+tSVNE>6j9)O--{sx%Bi=;Eccvx!+6?U-!Vn^&pR zs3*^EJ+Bza6^%_oNWEMNE~0NOs(pOZhJQ4#J|D6SN*Bc2%bSES?EHxCwWx-WP_lGK z5(eI;;;Bzr*S3BvnOK!G0$=W?*P;ze*ntbR94UnH;mkVC2umMoL9ay{*J;#&)TJlK zky=u(2|?)Uqt~Lni=Gd|t|;1$ur52oM^BaNUyF>3qviu&>A}*m6(qu?$A;;(n13hL zjhYWaj{vqjUa5+Zno$le;-c4L9+g0zXdN0xYJN=yLgHFZ`&tBGcLe%GE8@bfXT~!S zy0!8WYmqoDwE27(M$Lz*_m=EJSUS8|+g+tRe1C=~=RWrapClamp(); Graphics()->TextureSet(g_pData->m_aImages[IMAGE_CURSOR].m_Id); Graphics()->QuadsBegin(); Graphics()->SetColor(1,1,1,1); IGraphics::CQuadItem QuadItem(m_SelectorMouse.x+Screen.w/2,m_SelectorMouse.y+Screen.h/2,24,24); Graphics()->QuadsDrawTL(&QuadItem, 1); Graphics()->QuadsEnd(); + Graphics()->WrapNormal(); } void CEmoticon::Emote(int Emoticon) diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 5b3fcbfc7..08f5c395a 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -2136,12 +2136,14 @@ void CMenus::OnRender() Render(); // render cursor + Graphics()->WrapClamp(); Graphics()->TextureSet(g_pData->m_aImages[IMAGE_CURSOR].m_Id); Graphics()->QuadsBegin(); Graphics()->SetColor(1,1,1,1); IGraphics::CQuadItem QuadItem(mx, my, 24, 24); Graphics()->QuadsDrawTL(&QuadItem, 1); Graphics()->QuadsEnd(); + Graphics()->WrapNormal(); // render debug information if(g_Config.m_Debug) diff --git a/src/game/client/components/spectator.cpp b/src/game/client/components/spectator.cpp index 6e5e0e2db..0026cf866 100644 --- a/src/game/client/components/spectator.cpp +++ b/src/game/client/components/spectator.cpp @@ -445,12 +445,14 @@ void CSpectator::OnRender() TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f); // draw cursor + Graphics()->WrapClamp(); Graphics()->TextureSet(g_pData->m_aImages[IMAGE_CURSOR].m_Id); Graphics()->QuadsBegin(); Graphics()->SetColor(1.0f, 1.0f, 1.0f, 1.0f); IGraphics::CQuadItem QuadItem(m_SelectorMouse.x+Width/2.0f, m_SelectorMouse.y+Height/2.0f, 48.0f, 48.0f); Graphics()->QuadsDrawTL(&QuadItem, 1); Graphics()->QuadsEnd(); + Graphics()->WrapNormal(); } void CSpectator::OnReset() diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 2f05bf8b1..617dda9a9 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -6129,6 +6129,7 @@ void CEditor::Render() // render butt ugly mouse cursor float mx = UI()->MouseX(); float my = UI()->MouseY(); + Graphics()->WrapClamp(); Graphics()->TextureSet(m_CursorTexture); Graphics()->QuadsBegin(); if(ms_pUiGotContext == UI()->HotItem()) @@ -6136,6 +6137,7 @@ void CEditor::Render() IGraphics::CQuadItem QuadItem(mx,my, 16.0f, 16.0f); Graphics()->QuadsDrawTL(&QuadItem, 1); Graphics()->QuadsEnd(); + Graphics()->WrapNormal(); } }