use UIEx() consistently

This commit is contained in:
Robert Müller 2021-12-03 19:54:22 +01:00
parent af82a20374
commit f334b52d94
7 changed files with 39 additions and 39 deletions

View file

@ -597,12 +597,12 @@ int CMenus::DoValueSelector(void *pID, CUIRect *pRect, const char *pLabel, bool
int CMenus::DoEditBox(void *pID, const CUIRect *pRect, char *pStr, unsigned StrSize, float FontSize, float *Offset, bool Hidden, int Corners, const char *pEmptyText)
{
return m_UIEx.DoEditBox(pID, pRect, pStr, StrSize, FontSize, Offset, Hidden, Corners, pEmptyText);
return UIEx()->DoEditBox(pID, pRect, pStr, StrSize, FontSize, Offset, Hidden, Corners, pEmptyText);
}
int CMenus::DoClearableEditBox(void *pID, void *pClearID, const CUIRect *pRect, char *pStr, unsigned StrSize, float FontSize, float *Offset, bool Hidden, int Corners, const char *pEmptyText)
{
return m_UIEx.DoClearableEditBox(pID, pClearID, pRect, pStr, StrSize, FontSize, Offset, Hidden, Corners, pEmptyText);
return UIEx()->DoClearableEditBox(pID, pClearID, pRect, pStr, StrSize, FontSize, Offset, Hidden, Corners, pEmptyText);
}
int CMenus::DoKeyReader(void *pID, const CUIRect *pRect, int Key, int Modifier, int *NewModifier)
@ -1022,7 +1022,7 @@ void CMenus::OnInit()
if(g_Config.m_ClSkipStartMenu)
m_ShowStart = false;
m_UIEx.Init(UI(), Kernel(), RenderTools(), m_aInputEvents, &m_NumInputEvents);
UIEx()->Init(UI(), Kernel(), RenderTools(), m_aInputEvents, &m_NumInputEvents);
m_RefreshButton.Init(UI(), -1);
m_ConnectButton.Init(UI(), -1);
@ -1288,7 +1288,7 @@ int CMenus::Render()
CUIRect Screen = *UI()->Screen();
UI()->MapScreen();
m_UIEx.ResetMouseSlow();
UIEx()->ResetMouseSlow();
static int s_Frame = 0;
if(s_Frame == 0)
@ -2390,7 +2390,7 @@ bool CMenus::OnMouseMove(float x, float y)
if(!m_MenuActive)
return false;
m_UIEx.ConvertMouseMove(&x, &y);
UIEx()->ConvertMouseMove(&x, &y);
m_MousePos.x = clamp(m_MousePos.x + x, 0.f, (float)Graphics()->WindowWidth());
m_MousePos.y = clamp(m_MousePos.y + y, 0.f, (float)Graphics()->WindowHeight());

View file

@ -75,6 +75,8 @@ class CMenus : public CComponent
CUIEx m_UIEx;
CUIEx *UIEx() { return &m_UIEx; }
int DoButton_DemoPlayer(const void *pID, const char *pText, int Checked, const CUIRect *pRect);
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);

View file

@ -190,7 +190,7 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
static float s_ScrollValue = 0;
s_ScrollValue = m_UIEx.DoScrollbarV(&s_ScrollValue, &Scroll, s_ScrollValue);
s_ScrollValue = UIEx()->DoScrollbarV(&s_ScrollValue, &Scroll, s_ScrollValue);
if(Input()->KeyPress(KEY_TAB) && m_pClient->m_GameConsole.IsClosed())
{

View file

@ -563,7 +563,7 @@ void CMenus::UiDoListboxStart(const void *pID, const CUIRect *pRect, float RowHe
if(Num == 0)
gs_ListBoxScrollValue = 0;
else
gs_ListBoxScrollValue = m_UIEx.DoScrollbarV(pID, &Scroll, gs_ListBoxScrollValue);
gs_ListBoxScrollValue = UIEx()->DoScrollbarV(pID, &Scroll, gs_ListBoxScrollValue);
// the list
gs_ListBoxView = gs_ListBoxOriginalView;
@ -1072,8 +1072,7 @@ void CMenus::RenderDemoList(CUIRect MainView)
ListBox.VSplitRight(20.0f, &ListBox, &Scroll);
static float s_ScrollValue = 0;
s_ScrollValue = m_UIEx.DoScrollbarV(&s_ScrollValue, &Scroll, s_ScrollValue);
s_ScrollValue = UIEx()->DoScrollbarV(&s_ScrollValue, &Scroll, s_ScrollValue);
int PreviousIndex = m_DemolistSelectedIndex;
HandleListInputs(ListBox, s_ScrollValue, 3.0f, &m_ScrollOffset, s_aCols[0].m_Rect.h, m_DemolistSelectedIndex, m_lDemos.size());

View file

@ -1035,12 +1035,11 @@ void CMenus::RenderGhost(CUIRect MainView)
CUIRect Scroll;
View.VSplitRight(20.0f, &View, &Scroll);
int NumGhosts = m_lGhosts.size();
static float s_ScrollValue = 0;
s_ScrollValue = UIEx()->DoScrollbarV(&s_ScrollValue, &Scroll, s_ScrollValue);
int NumGhosts = m_lGhosts.size();
static int s_SelectedIndex = 0;
s_ScrollValue = m_UIEx.DoScrollbarV(&s_ScrollValue, &Scroll, s_ScrollValue);
HandleListInputs(View, s_ScrollValue, 1.0f, nullptr, s_aCols[0].m_Rect.h, s_SelectedIndex, NumGhosts);
// set clipping

View file

@ -161,7 +161,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
Right.HSplitTop(20.0f, &Button, &Right);
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Name plates size"), g_Config.m_ClNameplatesSize);
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
g_Config.m_ClNameplatesSize = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClNameplatesSize, &Button, g_Config.m_ClNameplatesSize / 100.0f) * 100.0f + 0.1f);
g_Config.m_ClNameplatesSize = (int)(UIEx()->DoScrollbarH(&g_Config.m_ClNameplatesSize, &Button, g_Config.m_ClNameplatesSize / 100.0f) * 100.0f + 0.1f);
Right.HSplitTop(20.0f, &Button, &Right);
if(DoButton_CheckBox(&g_Config.m_ClNameplatesTeamcolors, Localize("Use team colors for name plates"), g_Config.m_ClNameplatesTeamcolors, &Button))
@ -179,7 +179,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
Right.HSplitTop(20.0f, &Button, &Right);
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Clan plates size"), g_Config.m_ClNameplatesClanSize);
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
g_Config.m_ClNameplatesClanSize = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClNameplatesClanSize, &Button, g_Config.m_ClNameplatesClanSize / 100.0f) * 100.0f + 0.1f);
g_Config.m_ClNameplatesClanSize = (int)(UIEx()->DoScrollbarH(&g_Config.m_ClNameplatesClanSize, &Button, g_Config.m_ClNameplatesClanSize / 100.0f) * 100.0f + 0.1f);
}
}
}
@ -217,7 +217,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Max demos"), "");
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
Right.HSplitTop(20.0f, &Button, &Right);
g_Config.m_ClAutoDemoMax = static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClAutoDemoMax, &Button, g_Config.m_ClAutoDemoMax / 1000.0f) * 1000.0f + 0.1f);
g_Config.m_ClAutoDemoMax = static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClAutoDemoMax, &Button, g_Config.m_ClAutoDemoMax / 1000.0f) * 1000.0f + 0.1f);
Right.HSplitTop(SliderGroupMargin, 0, &Right);
Right.HSplitTop(20.0f, &Button, &Right);
@ -231,7 +231,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Max Screenshots"), "");
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
Right.HSplitTop(20.0f, &Button, &Right);
g_Config.m_ClAutoScreenshotMax = static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClAutoScreenshotMax, &Button, g_Config.m_ClAutoScreenshotMax / 1000.0f) * 1000.0f + 0.1f);
g_Config.m_ClAutoScreenshotMax = static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClAutoScreenshotMax, &Button, g_Config.m_ClAutoScreenshotMax / 1000.0f) * 1000.0f + 0.1f);
}
Left.HSplitTop(10.0f, 0, &Left);
@ -243,7 +243,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Refresh Rate"), "");
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
Left.HSplitTop(20.0f, &Button, &Left);
g_Config.m_ClRefreshRate = static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClRefreshRate, &Button, g_Config.m_ClRefreshRate / 10000.0f) * 10000.0f + 0.1f);
g_Config.m_ClRefreshRate = static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClRefreshRate, &Button, g_Config.m_ClRefreshRate / 10000.0f) * 10000.0f + 0.1f);
#if defined(CONF_FAMILY_WINDOWS)
Left.HSplitTop(10.0f, 0, &Left);
@ -297,7 +297,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
Right.HSplitTop(20.0f, &Button, &Right);
g_Config.m_ClAutoStatboardScreenshotMax =
static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClAutoStatboardScreenshotMax,
static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClAutoStatboardScreenshotMax,
&Button,
g_Config.m_ClAutoStatboardScreenshotMax / 1000.0f) *
1000.0f +
@ -323,7 +323,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
Right.HSplitTop(20.0f, &Button, &Right);
g_Config.m_ClAutoCSVMax =
static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClAutoCSVMax,
static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClAutoCSVMax,
&Button,
g_Config.m_ClAutoCSVMax / 1000.0f) *
1000.0f +
@ -921,7 +921,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
Button.VSplitLeft(160.0f, &Label, &Button);
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Mouse sens."), g_Config.m_InpMousesens);
UI()->DoLabel(&Label, aBuf, 14.0f * UI()->Scale(), -1);
int NewValue = (int)(m_UIEx.DoScrollbarH(&g_Config.m_InpMousesens, &Button, (minimum(g_Config.m_InpMousesens, 500) - 1) / 500.0f) * 500.0f) + 1;
int NewValue = (int)(UIEx()->DoScrollbarH(&g_Config.m_InpMousesens, &Button, (minimum(g_Config.m_InpMousesens, 500) - 1) / 500.0f) * 500.0f) + 1;
if(g_Config.m_InpMousesens < 500 || NewValue < 500)
g_Config.m_InpMousesens = minimum(NewValue, 500);
MovementSettings.HSplitTop(20.0f, 0, &MovementSettings);
@ -933,7 +933,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
Button.VSplitLeft(160.0f, &Label, &Button);
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("UI mouse s."), g_Config.m_UiMousesens);
UI()->DoLabel(&Label, aBuf, 14.0f * UI()->Scale(), -1);
int NewValue = (int)(m_UIEx.DoScrollbarH(&g_Config.m_UiMousesens, &Button, (minimum(g_Config.m_UiMousesens, 500) - 1) / 500.0f) * 500.0f) + 1;
int NewValue = (int)(UIEx()->DoScrollbarH(&g_Config.m_UiMousesens, &Button, (minimum(g_Config.m_UiMousesens, 500) - 1) / 500.0f) * 500.0f) + 1;
if(g_Config.m_UiMousesens < 500 || NewValue < 500)
g_Config.m_UiMousesens = minimum(NewValue, 500);
MovementSettings.HSplitTop(20.0f, 0, &MovementSettings);
@ -1277,7 +1277,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
else
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Refresh Rate"), "");
UI()->DoLabelScaled(&Label, aBuf, 14.0f, -1);
int NewRefreshRate = static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_GfxRefreshRate, &Button, (minimum(g_Config.m_GfxRefreshRate, 1000)) / 1000.0f) * 1000.0f + 0.1f);
int NewRefreshRate = static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_GfxRefreshRate, &Button, (minimum(g_Config.m_GfxRefreshRate, 1000)) / 1000.0f) * 1000.0f + 0.1f);
if(g_Config.m_GfxRefreshRate <= 1000 || NewRefreshRate < 1000)
g_Config.m_GfxRefreshRate = NewRefreshRate;
@ -1382,7 +1382,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
MainView.HSplitTop(20.0f, &Button, &MainView);
Button.VSplitLeft(190.0f, &Label, &Button);
UI()->DoLabelScaled(&Label, Localize("Sound volume"), 14.0f, -1);
g_Config.m_SndVolume = (int)(m_UIEx.DoScrollbarH(&g_Config.m_SndVolume, &Button, g_Config.m_SndVolume / 100.0f) * 100.0f);
g_Config.m_SndVolume = (int)(UIEx()->DoScrollbarH(&g_Config.m_SndVolume, &Button, g_Config.m_SndVolume / 100.0f) * 100.0f);
}
// volume slider game sounds
@ -1392,7 +1392,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
MainView.HSplitTop(20.0f, &Button, &MainView);
Button.VSplitLeft(190.0f, &Label, &Button);
UI()->DoLabelScaled(&Label, Localize("Game sound volume"), 14.0f, -1);
g_Config.m_SndGameSoundVolume = (int)(m_UIEx.DoScrollbarH(&g_Config.m_SndGameSoundVolume, &Button, g_Config.m_SndGameSoundVolume / 100.0f) * 100.0f);
g_Config.m_SndGameSoundVolume = (int)(UIEx()->DoScrollbarH(&g_Config.m_SndGameSoundVolume, &Button, g_Config.m_SndGameSoundVolume / 100.0f) * 100.0f);
}
// volume slider gui sounds
@ -1402,7 +1402,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
MainView.HSplitTop(20.0f, &Button, &MainView);
Button.VSplitLeft(190.0f, &Label, &Button);
UI()->DoLabelScaled(&Label, Localize("Chat sound volume"), 14.0f, -1);
g_Config.m_SndChatSoundVolume = (int)(m_UIEx.DoScrollbarH(&g_Config.m_SndChatSoundVolume, &Button, g_Config.m_SndChatSoundVolume / 100.0f) * 100.0f);
g_Config.m_SndChatSoundVolume = (int)(UIEx()->DoScrollbarH(&g_Config.m_SndChatSoundVolume, &Button, g_Config.m_SndChatSoundVolume / 100.0f) * 100.0f);
}
// volume slider map sounds
@ -1412,7 +1412,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
MainView.HSplitTop(20.0f, &Button, &MainView);
Button.VSplitLeft(190.0f, &Label, &Button);
UI()->DoLabelScaled(&Label, Localize("Map sound volume"), 14.0f, -1);
g_Config.m_SndMapSoundVolume = (int)(m_UIEx.DoScrollbarH(&g_Config.m_SndMapSoundVolume, &Button, g_Config.m_SndMapSoundVolume / 100.0f) * 100.0f);
g_Config.m_SndMapSoundVolume = (int)(UIEx()->DoScrollbarH(&g_Config.m_SndMapSoundVolume, &Button, g_Config.m_SndMapSoundVolume / 100.0f) * 100.0f);
}
// volume slider background music
@ -1422,7 +1422,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
MainView.HSplitTop(20.0f, &Button, &MainView);
Button.VSplitLeft(190.0f, &Label, &Button);
UI()->DoLabelScaled(&Label, Localize("Background music volume"), 14.0f, -1);
g_Config.m_SndBackgroundMusicVolume = (int)(m_UIEx.DoScrollbarH(&g_Config.m_SndBackgroundMusicVolume, &Button, g_Config.m_SndBackgroundMusicVolume / 100.0f) * 100.0f);
g_Config.m_SndBackgroundMusicVolume = (int)(UIEx()->DoScrollbarH(&g_Config.m_SndBackgroundMusicVolume, &Button, g_Config.m_SndBackgroundMusicVolume / 100.0f) * 100.0f);
}
}
@ -2029,7 +2029,7 @@ ColorHSLA CMenus::RenderHSLScrollbars(CUIRect *pRect, unsigned int *pColor, bool
ColorInner = color_cast<ColorRGBA>(ColorHSLA(CurColorPureHSLA.r, *paComponent[1], LightVal, *paComponent[3]));
}
*paComponent[i] = m_UIEx.DoScrollbarH(&((char *)pColor)[i], &Button, *paComponent[i], &ColorInner);
*paComponent[i] = UIEx()->DoScrollbarH(&((char *)pColor)[i], &Button, *paComponent[i], &ColorInner);
}
*pColor = Color.Pack(Alpha);
@ -2393,7 +2393,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
str_format(aBuf, sizeof(aBuf), Localize("Default length: %d"), g_Config.m_ClReplayLength);
UI()->DoLabelScaled(&Label, aBuf, 14.0f, -1);
int NewValue = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClReplayLength, &Button, (minimum(g_Config.m_ClReplayLength, 600) - 10) / 590.0f) * 590.0f) + 10;
int NewValue = (int)(UIEx()->DoScrollbarH(&g_Config.m_ClReplayLength, &Button, (minimum(g_Config.m_ClReplayLength, 600) - 10) / 590.0f) * 590.0f) + 10;
if(g_Config.m_ClReplayLength < 600 || NewValue < 600)
g_Config.m_ClReplayLength = minimum(NewValue, 600);
@ -2448,7 +2448,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
Left.HSplitTop(20.0f, &Button, &Left);
Button.VSplitLeft(120.0f, &Label, &Button);
UI()->DoLabelScaled(&Label, Localize("Overlay entities"), 14.0f, -1);
g_Config.m_ClOverlayEntities = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClOverlayEntities, &Button, g_Config.m_ClOverlayEntities / 100.0f) * 100.0f);
g_Config.m_ClOverlayEntities = (int)(UIEx()->DoScrollbarH(&g_Config.m_ClOverlayEntities, &Button, g_Config.m_ClOverlayEntities / 100.0f) * 100.0f);
}
{
@ -2458,7 +2458,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
Button.VSplitLeft(50.0f, &Label, &Button);
UI()->DoLabelScaled(&Label, Localize("Size"), 14.0f, -1);
g_Config.m_ClTextEntitiesSize = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClTextEntitiesSize, &Button, g_Config.m_ClTextEntitiesSize / 100.0f) * 100.0f);
g_Config.m_ClTextEntitiesSize = (int)(UIEx()->DoScrollbarH(&g_Config.m_ClTextEntitiesSize, &Button, g_Config.m_ClTextEntitiesSize / 100.0f) * 100.0f);
if(DoButton_CheckBox(&g_Config.m_ClTextEntities, Localize("Show text entities"), g_Config.m_ClTextEntities, &LeftLeft))
{
@ -2473,7 +2473,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
Button.VSplitLeft(50.0f, &Label, &Button);
UI()->DoLabelScaled(&Label, Localize("Alpha"), 14.0f, -1);
g_Config.m_ClShowOthersAlpha = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClShowOthersAlpha, &Button, g_Config.m_ClShowOthersAlpha / 100.0f) * 100.0f);
g_Config.m_ClShowOthersAlpha = (int)(UIEx()->DoScrollbarH(&g_Config.m_ClShowOthersAlpha, &Button, g_Config.m_ClShowOthersAlpha / 100.0f) * 100.0f);
if(DoButton_CheckBox(&g_Config.m_ClShowOthers, Localize("Show others"), g_Config.m_ClShowOthers == 1, &LeftLeft))
{
@ -2500,7 +2500,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
char aBuf[64];
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Default zoom"), g_Config.m_ClDefaultZoom);
UI()->DoLabelScaled(&Label, aBuf, 14.0f, -1);
g_Config.m_ClDefaultZoom = static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClDefaultZoom, &Button, g_Config.m_ClDefaultZoom / 20.0f) * 20.0f + 0.1f);
g_Config.m_ClDefaultZoom = static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClDefaultZoom, &Button, g_Config.m_ClDefaultZoom / 20.0f) * 20.0f + 0.1f);
Right.HSplitTop(20.0f, &Button, &Right);
if(DoButton_CheckBox(&g_Config.m_ClAntiPing, Localize("AntiPing"), g_Config.m_ClAntiPing, &Button))

View file

@ -308,14 +308,14 @@ bool CEditor::DoEditBox(void *pID, const CUIRect *pRect, char *pStr, unsigned St
{
if(UI()->LastActiveItem() == pID)
m_EditBoxActive = 2;
return m_UIEx.DoEditBox(pID, pRect, pStr, StrSize, FontSize, pOffset, Hidden, Corners);
return UIEx()->DoEditBox(pID, pRect, pStr, StrSize, FontSize, pOffset, Hidden, Corners);
}
bool CEditor::DoClearableEditBox(void *pID, void *pClearID, const CUIRect *pRect, char *pStr, unsigned StrSize, float FontSize, float *pOffset, bool Hidden, int Corners)
{
if(UI()->LastActiveItem() == pID)
m_EditBoxActive = 2;
return m_UIEx.DoClearableEditBox(pID, pClearID, pRect, pStr, StrSize, FontSize, pOffset, Hidden, Corners);
return UIEx()->DoClearableEditBox(pID, pClearID, pRect, pStr, StrSize, FontSize, pOffset, Hidden, Corners);
}
ColorRGBA CEditor::GetButtonColor(const void *pID, int Checked)
@ -6134,7 +6134,7 @@ void CEditor::Init()
m_UI.SetGraphics(m_pGraphics, m_pTextRender);
m_Map.m_pEditor = this;
m_UIEx.Init(UI(), Kernel(), RenderTools(), Input()->GetEventsRaw(), Input()->GetEventCountRaw());
UIEx()->Init(UI(), Kernel(), RenderTools(), Input()->GetEventsRaw(), Input()->GetEventCountRaw());
m_CheckerTexture = Graphics()->LoadTexture("editor/checker.png", IStorage::TYPE_ALL, CImageInfo::FORMAT_AUTO, 0);
m_BackgroundTexture = Graphics()->LoadTexture("editor/background.png", IStorage::TYPE_ALL, CImageInfo::FORMAT_AUTO, 0);
@ -6227,8 +6227,8 @@ void CEditor::UpdateAndRender()
float rx = 0, ry = 0;
{
Input()->MouseRelative(&rx, &ry);
m_UIEx.ConvertMouseMove(&rx, &ry);
m_UIEx.ResetMouseSlow();
UIEx()->ConvertMouseMove(&rx, &ry);
UIEx()->ResetMouseSlow();
m_MouseDeltaX = rx;
m_MouseDeltaY = ry;