Fix Mac & Linux build

This commit is contained in:
Дядя Женя 2020-12-14 04:18:04 +03:00
parent 77f84ac831
commit c084c9cde2
3 changed files with 4 additions and 7 deletions

View file

@ -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 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 Pos = vec2(Section.x + Section.w - 10.0f, Section.y + Section.h / 2.0f);
vec2 Out, Border;
Graphics()->BlendNormal(); Graphics()->BlendNormal();
Graphics()->TextureClear(); Graphics()->TextureClear();
Graphics()->QuadsBegin(); Graphics()->QuadsBegin();
@ -311,7 +309,7 @@ void CMenus::DoLaserPreview(const CUIRect *pRect, const ColorHSLA LaserOutlineCo
LaserRGB = color_cast<ColorRGBA, ColorHSLA>(LaserOutlineColor); LaserRGB = color_cast<ColorRGBA, ColorHSLA>(LaserOutlineColor);
ColorRGBA OuterColor(LaserRGB.r, LaserRGB.g, LaserRGB.b, 1.0f); ColorRGBA OuterColor(LaserRGB.r, LaserRGB.g, LaserRGB.b, 1.0f);
Graphics()->SetColor(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); 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); Graphics()->QuadsDrawFreeform(&Freeform, 1);
@ -1542,9 +1540,8 @@ void CMenus::RenderColorPicker()
if(HEX != NEWHEX) if(HEX != NEWHEX)
PickerColorHSV = color_cast<ColorHSVA, ColorRGBA>(NEWHEX); PickerColorHSV = color_cast<ColorHSVA, ColorRGBA>(NEWHEX);
static int ALPHAID = 0;
// TODO : ALPHA SUPPORT // TODO : ALPHA SUPPORT
//static int ALPHAID = 0;
UI()->DoLabel(&ALPHARect, "A: 255", 10, 0, -1); UI()->DoLabel(&ALPHARect, "A: 255", 10, 0, -1);
RenderTools()->DrawUIRect(&ALPHARect, ColorRGBA(0, 0, 0, 0.65f), CUI::CORNER_ALL, 5.0f); RenderTools()->DrawUIRect(&ALPHARect, ColorRGBA(0, 0, 0, 0.65f), CUI::CORNER_ALL, 5.0f);

View file

@ -1750,7 +1750,7 @@ void CMenus::RenderSettingsHUD(CUIRect MainView)
CTextCursor Cursor; CTextCursor Cursor;
TextRender()->SetCursor(&Cursor, X, Y, RealFontSize, TEXTFLAG_RENDER); TextRender()->SetCursor(&Cursor, X, Y, RealFontSize, TEXTFLAG_RENDER);
str_copy(aBuf, Client()->PlayerName(), sizeof(aBuf)); str_copy(aBuf, Client()->PlayerName(), sizeof(aBuf));
CAnimState *pIdleState = CAnimState::GetIdle(); CAnimState *pIdleState = CAnimState::GetIdle();

View file

@ -227,7 +227,7 @@ public:
float MouseWorldY() const { return m_MouseWorldY; } float MouseWorldY() const { return m_MouseWorldY; }
int MouseButton(int Index) const { return (m_MouseButtons >> Index) & 1; } int MouseButton(int Index) const { return (m_MouseButtons >> Index) & 1; }
int MouseButtonClicked(int Index) { return MouseButton(Index) && !((m_LastMouseButtons >> 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 SetHotItem(const void *pID) { m_pBecommingHotItem = pID; }
void SetActiveItem(const void *pID) void SetActiveItem(const void *pID)