From c084c9cde26f5df72a341a863279aa91f9c7133f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D1=8F=D0=B4=D1=8F=20=D0=96=D0=B5=D0=BD=D1=8F?= Date: Mon, 14 Dec 2020 04:18:04 +0300 Subject: [PATCH] Fix Mac & Linux build --- src/game/client/components/menus.cpp | 7 ++----- src/game/client/components/menus_settings.cpp | 2 +- src/game/client/ui.h | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 20dc0e777..b21d8adc2 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -302,8 +302,6 @@ void CMenus::DoLaserPreview(const CUIRect *pRect, const ColorHSLA LaserOutlineCo vec2 From = vec2(Section.x, Section.y + Section.h / 2.0f); vec2 Pos = vec2(Section.x + Section.w - 10.0f, Section.y + Section.h / 2.0f); - vec2 Out, Border; - Graphics()->BlendNormal(); Graphics()->TextureClear(); Graphics()->QuadsBegin(); @@ -311,7 +309,7 @@ void CMenus::DoLaserPreview(const CUIRect *pRect, const ColorHSLA LaserOutlineCo LaserRGB = color_cast(LaserOutlineColor); ColorRGBA OuterColor(LaserRGB.r, LaserRGB.g, LaserRGB.b, 1.0f); Graphics()->SetColor(LaserRGB.r, LaserRGB.g, LaserRGB.b, 1.0f); - Out = vec2(0.0f, -1.0f) * (3.15f); + vec2 Out = vec2(0.0f, -1.0f) * (3.15f); IGraphics::CFreeformItem Freeform(From.x - Out.x, From.y - Out.y, From.x + Out.x, From.y + Out.y, Pos.x - Out.x, Pos.y - Out.y, Pos.x + Out.x, Pos.y + Out.y); Graphics()->QuadsDrawFreeform(&Freeform, 1); @@ -1542,9 +1540,8 @@ void CMenus::RenderColorPicker() if(HEX != NEWHEX) PickerColorHSV = color_cast(NEWHEX); - static int ALPHAID = 0; - // TODO : ALPHA SUPPORT + //static int ALPHAID = 0; UI()->DoLabel(&ALPHARect, "A: 255", 10, 0, -1); RenderTools()->DrawUIRect(&ALPHARect, ColorRGBA(0, 0, 0, 0.65f), CUI::CORNER_ALL, 5.0f); diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index b5d8dd00f..0650b68ec 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -1750,7 +1750,7 @@ void CMenus::RenderSettingsHUD(CUIRect MainView) CTextCursor Cursor; TextRender()->SetCursor(&Cursor, X, Y, RealFontSize, TEXTFLAG_RENDER); - + str_copy(aBuf, Client()->PlayerName(), sizeof(aBuf)); CAnimState *pIdleState = CAnimState::GetIdle(); diff --git a/src/game/client/ui.h b/src/game/client/ui.h index 47c29f118..aa3b19cbb 100644 --- a/src/game/client/ui.h +++ b/src/game/client/ui.h @@ -227,7 +227,7 @@ public: float MouseWorldY() const { return m_MouseWorldY; } int MouseButton(int Index) const { return (m_MouseButtons >> Index) & 1; } int MouseButtonClicked(int Index) { return MouseButton(Index) && !((m_LastMouseButtons >> Index) & 1); } - int MouseButtonReleased(int Index) {return ((m_LastMouseButtons >> Index) & 1) && !MouseButton(Index); } + int MouseButtonReleased(int Index) { return ((m_LastMouseButtons >> Index) & 1) && !MouseButton(Index); } void SetHotItem(const void *pID) { m_pBecommingHotItem = pID; } void SetActiveItem(const void *pID)