mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
2836: Only make Esc key leave editor when no popup is open r=Jupeyy a=def- 2841: Fix ingame browser tab change (fixes #2839) r=Jupeyy a=def- 2845: Fix spacing in kick-vote menu (center tees and text) r=Learath2 a=def- Old: ![screenshot-20200917@090205](https://user-images.githubusercontent.com/2335377/93431529-882ab480-f8c4-11ea-8e56-dfe903a5ae06.png) New: ![screenshot-20200917@090226](https://user-images.githubusercontent.com/2335377/93431538-8cef6880-f8c4-11ea-8946-449e7aa6dea7.png) Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
commit
21e080596a
|
@ -590,9 +590,8 @@ bool CMenus::RenderServerControlKick(CUIRect MainView, bool FilterSpectators)
|
|||
{
|
||||
CTeeRenderInfo Info = m_pClient->m_aClients[aPlayerIDs[i]].m_RenderInfo;
|
||||
Info.m_Size = Item.m_Rect.h;
|
||||
Item.m_Rect.HSplitTop(5.0f, 0, &Item.m_Rect); // some margin from the top
|
||||
RenderTools()->RenderTee(CAnimState::GetIdle(), &Info, EMOTE_NORMAL, vec2(1,0), vec2(Item.m_Rect.x+Item.m_Rect.h/2, Item.m_Rect.y+Item.m_Rect.h/2));
|
||||
Item.m_Rect.x +=Info.m_Size;
|
||||
RenderTools()->RenderTee(CAnimState::GetIdle(), &Info, EMOTE_NORMAL, vec2(1, 0), vec2(Item.m_Rect.x + Item.m_Rect.h / 2, Item.m_Rect.y + Item.m_Rect.h / 2));
|
||||
Item.m_Rect.x += Info.m_Size;
|
||||
UI()->DoLabelScaled(&Item.m_Rect, m_pClient->m_aClients[aPlayerIDs[i]].m_aName, 16.0f, -1);
|
||||
}
|
||||
}
|
||||
|
@ -865,7 +864,7 @@ void CMenus::RenderInGameNetwork(CUIRect MainView)
|
|||
if(NewPage != -1)
|
||||
{
|
||||
if(Client()->State() != IClient::STATE_OFFLINE)
|
||||
g_Config.m_UiPage = NewPage;
|
||||
SetMenuPage(NewPage);
|
||||
}
|
||||
|
||||
RenderServerbrowser(MainView);
|
||||
|
|
|
@ -5775,7 +5775,7 @@ void CEditor::RenderMenubar(CUIRect MenuBar)
|
|||
UI()->DoLabel(&Info, aBuf, 10.0f, 1, -1);
|
||||
|
||||
static int s_CloseButton = 0;
|
||||
if(DoButton_Editor(&s_CloseButton, "×", 0, &Close, 0, "Exits from the editor") || (m_Dialog == DIALOG_NONE && !m_PopupEventActivated && Input()->KeyPress(KEY_ESCAPE)))
|
||||
if(DoButton_Editor(&s_CloseButton, "×", 0, &Close, 0, "Exits from the editor") || (m_Dialog == DIALOG_NONE && !UiPopupOpen() && !m_PopupEventActivated && Input()->KeyPress(KEY_ESCAPE)))
|
||||
g_Config.m_ClEditor = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -959,6 +959,7 @@ public:
|
|||
void UiInvokePopupMenu(void *pID, int Flags, float X, float Y, float W, float H, int (*pfnFunc)(CEditor *pEditor, CUIRect Rect, void *pContext), void *pExtra=0);
|
||||
void UiDoPopupMenu();
|
||||
bool UiPopupExists(void *pID);
|
||||
bool UiPopupOpen();
|
||||
|
||||
int UiDoValueSelector(void *pID, CUIRect *pRect, const char *pLabel, int Current, int Min, int Max, int Step, float Scale, const char *pToolTip, bool IsDegree=false, bool IsHex=false, int corners=CUI::CORNER_ALL, ColorRGBA* Color=0);
|
||||
|
||||
|
|
|
@ -109,6 +109,11 @@ bool CEditor::UiPopupExists(void *pid)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool CEditor::UiPopupOpen()
|
||||
{
|
||||
return g_UiNumPopups > 0;
|
||||
}
|
||||
|
||||
int CEditor::PopupGroup(CEditor *pEditor, CUIRect View, void *pContext)
|
||||
{
|
||||
// remove group button
|
||||
|
|
Loading…
Reference in a new issue