mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Improve layout of Appearance settings
Use consistent margins for all settings pages and titles. Fix chat preview overlapping with the restart warning. Simplify layout code. Remove array of `CButtonContainer`s with arbitrary size and use individual variables instead.
This commit is contained in:
parent
a9b254b0e2
commit
7727628eeb
|
@ -2493,7 +2493,7 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
char aBuf[128];
|
||||
static int s_CurTab = 0;
|
||||
|
||||
CUIRect TabBar, LeftView, RightView, Section, Button, Label;
|
||||
CUIRect TabBar, LeftView, RightView, Button, Label;
|
||||
|
||||
MainView.HSplitTop(20.0f, &TabBar, &MainView);
|
||||
const float TabWidth = TabBar.w / NUMBER_OF_APPEARANCE_TABS;
|
||||
|
@ -2520,112 +2520,88 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
|
||||
const float LineSize = 20.0f;
|
||||
const float ColorPickerLineSize = 25.0f;
|
||||
const float SectionMargin = 5.0f;
|
||||
const float SectionTotalMargin = SectionMargin * 2;
|
||||
const float HeadlineFontSize = 20.0f;
|
||||
const float HeadlineAndVMargin = HeadlineFontSize + SectionTotalMargin;
|
||||
const float MarginToNextSection = 5.0f;
|
||||
const float HeadlineHeight = 30.0f;
|
||||
const float MarginSmall = 5.0f;
|
||||
const float MarginBetweenViews = 20.0f;
|
||||
|
||||
const float ColorPickerLabelSize = 13.0f;
|
||||
const float ColorPickerLineSpacing = 5.0f;
|
||||
|
||||
if(s_CurTab == APPEARANCE_TAB_HUD)
|
||||
{
|
||||
MainView.VSplitMid(&LeftView, &RightView);
|
||||
MainView.VSplitMid(&LeftView, &RightView, MarginBetweenViews);
|
||||
|
||||
// ***** HUD ***** //
|
||||
LeftView.HSplitTop(HeadlineAndVMargin, &Label, &LeftView);
|
||||
LeftView.HSplitTop(HeadlineHeight, &Label, &LeftView);
|
||||
Ui()->DoLabel(&Label, Localize("HUD"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
LeftView.HSplitTop(MarginSmall, nullptr, &LeftView);
|
||||
|
||||
// Switch of the entire HUD
|
||||
LeftView.HSplitTop(SectionTotalMargin + LineSize, &Section, &LeftView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhud, Localize("Show ingame HUD"), &g_Config.m_ClShowhud, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhud, Localize("Show ingame HUD"), &g_Config.m_ClShowhud, &LeftView, LineSize);
|
||||
|
||||
// Switches of the various normal HUD elements
|
||||
LeftView.HSplitTop(SectionTotalMargin + 3 * LineSize, &Section, &LeftView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudHealthAmmo, Localize("Show health, shields and ammo"), &g_Config.m_ClShowhudHealthAmmo, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudScore, Localize("Show score"), &g_Config.m_ClShowhudScore, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowLocalTimeAlways, Localize("Show local time always"), &g_Config.m_ClShowLocalTimeAlways, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudHealthAmmo, Localize("Show health, shields and ammo"), &g_Config.m_ClShowhudHealthAmmo, &LeftView, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudScore, Localize("Show score"), &g_Config.m_ClShowhudScore, &LeftView, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowLocalTimeAlways, Localize("Show local time always"), &g_Config.m_ClShowLocalTimeAlways, &LeftView, LineSize);
|
||||
|
||||
// Settings of the HUD element for votes
|
||||
LeftView.HSplitTop(SectionTotalMargin + LineSize, &Section, &LeftView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowVotesAfterVoting, Localize("Show votes window after voting"), &g_Config.m_ClShowVotesAfterVoting, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowVotesAfterVoting, Localize("Show votes window after voting"), &g_Config.m_ClShowVotesAfterVoting, &LeftView, LineSize);
|
||||
|
||||
// ***** DDRace HUD ***** //
|
||||
RightView.HSplitTop(HeadlineAndVMargin, &Label, &RightView);
|
||||
RightView.HSplitTop(HeadlineHeight, &Label, &RightView);
|
||||
Ui()->DoLabel(&Label, Localize("DDRace HUD"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
RightView.HSplitTop(MarginSmall, nullptr, &RightView);
|
||||
|
||||
// Switches of various DDRace HUD elements
|
||||
RightView.HSplitTop(SectionTotalMargin + 4 * LineSize, &Section, &RightView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClDDRaceScoreBoard, Localize("Use DDRace Scoreboard"), &g_Config.m_ClDDRaceScoreBoard, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowIds, Localize("Show client IDs in scoreboard"), &g_Config.m_ClShowIds, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudDDRace, Localize("Show DDRace HUD"), &g_Config.m_ClShowhudDDRace, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClDDRaceScoreBoard, Localize("Use DDRace Scoreboard"), &g_Config.m_ClDDRaceScoreBoard, &RightView, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowIds, Localize("Show client IDs in scoreboard"), &g_Config.m_ClShowIds, &RightView, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudDDRace, Localize("Show DDRace HUD"), &g_Config.m_ClShowhudDDRace, &RightView, LineSize);
|
||||
if(g_Config.m_ClShowhudDDRace)
|
||||
{
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudJumpsIndicator, Localize("Show jumps indicator"), &g_Config.m_ClShowhudJumpsIndicator, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudJumpsIndicator, Localize("Show jumps indicator"), &g_Config.m_ClShowhudJumpsIndicator, &RightView, LineSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
Section.HSplitTop(LineSize, 0x0, &Section); // Create empty space for hidden option
|
||||
RightView.HSplitTop(LineSize, nullptr, &RightView); // Create empty space for hidden option
|
||||
}
|
||||
|
||||
// Switch for dummy actions display
|
||||
RightView.HSplitTop(SectionTotalMargin + LineSize, &Section, &RightView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudDummyActions, Localize("Show dummy actions"), &g_Config.m_ClShowhudDummyActions, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudDummyActions, Localize("Show dummy actions"), &g_Config.m_ClShowhudDummyActions, &RightView, LineSize);
|
||||
|
||||
// Player movement information display settings
|
||||
RightView.HSplitTop(SectionTotalMargin + 3 * LineSize, &Section, &RightView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudPlayerPosition, Localize("Show player position"), &g_Config.m_ClShowhudPlayerPosition, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudPlayerSpeed, Localize("Show player speed"), &g_Config.m_ClShowhudPlayerSpeed, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudPlayerAngle, Localize("Show player target angle"), &g_Config.m_ClShowhudPlayerAngle, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudPlayerPosition, Localize("Show player position"), &g_Config.m_ClShowhudPlayerPosition, &RightView, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudPlayerSpeed, Localize("Show player speed"), &g_Config.m_ClShowhudPlayerSpeed, &RightView, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowhudPlayerAngle, Localize("Show player target angle"), &g_Config.m_ClShowhudPlayerAngle, &RightView, LineSize);
|
||||
|
||||
// Freeze bar settings
|
||||
RightView.HSplitTop(SectionTotalMargin + 3 * LineSize, &Section, &RightView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowFreezeBars, Localize("Show freeze bars"), &g_Config.m_ClShowFreezeBars, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowFreezeBars, Localize("Show freeze bars"), &g_Config.m_ClShowFreezeBars, &RightView, LineSize);
|
||||
RightView.HSplitTop(2 * LineSize, &Button, &RightView);
|
||||
if(g_Config.m_ClShowFreezeBars)
|
||||
{
|
||||
Section.HSplitTop(2 * LineSize, &Button, &Section);
|
||||
if(g_Config.m_ClShowFreezeBars)
|
||||
{
|
||||
Ui()->DoScrollbarOption(&g_Config.m_ClFreezeBarsAlphaInsideFreeze, &g_Config.m_ClFreezeBarsAlphaInsideFreeze, &Button, Localize("Opacity of freeze bars inside freeze"), 0, 100, &CUi::ms_LinearScrollbarScale, CUi::SCROLLBAR_OPTION_MULTILINE, "%");
|
||||
}
|
||||
Ui()->DoScrollbarOption(&g_Config.m_ClFreezeBarsAlphaInsideFreeze, &g_Config.m_ClFreezeBarsAlphaInsideFreeze, &Button, Localize("Opacity of freeze bars inside freeze"), 0, 100, &CUi::ms_LinearScrollbarScale, CUi::SCROLLBAR_OPTION_MULTILINE, "%");
|
||||
}
|
||||
}
|
||||
else if(s_CurTab == APPEARANCE_TAB_CHAT)
|
||||
{
|
||||
CChat &Chat = GameClient()->m_Chat;
|
||||
CUIRect TopView, PreviewView;
|
||||
MainView.h += 20.f; // Increase height a little
|
||||
MainView.HSplitTop(MainView.h - 260, &TopView, &PreviewView);
|
||||
TopView.VSplitMid(&LeftView, &RightView);
|
||||
MainView.HSplitBottom(220.0f, &TopView, &PreviewView);
|
||||
TopView.HSplitBottom(MarginBetweenViews, &TopView, nullptr);
|
||||
TopView.VSplitMid(&LeftView, &RightView, MarginBetweenViews);
|
||||
|
||||
// ***** Chat ***** //
|
||||
LeftView.HSplitTop(HeadlineAndVMargin, &Label, &LeftView);
|
||||
LeftView.HSplitTop(HeadlineHeight, &Label, &LeftView);
|
||||
Ui()->DoLabel(&Label, Localize("Chat"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
LeftView.HSplitTop(MarginSmall, nullptr, &LeftView);
|
||||
|
||||
// General chat settings
|
||||
LeftView.HSplitTop(SectionTotalMargin + 9 * LineSize, &Section, &LeftView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
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);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
if(g_Config.m_ClShowChat)
|
||||
{
|
||||
static int s_ShowChat = 0;
|
||||
|
@ -2633,13 +2609,13 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
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);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClChatTeamColors, Localize("Show names in chat in team colors"), &g_Config.m_ClChatTeamColors, &LeftView, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClShowChatFriends, Localize("Show only chat messages from friends"), &g_Config.m_ClShowChatFriends, &LeftView, LineSize);
|
||||
|
||||
if(DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClChatOld, Localize("Use old chat style"), &g_Config.m_ClChatOld, &Section, LineSize))
|
||||
if(DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClChatOld, Localize("Use old chat style"), &g_Config.m_ClChatOld, &LeftView, LineSize))
|
||||
GameClient()->m_Chat.RebuildChat();
|
||||
|
||||
Section.HSplitTop(2 * LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(2 * LineSize, &Button, &LeftView);
|
||||
int PrevFontSize = g_Config.m_ClChatFontSize;
|
||||
Ui()->DoScrollbarOption(&g_Config.m_ClChatFontSize, &g_Config.m_ClChatFontSize, &Button, Localize("Chat font size"), 10, 100, &CUi::ms_LinearScrollbarScale, CUi::SCROLLBAR_OPTION_MULTILINE);
|
||||
if(PrevFontSize != g_Config.m_ClChatFontSize)
|
||||
|
@ -2648,7 +2624,7 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
Chat.RebuildChat();
|
||||
}
|
||||
|
||||
Section.HSplitTop(2 * LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(2 * LineSize, &Button, &LeftView);
|
||||
int PrevWidth = g_Config.m_ClChatWidth;
|
||||
Ui()->DoScrollbarOption(&g_Config.m_ClChatWidth, &g_Config.m_ClChatWidth, &Button, Localize("Chat width"), 120, 400, &CUi::ms_LinearScrollbarScale, CUi::SCROLLBAR_OPTION_MULTILINE);
|
||||
if(PrevWidth != g_Config.m_ClChatWidth)
|
||||
|
@ -2658,36 +2634,34 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
}
|
||||
|
||||
// ***** Messages ***** //
|
||||
RightView.HSplitTop(HeadlineAndVMargin, &Label, &RightView);
|
||||
RightView.HSplitTop(HeadlineHeight, &Label, &RightView);
|
||||
Ui()->DoLabel(&Label, Localize("Messages"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
RightView.HSplitTop(MarginSmall, nullptr, &RightView);
|
||||
|
||||
// Message Colors and extra settings
|
||||
RightView.HSplitTop(SectionTotalMargin + 6 * ColorPickerLineSize, &Section, &RightView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
int i = 0;
|
||||
static CButtonContainer s_aResetIds[24];
|
||||
|
||||
DoLine_ColorPicker(&s_aResetIds[i++], ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("System message"), &g_Config.m_ClMessageSystemColor, ColorRGBA(1.0f, 1.0f, 0.5f), true, &g_Config.m_ClShowChatSystem);
|
||||
DoLine_ColorPicker(&s_aResetIds[i++], ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Highlighted message"), &g_Config.m_ClMessageHighlightColor, ColorRGBA(1.0f, 0.5f, 0.5f));
|
||||
DoLine_ColorPicker(&s_aResetIds[i++], ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Team message"), &g_Config.m_ClMessageTeamColor, ColorRGBA(0.65f, 1.0f, 0.65f));
|
||||
DoLine_ColorPicker(&s_aResetIds[i++], ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Friend message"), &g_Config.m_ClMessageFriendColor, ColorRGBA(1.0f, 0.137f, 0.137f), true, &g_Config.m_ClMessageFriend);
|
||||
DoLine_ColorPicker(&s_aResetIds[i++], ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Normal message"), &g_Config.m_ClMessageColor, ColorRGBA(1.0f, 1.0f, 1.0f));
|
||||
static CButtonContainer s_SystemMessageColor;
|
||||
DoLine_ColorPicker(&s_SystemMessageColor, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &RightView, Localize("System message"), &g_Config.m_ClMessageSystemColor, ColorRGBA(1.0f, 1.0f, 0.5f), true, &g_Config.m_ClShowChatSystem);
|
||||
static CButtonContainer s_HighlightedMessageColor;
|
||||
DoLine_ColorPicker(&s_HighlightedMessageColor, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &RightView, Localize("Highlighted message"), &g_Config.m_ClMessageHighlightColor, ColorRGBA(1.0f, 0.5f, 0.5f));
|
||||
static CButtonContainer s_TeamMessageColor;
|
||||
DoLine_ColorPicker(&s_TeamMessageColor, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &RightView, Localize("Team message"), &g_Config.m_ClMessageTeamColor, ColorRGBA(0.65f, 1.0f, 0.65f));
|
||||
static CButtonContainer s_FriendMessageColor;
|
||||
DoLine_ColorPicker(&s_FriendMessageColor, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &RightView, Localize("Friend message"), &g_Config.m_ClMessageFriendColor, ColorRGBA(1.0f, 0.137f, 0.137f), true, &g_Config.m_ClMessageFriend);
|
||||
static CButtonContainer s_NormalMessageColor;
|
||||
DoLine_ColorPicker(&s_NormalMessageColor, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &RightView, Localize("Normal message"), &g_Config.m_ClMessageColor, ColorRGBA(1.0f, 1.0f, 1.0f));
|
||||
|
||||
str_format(aBuf, sizeof(aBuf), "%s (echo)", Localize("Client message"));
|
||||
DoLine_ColorPicker(&s_aResetIds[i++], ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, aBuf, &g_Config.m_ClMessageClientColor, ColorRGBA(0.5f, 0.78f, 1.0f));
|
||||
static CButtonContainer s_ClientMessageColor;
|
||||
DoLine_ColorPicker(&s_ClientMessageColor, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &RightView, aBuf, &g_Config.m_ClMessageClientColor, ColorRGBA(0.5f, 0.78f, 1.0f));
|
||||
|
||||
// ***** Chat Preview ***** //
|
||||
PreviewView.HSplitTop(HeadlineAndVMargin, &Label, &PreviewView);
|
||||
PreviewView.HSplitTop(HeadlineHeight, &Label, &PreviewView);
|
||||
Ui()->DoLabel(&Label, Localize("Preview"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
PreviewView.HSplitTop(MarginSmall, nullptr, &PreviewView);
|
||||
|
||||
// Use the rest of the view for preview
|
||||
Section = PreviewView;
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
Section.Draw(ColorRGBA(1, 1, 1, 0.1f), IGraphics::CORNER_ALL, 8.0f);
|
||||
|
||||
Section.HSplitTop(10.0f, 0x0, &Section); // Margin
|
||||
PreviewView.Draw(ColorRGBA(1, 1, 1, 0.1f), IGraphics::CORNER_ALL, 5.0f);
|
||||
PreviewView.Margin(MarginSmall, &PreviewView);
|
||||
|
||||
ColorRGBA SystemColor = color_cast<ColorRGBA, ColorHSLA>(ColorHSLA(g_Config.m_ClMessageSystemColor));
|
||||
ColorRGBA HighlightedColor = color_cast<ColorRGBA, ColorHSLA>(ColorHSLA(g_Config.m_ClMessageHighlightColor));
|
||||
|
@ -2703,8 +2677,8 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
const float RealMsgPaddingTee = (!g_Config.m_ClChatOld ? Chat.MessageTeeSize() + CChat::MESSAGE_TEE_PADDING_RIGHT : 0) * 2;
|
||||
const float RealOffsetY = RealFontSize + RealMsgPaddingY;
|
||||
|
||||
const float X = 5.0f + RealMsgPaddingX / 2.0f + Section.x;
|
||||
float Y = Section.y;
|
||||
const float X = RealMsgPaddingX / 2.0f + PreviewView.x;
|
||||
float Y = PreviewView.y;
|
||||
float LineWidth = g_Config.m_ClChatWidth * 2 - (RealMsgPaddingX * 1.5f) - RealMsgPaddingTee;
|
||||
|
||||
CTextCursor Cursor;
|
||||
|
@ -2977,36 +2951,34 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
}
|
||||
else if(s_CurTab == APPEARANCE_TAB_NAME_PLATE)
|
||||
{
|
||||
MainView.VSplitMid(&LeftView, &RightView);
|
||||
MainView.VSplitMid(&LeftView, &RightView, MarginBetweenViews);
|
||||
|
||||
// ***** Name Plate ***** //
|
||||
LeftView.HSplitTop(HeadlineAndVMargin, &Label, &LeftView);
|
||||
LeftView.HSplitTop(HeadlineHeight, &Label, &LeftView);
|
||||
Ui()->DoLabel(&Label, Localize("Name Plate"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
LeftView.HSplitTop(MarginSmall, nullptr, &LeftView);
|
||||
|
||||
// General name plate settings
|
||||
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);
|
||||
Section.HSplitTop(2 * LineSize, &Button, &Section);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClNameplates, Localize("Show name plates"), &g_Config.m_ClNameplates, &LeftView, LineSize);
|
||||
LeftView.HSplitTop(2 * LineSize, &Button, &LeftView);
|
||||
Ui()->DoScrollbarOption(&g_Config.m_ClNameplatesSize, &g_Config.m_ClNameplatesSize, &Button, Localize("Name plates size"), 0, 100, &CUi::ms_LinearScrollbarScale, CUi::SCROLLBAR_OPTION_MULTILINE);
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClNameplatesClan, Localize("Show clan above name plates"), &g_Config.m_ClNameplatesClan, &Section, LineSize);
|
||||
Section.HSplitTop(2 * LineSize, &Button, &Section);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClNameplatesClan, Localize("Show clan above name plates"), &g_Config.m_ClNameplatesClan, &LeftView, LineSize);
|
||||
LeftView.HSplitTop(2 * LineSize, &Button, &LeftView);
|
||||
if(g_Config.m_ClNameplatesClan)
|
||||
{
|
||||
Ui()->DoScrollbarOption(&g_Config.m_ClNameplatesClanSize, &g_Config.m_ClNameplatesClanSize, &Button, Localize("Clan plates size"), 0, 100, &CUi::ms_LinearScrollbarScale, CUi::SCROLLBAR_OPTION_MULTILINE);
|
||||
}
|
||||
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClNameplatesTeamcolors, Localize("Use team colors for name plates"), &g_Config.m_ClNameplatesTeamcolors, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClNameplatesFriendMark, Localize("Show friend mark (♥) in name plates"), &g_Config.m_ClNameplatesFriendMark, &Section, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClNameplatesTeamcolors, Localize("Use team colors for name plates"), &g_Config.m_ClNameplatesTeamcolors, &LeftView, LineSize);
|
||||
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClNameplatesFriendMark, Localize("Show friend mark (♥) in name plates"), &g_Config.m_ClNameplatesFriendMark, &LeftView, LineSize);
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
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);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
if(g_Config.m_ClNameplatesStrong)
|
||||
{
|
||||
static int s_NameplatesStrong = 0;
|
||||
|
@ -3014,13 +2986,13 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
g_Config.m_ClNameplatesStrong = g_Config.m_ClNameplatesStrong != 2 ? 2 : 1;
|
||||
}
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
if(DoButton_CheckBox(&g_Config.m_ClShowDirection, Localize("Show other players' key presses"), g_Config.m_ClShowDirection >= 1 && g_Config.m_ClShowDirection != 3, &Button))
|
||||
{
|
||||
g_Config.m_ClShowDirection = g_Config.m_ClShowDirection ^ 1;
|
||||
}
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
static int s_ShowLocalPlayer = 0;
|
||||
if(DoButton_CheckBox(&s_ShowLocalPlayer, Localize("Show local player's key presses"), g_Config.m_ClShowDirection >= 2, &Button))
|
||||
{
|
||||
|
@ -3029,27 +3001,25 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
|
||||
ColorRGBA GreenDefault(0.78f, 1.0f, 0.8f, 1.0f);
|
||||
static CButtonContainer s_AuthedColor, s_SameClanColor;
|
||||
DoLine_ColorPicker(&s_AuthedColor, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Authed name color in scoreboard"), &g_Config.m_ClAuthedPlayerColor, GreenDefault, false);
|
||||
DoLine_ColorPicker(&s_SameClanColor, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Same clan color in scoreboard"), &g_Config.m_ClSameClanColor, GreenDefault, false);
|
||||
DoLine_ColorPicker(&s_AuthedColor, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Authed name color in scoreboard"), &g_Config.m_ClAuthedPlayerColor, GreenDefault, false);
|
||||
DoLine_ColorPicker(&s_SameClanColor, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Same clan color in scoreboard"), &g_Config.m_ClSameClanColor, GreenDefault, false);
|
||||
}
|
||||
else if(s_CurTab == APPEARANCE_TAB_HOOK_COLLISION)
|
||||
{
|
||||
MainView.VSplitMid(&LeftView, &RightView);
|
||||
MainView.VSplitMid(&LeftView, &RightView, MarginBetweenViews);
|
||||
|
||||
// ***** Hookline ***** //
|
||||
LeftView.HSplitTop(HeadlineAndVMargin, &Label, &LeftView);
|
||||
LeftView.HSplitTop(HeadlineHeight, &Label, &LeftView);
|
||||
Ui()->DoLabel(&Label, Localize("Hook collision line"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
LeftView.HSplitTop(MarginSmall, nullptr, &LeftView);
|
||||
|
||||
// General hookline settings
|
||||
LeftView.HSplitTop(SectionTotalMargin + 9 * LineSize + 3 * ColorPickerLineSize, &Section, &LeftView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
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);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
if(g_Config.m_ClShowHookCollOwn)
|
||||
{
|
||||
static int s_ShowHookCollOwn = 0;
|
||||
|
@ -3057,12 +3027,12 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
g_Config.m_ClShowHookCollOwn = g_Config.m_ClShowHookCollOwn != 2 ? 2 : 1;
|
||||
}
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
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);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
if(g_Config.m_ClShowHookCollOther)
|
||||
{
|
||||
static int s_ShowHookCollOther = 0;
|
||||
|
@ -3070,90 +3040,85 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
g_Config.m_ClShowHookCollOther = g_Config.m_ClShowHookCollOther != 2 ? 2 : 1;
|
||||
}
|
||||
|
||||
Section.HSplitTop(2 * LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(2 * LineSize, &Button, &LeftView);
|
||||
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);
|
||||
|
||||
Section.HSplitTop(2 * LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(2 * LineSize, &Button, &LeftView);
|
||||
Ui()->DoScrollbarOption(&g_Config.m_ClHookCollAlpha, &g_Config.m_ClHookCollAlpha, &Button, Localize("Hook collision line opacity"), 0, 100, &CUi::ms_LinearScrollbarScale, CUi::SCROLLBAR_OPTION_MULTILINE, "%");
|
||||
|
||||
static CButtonContainer s_HookCollNoCollResetId, s_HookCollHookableCollResetId, s_HookCollTeeCollResetId;
|
||||
static int s_HookCollToolTip;
|
||||
|
||||
Section.HSplitTop(LineSize, &Label, &Section);
|
||||
LeftView.HSplitTop(LineSize, &Label, &LeftView);
|
||||
LeftView.HSplitTop(MarginSmall, nullptr, &LeftView);
|
||||
Ui()->DoLabel(&Label, Localize("Colors of the hook collision line, in case of a possible collision with:"), 13.0f, TEXTALIGN_ML);
|
||||
Ui()->DoButtonLogic(&s_HookCollToolTip, 0, &Label); // Just for the tooltip, result ignored
|
||||
GameClient()->m_Tooltips.DoToolTip(&s_HookCollToolTip, &Label, Localize("Your movements are not taken into account when calculating the line colors"));
|
||||
DoLine_ColorPicker(&s_HookCollNoCollResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Nothing hookable"), &g_Config.m_ClHookCollColorNoColl, ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f), false);
|
||||
DoLine_ColorPicker(&s_HookCollHookableCollResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Something hookable"), &g_Config.m_ClHookCollColorHookableColl, ColorRGBA(130.0f / 255.0f, 232.0f / 255.0f, 160.0f / 255.0f, 1.0f), false);
|
||||
DoLine_ColorPicker(&s_HookCollTeeCollResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("A Tee"), &g_Config.m_ClHookCollColorTeeColl, ColorRGBA(1.0f, 1.0f, 0.0f, 1.0f), false);
|
||||
DoLine_ColorPicker(&s_HookCollNoCollResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Nothing hookable"), &g_Config.m_ClHookCollColorNoColl, ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f), false);
|
||||
DoLine_ColorPicker(&s_HookCollHookableCollResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Something hookable"), &g_Config.m_ClHookCollColorHookableColl, ColorRGBA(130.0f / 255.0f, 232.0f / 255.0f, 160.0f / 255.0f, 1.0f), false);
|
||||
DoLine_ColorPicker(&s_HookCollTeeCollResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("A Tee"), &g_Config.m_ClHookCollColorTeeColl, ColorRGBA(1.0f, 1.0f, 0.0f, 1.0f), false);
|
||||
}
|
||||
else if(s_CurTab == APPEARANCE_TAB_INFO_MESSAGES)
|
||||
{
|
||||
MainView.VSplitMid(&LeftView, &RightView);
|
||||
MainView.VSplitMid(&LeftView, &RightView, MarginBetweenViews);
|
||||
|
||||
// ***** Info Messages ***** //
|
||||
LeftView.HSplitTop(HeadlineAndVMargin, &Label, &LeftView);
|
||||
LeftView.HSplitTop(HeadlineHeight, &Label, &LeftView);
|
||||
Ui()->DoLabel(&Label, Localize("Info Messages"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
LeftView.HSplitTop(MarginSmall, nullptr, &LeftView);
|
||||
|
||||
// General info messages settings
|
||||
LeftView.HSplitTop(SectionTotalMargin + 2 * LineSize + 2 * ColorPickerLineSize, &Section, &LeftView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
if(DoButton_CheckBox(&g_Config.m_ClShowKillMessages, Localize("Show kill messages"), g_Config.m_ClShowKillMessages, &Button))
|
||||
{
|
||||
g_Config.m_ClShowKillMessages ^= 1;
|
||||
}
|
||||
|
||||
Section.HSplitTop(LineSize, &Button, &Section);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
if(DoButton_CheckBox(&g_Config.m_ClShowFinishMessages, Localize("Show finish messages"), g_Config.m_ClShowFinishMessages, &Button))
|
||||
{
|
||||
g_Config.m_ClShowFinishMessages ^= 1;
|
||||
}
|
||||
|
||||
static CButtonContainer s_KillMessageNormalColorId, s_KillMessageHighlightColorId;
|
||||
DoLine_ColorPicker(&s_KillMessageNormalColorId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Normal Color"), &g_Config.m_ClKillMessageNormalColor, ColorRGBA(1.0f, 1.0f, 1.0f), false);
|
||||
DoLine_ColorPicker(&s_KillMessageHighlightColorId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Highlight Color"), &g_Config.m_ClKillMessageHighlightColor, ColorRGBA(1.0f, 1.0f, 1.0f), false);
|
||||
DoLine_ColorPicker(&s_KillMessageNormalColorId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Normal Color"), &g_Config.m_ClKillMessageNormalColor, ColorRGBA(1.0f, 1.0f, 1.0f), false);
|
||||
DoLine_ColorPicker(&s_KillMessageHighlightColorId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Highlight Color"), &g_Config.m_ClKillMessageHighlightColor, ColorRGBA(1.0f, 1.0f, 1.0f), false);
|
||||
}
|
||||
else if(s_CurTab == APPEARANCE_TAB_LASER)
|
||||
{
|
||||
MainView.VSplitMid(&LeftView, &RightView);
|
||||
MainView.VSplitMid(&LeftView, &RightView, MarginBetweenViews);
|
||||
|
||||
// ***** Weapons ***** //
|
||||
LeftView.HSplitTop(HeadlineAndVMargin, &Label, &LeftView);
|
||||
LeftView.HSplitTop(HeadlineHeight, &Label, &LeftView);
|
||||
Ui()->DoLabel(&Label, Localize("Weapons"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
LeftView.HSplitTop(MarginSmall, nullptr, &LeftView);
|
||||
|
||||
// General weapon laser settings
|
||||
LeftView.HSplitTop(SectionTotalMargin + 4 * ColorPickerLineSize, &Section, &LeftView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
static CButtonContainer s_LaserRifleOutResetId, s_LaserRifleInResetId, s_LaserShotgunOutResetId, s_LaserShotgunInResetId;
|
||||
|
||||
ColorHSLA LaserRifleOutlineColor = DoLine_ColorPicker(&s_LaserRifleOutResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Rifle Laser Outline Color"), &g_Config.m_ClLaserRifleOutlineColor, ColorRGBA(0.074402f, 0.074402f, 0.247166f, 1.0f), false);
|
||||
ColorHSLA LaserRifleInnerColor = DoLine_ColorPicker(&s_LaserRifleInResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Rifle Laser Inner Color"), &g_Config.m_ClLaserRifleInnerColor, ColorRGBA(0.498039f, 0.498039f, 1.0f, 1.0f), false);
|
||||
ColorHSLA LaserShotgunOutlineColor = DoLine_ColorPicker(&s_LaserShotgunOutResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Shotgun Laser Outline Color"), &g_Config.m_ClLaserShotgunOutlineColor, ColorRGBA(0.125490f, 0.098039f, 0.043137f, 1.0f), false);
|
||||
ColorHSLA LaserShotgunInnerColor = DoLine_ColorPicker(&s_LaserShotgunInResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Shotgun Laser Inner Color"), &g_Config.m_ClLaserShotgunInnerColor, ColorRGBA(0.570588f, 0.417647f, 0.252941f, 1.0f), false);
|
||||
ColorHSLA LaserRifleOutlineColor = DoLine_ColorPicker(&s_LaserRifleOutResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Rifle Laser Outline Color"), &g_Config.m_ClLaserRifleOutlineColor, ColorRGBA(0.074402f, 0.074402f, 0.247166f, 1.0f), false);
|
||||
ColorHSLA LaserRifleInnerColor = DoLine_ColorPicker(&s_LaserRifleInResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Rifle Laser Inner Color"), &g_Config.m_ClLaserRifleInnerColor, ColorRGBA(0.498039f, 0.498039f, 1.0f, 1.0f), false);
|
||||
ColorHSLA LaserShotgunOutlineColor = DoLine_ColorPicker(&s_LaserShotgunOutResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Shotgun Laser Outline Color"), &g_Config.m_ClLaserShotgunOutlineColor, ColorRGBA(0.125490f, 0.098039f, 0.043137f, 1.0f), false);
|
||||
ColorHSLA LaserShotgunInnerColor = DoLine_ColorPicker(&s_LaserShotgunInResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Shotgun Laser Inner Color"), &g_Config.m_ClLaserShotgunInnerColor, ColorRGBA(0.570588f, 0.417647f, 0.252941f, 1.0f), false);
|
||||
|
||||
// ***** Entities ***** //
|
||||
LeftView.HSplitTop(MarginToNextSection * 2.0f, 0x0, &LeftView);
|
||||
LeftView.HSplitTop(HeadlineAndVMargin, &Label, &LeftView);
|
||||
LeftView.HSplitTop(10.0f, nullptr, &LeftView);
|
||||
LeftView.HSplitTop(HeadlineHeight, &Label, &LeftView);
|
||||
Ui()->DoLabel(&Label, Localize("Entities"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
LeftView.HSplitTop(MarginSmall, nullptr, &LeftView);
|
||||
|
||||
// General entity laser settings
|
||||
LeftView.HSplitTop(SectionTotalMargin + 4 * ColorPickerLineSize, &Section, &LeftView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
|
||||
static CButtonContainer s_LaserDoorOutResetId, s_LaserDoorInResetId, s_LaserFreezeOutResetId, s_LaserFreezeInResetId;
|
||||
|
||||
ColorHSLA LaserDoorOutlineColor = DoLine_ColorPicker(&s_LaserDoorOutResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Door Laser Outline Color"), &g_Config.m_ClLaserDoorOutlineColor, ColorRGBA(0.0f, 0.131372f, 0.096078f, 1.0f), false);
|
||||
ColorHSLA LaserDoorInnerColor = DoLine_ColorPicker(&s_LaserDoorInResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Door Laser Inner Color"), &g_Config.m_ClLaserDoorInnerColor, ColorRGBA(0.262745f, 0.760784f, 0.639215f, 1.0f), false);
|
||||
ColorHSLA LaserFreezeOutlineColor = DoLine_ColorPicker(&s_LaserFreezeOutResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Freeze Laser Outline Color"), &g_Config.m_ClLaserFreezeOutlineColor, ColorRGBA(0.131372f, 0.123529f, 0.182352f, 1.0f), false);
|
||||
ColorHSLA LaserFreezeInnerColor = DoLine_ColorPicker(&s_LaserFreezeInResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &Section, Localize("Freeze Laser Inner Color"), &g_Config.m_ClLaserFreezeInnerColor, ColorRGBA(0.482352f, 0.443137f, 0.564705f, 1.0f), false);
|
||||
ColorHSLA LaserDoorOutlineColor = DoLine_ColorPicker(&s_LaserDoorOutResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Door Laser Outline Color"), &g_Config.m_ClLaserDoorOutlineColor, ColorRGBA(0.0f, 0.131372f, 0.096078f, 1.0f), false);
|
||||
ColorHSLA LaserDoorInnerColor = DoLine_ColorPicker(&s_LaserDoorInResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Door Laser Inner Color"), &g_Config.m_ClLaserDoorInnerColor, ColorRGBA(0.262745f, 0.760784f, 0.639215f, 1.0f), false);
|
||||
ColorHSLA LaserFreezeOutlineColor = DoLine_ColorPicker(&s_LaserFreezeOutResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Freeze Laser Outline Color"), &g_Config.m_ClLaserFreezeOutlineColor, ColorRGBA(0.131372f, 0.123529f, 0.182352f, 1.0f), false);
|
||||
ColorHSLA LaserFreezeInnerColor = DoLine_ColorPicker(&s_LaserFreezeInResetId, ColorPickerLineSize, ColorPickerLabelSize, ColorPickerLineSpacing, &LeftView, Localize("Freeze Laser Inner Color"), &g_Config.m_ClLaserFreezeInnerColor, ColorRGBA(0.482352f, 0.443137f, 0.564705f, 1.0f), false);
|
||||
|
||||
static CButtonContainer s_AllToRifleResetId, s_AllToDefaultResetId;
|
||||
|
||||
LeftView.HSplitTop(20.0f, 0x0, &LeftView);
|
||||
LeftView.HSplitTop(20.0f, &Button, &LeftView);
|
||||
LeftView.HSplitTop(4 * MarginSmall, nullptr, &LeftView);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
if(DoButton_Menu(&s_AllToRifleResetId, Localize("Set all to Rifle"), 0, &Button))
|
||||
{
|
||||
g_Config.m_ClLaserShotgunOutlineColor = g_Config.m_ClLaserRifleOutlineColor;
|
||||
|
@ -3165,8 +3130,8 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
}
|
||||
|
||||
// values taken from the CL commands
|
||||
LeftView.HSplitTop(10.0f, 0x0, &LeftView);
|
||||
LeftView.HSplitTop(20.0f, &Button, &LeftView);
|
||||
LeftView.HSplitTop(2 * MarginSmall, nullptr, &LeftView);
|
||||
LeftView.HSplitTop(LineSize, &Button, &LeftView);
|
||||
if(DoButton_Menu(&s_AllToDefaultResetId, Localize("Reset to defaults"), 0, &Button))
|
||||
{
|
||||
g_Config.m_ClLaserRifleOutlineColor = 11176233;
|
||||
|
@ -3180,24 +3145,27 @@ void CMenus::RenderSettingsAppearance(CUIRect MainView)
|
|||
}
|
||||
|
||||
// ***** Laser Preview ***** //
|
||||
RightView.HSplitTop(HeadlineAndVMargin, &Label, &RightView);
|
||||
RightView.HSplitTop(HeadlineHeight, &Label, &RightView);
|
||||
Ui()->DoLabel(&Label, Localize("Preview"), HeadlineFontSize, TEXTALIGN_ML);
|
||||
RightView.HSplitTop(MarginSmall, nullptr, &RightView);
|
||||
|
||||
RightView.HSplitTop(SectionTotalMargin + 50.0f, &Section, &RightView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
DoLaserPreview(&Section, LaserRifleOutlineColor, LaserRifleInnerColor, LASERTYPE_RIFLE);
|
||||
const float LaserPreviewHeight = 50.0f;
|
||||
CUIRect LaserPreview;
|
||||
RightView.HSplitTop(LaserPreviewHeight, &LaserPreview, &RightView);
|
||||
RightView.HSplitTop(2 * MarginSmall, nullptr, &RightView);
|
||||
DoLaserPreview(&LaserPreview, LaserRifleOutlineColor, LaserRifleInnerColor, LASERTYPE_RIFLE);
|
||||
|
||||
RightView.HSplitTop(SectionTotalMargin + 50.0f, &Section, &RightView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
DoLaserPreview(&Section, LaserShotgunOutlineColor, LaserShotgunInnerColor, LASERTYPE_SHOTGUN);
|
||||
RightView.HSplitTop(LaserPreviewHeight, &LaserPreview, &RightView);
|
||||
RightView.HSplitTop(2 * MarginSmall, nullptr, &RightView);
|
||||
DoLaserPreview(&LaserPreview, LaserShotgunOutlineColor, LaserShotgunInnerColor, LASERTYPE_SHOTGUN);
|
||||
|
||||
RightView.HSplitTop(SectionTotalMargin + 50.0f, &Section, &RightView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
DoLaserPreview(&Section, LaserDoorOutlineColor, LaserDoorInnerColor, LASERTYPE_DOOR);
|
||||
RightView.HSplitTop(LaserPreviewHeight, &LaserPreview, &RightView);
|
||||
RightView.HSplitTop(2 * MarginSmall, nullptr, &RightView);
|
||||
DoLaserPreview(&LaserPreview, LaserDoorOutlineColor, LaserDoorInnerColor, LASERTYPE_DOOR);
|
||||
|
||||
RightView.HSplitTop(SectionTotalMargin + 50.0f, &Section, &RightView);
|
||||
Section.Margin(SectionMargin, &Section);
|
||||
DoLaserPreview(&Section, LaserFreezeOutlineColor, LaserFreezeInnerColor, LASERTYPE_DOOR);
|
||||
RightView.HSplitTop(LaserPreviewHeight, &LaserPreview, &RightView);
|
||||
RightView.HSplitTop(2 * MarginSmall, nullptr, &RightView);
|
||||
DoLaserPreview(&LaserPreview, LaserFreezeOutlineColor, LaserFreezeInnerColor, LASERTYPE_DOOR);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue