Another attempt to fix Lin & Mac build

This commit is contained in:
Дядя Женя 2020-12-14 04:49:24 +03:00
parent c084c9cde2
commit ebee286f00
2 changed files with 6 additions and 6 deletions

View file

@ -1548,13 +1548,16 @@ void CMenus::RenderColorPicker()
// Logic
float PickerX, PickerY;
if(UI()->DoPickerLogic(&SColorPicker::ms_ColorPickerID, &ColorsArea, &PickerX, &PickerY))
static int ColorPickerID = 0;
static int HuePickerID = 0;
if(UI()->DoPickerLogic(&ColorPickerID, &ColorsArea, &PickerX, &PickerY))
{
PickerColorHSV.y = PickerX / ColorsArea.w;
PickerColorHSV.z = 1.0f - PickerY / ColorsArea.h;
}
if(UI()->DoPickerLogic(&SColorPicker::ms_HuePickerID, &HueArea, &PickerX, &PickerY))
if(UI()->DoPickerLogic(&HuePickerID, &HueArea, &PickerX, &PickerY))
PickerColorHSV.x = 1.0f - PickerY / HueArea.h;
// Marker Color Area

View file

@ -30,9 +30,6 @@ public:
const float ms_Width = 160.0f;
const float ms_Height = 186.0f;
const static int ms_ColorPickerID = 0;
const static int ms_HuePickerID = 0;
float m_X;
float m_Y;
@ -82,7 +79,7 @@ class CMenus : public CComponent
int DoButton_Sprite(const void *pID, int ImageID, int SpriteID, int Checked, const CUIRect *pRect, int Corners);
int DoButton_Toggle(const void *pID, int Checked, const CUIRect *pRect, bool Active);
int DoButton_Menu(const void *pID, const char *pText, int Checked, const CUIRect *pRect, const char *pImageName = 0, int Corners = CUI::CORNER_ALL, float r = 5.0f, float FontFactor = 0.0f, vec4 ColorHot = vec4(1.0f, 1.0f, 1.0f, 0.75f), vec4 Color = vec4(1, 1, 1, 0.5f), int AlignVertically = 1, bool CheckForActiveColorPicker = false);
int DoButton_MenuTab(const void *pID, const char *pText, int Checked, const CUIRect *pRect, int Corners, const ColorRGBA *pDefaultColor = NULL, const ColorRGBA *pActiveColor = NULL, const ColorRGBA *pHoverColor = NULL, float EdgeRounding = 10, int AlignVertically = 1);
int DoButton_MenuTab(const void *pID, const char *pText, int Checked, const CUIRect *pRect, int Corners, SUIAnimator *pAnimator = NULL, const ColorRGBA *pDefaultColor = NULL, const ColorRGBA *pActiveColor = NULL, const ColorRGBA *pHoverColor = NULL, float EdgeRounding = 10, int AlignVertically = 1);
int DoButton_CheckBox_Common(const void *pID, const char *pText, const char *pBoxText, const CUIRect *pRect);
int DoButton_CheckBox(const void *pID, const char *pText, int Checked, const CUIRect *pRect);