mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Compare commits
4 commits
214cf5f918
...
21d0d69bec
Author | SHA1 | Date | |
---|---|---|---|
21d0d69bec | |||
325c688fa1 | |||
2a31ff1998 | |||
f169899083 |
|
@ -1456,7 +1456,14 @@ void CServerBrowser::LoadDDNetServers()
|
|||
const json_value &Name = Community["name"];
|
||||
const json_value HasFinishes = Community["has_finishes"];
|
||||
const json_value *pFinishes = &Icon["finishes"];
|
||||
const json_value *pServers = &Icon["servers"];
|
||||
const json_value *pServers = &Community["servers"];
|
||||
// We accidentally set servers to be part of icon, so support that as a
|
||||
// fallback for now. Can be removed in a few versions when the
|
||||
// communities.json has been updated.
|
||||
if(pServers->type == json_none)
|
||||
{
|
||||
pServers = &Icon["servers"];
|
||||
}
|
||||
if(pFinishes->type == json_none)
|
||||
{
|
||||
if(str_comp(Id, COMMUNITY_DDNET) == 0)
|
||||
|
|
|
@ -2613,10 +2613,22 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
Ui()->DoLabel(&Label, Localize("Chat"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
|
||||
// General chat settings
|
||||
LeftView.HSplitTop(SectionTotalMargin + 8 * LineSize, &Section, &LeftView);
|
||||
LeftView.HSplitTop(SectionTotalMargin + 9 * LineSize, &Section, &LeftView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowChat, Localize("Show chat"), &g_Config.m_ClShowChat, &Section, LineSize);
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
if(DoButton_CheckBox(&g_Config.m_ClShowChat, Localize("Show chat"), g_Config.m_ClShowChat, &Button))
|
||||
{
|
||||
g_Config.m_ClShowChat = g_Config.m_ClShowChat ? 0 : 1;
|
||||
}
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
if(g_Config.m_ClShowChat)
|
||||
{
|
||||
static int s_ShowChat = 0;
|
||||
if(DoButton_CheckBox(&s_ShowChat, Localize("Always show chat"), g_Config.m_ClShowChat == 2, &Button))
|
||||
g_Config.m_ClShowChat = g_Config.m_ClShowChat != 2 ? 2 : 1;
|
||||
}
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClChatTeamColors, Localize("Show names in chat in team colors"), &g_Config.m_ClChatTeamColors, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowChatFriends, Localize("Show only chat messages from friends"), &g_Config.m_ClShowChatFriends, &Section, LineSize);
|
||||
|
||||
|
@ -2968,7 +2980,7 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
Ui()->DoLabel(&Label, Localize("Name Plate"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
|
||||
// General name plate settings
|
||||
LeftView.HSplitTop(SectionTotalMargin + 10 * LineSize + 2 * ColorPickerLineSize, &Section, &LeftView);
|
||||
LeftView.HSplitTop(SectionTotalMargin + 12 * LineSize + 2 * ColorPickerLineSize, &Section, &LeftView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClNameplates, Localize("Show name plates"), &g_Config.m_ClNameplates, &Section, LineSize);
|
||||
|
@ -2983,7 +2995,20 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
}
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClNameplatesTeamcolors, Localize("Use team colors for name plates"), &g_Config.m_ClNameplatesTeamcolors, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClNameplatesStrong, Localize("Show hook strength indicator"), &g_Config.m_ClNameplatesStrong, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClNameplatesFriendMark, Localize("Show friend mark (♥) in name plates"), &g_Config.m_ClNameplatesFriendMark, &Section, LineSize);
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
if(DoButton_CheckBox(&g_Config.m_ClNameplatesStrong, Localize("Show hook strength icon indicator"), g_Config.m_ClNameplatesStrong, &Button))
|
||||
{
|
||||
g_Config.m_ClNameplatesStrong = g_Config.m_ClNameplatesStrong ? 0 : 1;
|
||||
}
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
if(g_Config.m_ClNameplatesStrong)
|
||||
{
|
||||
static int s_NameplatesStrong = 0;
|
||||
if(DoButton_CheckBox(&s_NameplatesStrong, Localize("Show hook strength number indicator"), g_Config.m_ClNameplatesStrong == 2, &Button))
|
||||
g_Config.m_ClNameplatesStrong = g_Config.m_ClNameplatesStrong != 2 ? 2 : 1;
|
||||
}
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
if(DoButton_CheckBox(&g_Config.m_ClShowDirection, Localize("Show other players' key presses"), g_Config.m_ClShowDirection >= 1 && g_Config.m_ClShowDirection != 3, &Button))
|
||||
|
@ -3012,14 +3037,34 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
Ui()->DoLabel(&Label, Localize("Hook collision line"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
|
||||
// General hookline settings
|
||||
LeftView.HSplitTop(SectionTotalMargin + 6 * LineSize + 3 * ColorPickerLineSize, &Section, &LeftView);
|
||||
LeftView.HSplitTop(SectionTotalMargin + 9 * LineSize + 3 * ColorPickerLineSize, &Section, &LeftView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
if(DoButton_CheckBox(&g_Config.m_ClShowHookCollOwn, Localize("Show own player's hook collision line"), g_Config.m_ClShowHookCollOwn, &Button))
|
||||
{
|
||||
g_Config.m_ClShowHookCollOwn = g_Config.m_ClShowHookCollOwn ? 0 : 1;
|
||||
}
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
if(g_Config.m_ClShowHookCollOwn)
|
||||
{
|
||||
static int s_ShowHookCollOwn = 0;
|
||||
if(DoButton_CheckBox(&s_ShowHookCollOwn, Localize("Always show own player's hook collision line"), g_Config.m_ClShowHookCollOwn == 2, &Button))
|
||||
g_Config.m_ClShowHookCollOwn = g_Config.m_ClShowHookCollOwn != 2 ? 2 : 1;
|
||||
}
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
if(DoButton_CheckBox(&g_Config.m_ClShowHookCollOther, Localize("Show other players' hook collision lines"), g_Config.m_ClShowHookCollOther, &Button))
|
||||
{
|
||||
g_Config.m_ClShowHookCollOther = g_Config.m_ClShowHookCollOther >= 1 ? 0 : 1;
|
||||
}
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
if(g_Config.m_ClShowHookCollOther)
|
||||
{
|
||||
static int s_ShowHookCollOther = 0;
|
||||
if(DoButton_CheckBox(&s_ShowHookCollOther, Localize("Always show other players' hook collision lines"), g_Config.m_ClShowHookCollOther == 2, &Button))
|
||||
g_Config.m_ClShowHookCollOther = g_Config.m_ClShowHookCollOther != 2 ? 2 : 1;
|
||||
}
|
||||
|
||||
Section.HSplitTop(2 * LineSize, &Button, &Section);
|
||||
Ui()->DoScrollbarOption(&g_Config.m_ClHookCollSize, &g_Config.m_ClHookCollSize, &Button, Localize("Hook collision line width"), 0, 20, &CUi::ms_LinearScrollbarScale, CUi::SCROLLBAR_OPTION_MULTILINE);
|
||||
|
|
Loading…
Reference in a new issue