mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Small ImGui theme adjustments
This commit is contained in:
parent
374a44f29e
commit
3323c3fadb
@ -259,13 +259,13 @@ void CBrowser::ServerBrowserSection(void)
|
||||
ImGui::InputTextWithHint("##ServerBrowser_ServerEncKey", "Enter encryption key", m_szServerEncKeyBuffer, IM_ARRAYSIZE(m_szServerEncKeyBuffer));
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Connect", ImVec2(ImGui::GetWindowContentRegionWidth() / 4.2, 18.5)))
|
||||
if (ImGui::Button("Connect", ImVec2(ImGui::GetWindowContentRegionWidth() / 4.3, ImGui::GetFrameHeight())))
|
||||
{
|
||||
ConnectToServer(m_szServerAddressBuffer, m_szServerEncKeyBuffer);
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Private Servers", ImVec2(ImGui::GetWindowContentRegionWidth() / 4.2, 18.5)))
|
||||
if (ImGui::Button("Private Servers", ImVec2(ImGui::GetWindowContentRegionWidth() / 4.3, ImGui::GetFrameHeight())))
|
||||
{
|
||||
ImGui::OpenPopup("Connect to Private Server");
|
||||
}
|
||||
@ -501,15 +501,15 @@ void CBrowser::HostServerSection(void)
|
||||
{
|
||||
if (m_Server.svServerName.empty())
|
||||
{
|
||||
svServerNameErr = "No Server Name assigned.";
|
||||
svServerNameErr = "No server name assigned.";
|
||||
}
|
||||
else if (m_Server.svPlaylist.empty())
|
||||
{
|
||||
svServerNameErr = "No Playlist assigned.";
|
||||
svServerNameErr = "No playlist assigned.";
|
||||
}
|
||||
else if (m_Server.svMapName.empty())
|
||||
{
|
||||
svServerNameErr = "'levelname' was empty.";
|
||||
svServerNameErr = "No level name assigned.";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -527,11 +527,11 @@ void CBrowser::HostServerSection(void)
|
||||
{
|
||||
if (m_Server.svPlaylist.empty())
|
||||
{
|
||||
svServerNameErr = "No Playlist assigned.";
|
||||
svServerNameErr = "No playlist assigned.";
|
||||
}
|
||||
else if (m_Server.svMapName.empty())
|
||||
{
|
||||
svServerNameErr = "'levelname' was empty.";
|
||||
svServerNameErr = "No level name assigned.";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -733,12 +733,13 @@ void CBrowser::ChangeEncryptionKey(const string& svNetKey) const
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBrowser::SetStyleVar(void)
|
||||
{
|
||||
if (g_pImGuiConfig->InitStyle() == 0)
|
||||
{
|
||||
m_bModernTheme = true;
|
||||
}
|
||||
int nStyle = g_pImGuiConfig->InitStyle();
|
||||
|
||||
ImGui::SetNextWindowSize(ImVec2(840, 600), ImGuiCond_FirstUseEver);
|
||||
m_bModernTheme = nStyle == 0;
|
||||
m_bLegacyTheme = nStyle == 1;
|
||||
m_bDefaultTheme = nStyle == 2;
|
||||
|
||||
ImGui::SetNextWindowSize(ImVec2(910, 524), ImGuiCond_FirstUseEver);
|
||||
ImGui::SetWindowPos(ImVec2(-500, 50), ImGuiCond_FirstUseEver);
|
||||
}
|
||||
|
||||
|
@ -28,8 +28,10 @@ enum class EServerVisibility
|
||||
class CBrowser
|
||||
{
|
||||
private:
|
||||
bool m_bInitialized = false;
|
||||
bool m_bModernTheme = false;
|
||||
bool m_bInitialized = false;
|
||||
bool m_bModernTheme = false;
|
||||
bool m_bLegacyTheme = false;
|
||||
bool m_bDefaultTheme = false;
|
||||
public:
|
||||
////////////////////
|
||||
// Enum Vars //
|
||||
|
@ -849,10 +849,11 @@ void CConsole::ClearLog(void)
|
||||
//-----------------------------------------------------------------------------
|
||||
void CConsole::SetStyleVar(void)
|
||||
{
|
||||
if (g_pImGuiConfig->InitStyle() == 0)
|
||||
{
|
||||
m_bModernTheme = true;
|
||||
}
|
||||
int nStyle = g_pImGuiConfig->InitStyle();
|
||||
|
||||
m_bModernTheme = nStyle == 0;
|
||||
m_bLegacyTheme = nStyle == 1;
|
||||
m_bDefaultTheme = nStyle == 2;
|
||||
|
||||
ImGui::SetNextWindowSize(ImVec2(1200, 524), ImGuiCond_FirstUseEver);
|
||||
ImGui::SetWindowPos(ImVec2(-1000, 50), ImGuiCond_FirstUseEver);
|
||||
|
@ -41,8 +41,12 @@ private:
|
||||
float m_flScrollX = 0.f;
|
||||
float m_flScrollY = 0.f;
|
||||
float m_flFadeAlpha = 0.f;
|
||||
bool m_bInitialized = false;
|
||||
|
||||
bool m_bModernTheme = false;
|
||||
bool m_bLegacyTheme = false;
|
||||
bool m_bDefaultTheme = false;
|
||||
|
||||
bool m_bInitialized = false;
|
||||
bool m_bReclaimFocus = false;
|
||||
bool m_bCopyToClipBoard = false;
|
||||
|
||||
|
@ -43,6 +43,8 @@ string StringReplaceC(const string& svInput, const string& svFrom, const string&
|
||||
string StringEscape(const string& svInput);
|
||||
string StringUnescape(const string& svInput);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Bytes
|
||||
vector<int> StringToBytes(const string& svInput, bool bNullTerminator);
|
||||
vector<int> PatternToBytes(const string& svInput);
|
||||
pair<vector<uint8_t>, string> PatternToMaskedBytes(const string& svInput);
|
||||
|
7
r5dev/thirdparty/imgui/src/imgui_utility.cpp
vendored
7
r5dev/thirdparty/imgui/src/imgui_utility.cpp
vendored
@ -241,7 +241,7 @@ int ImGuiConfig::InitStyle() const
|
||||
colors[ImGuiCol_Header] = ImVec4(0.35f, 0.37f, 0.39f, 1.00f);
|
||||
colors[ImGuiCol_HeaderHovered] = ImVec4(0.45f, 0.47f, 0.49f, 1.00f);
|
||||
colors[ImGuiCol_HeaderActive] = ImVec4(0.53f, 0.55f, 0.57f, 1.00f);
|
||||
colors[ImGuiCol_Separator] = ImVec4(0.08f, 0.10f, 0.12f, 1.00f);
|
||||
colors[ImGuiCol_Separator] = ImVec4(0.08f, 0.10f, 0.12f, 0.00f);
|
||||
colors[ImGuiCol_SeparatorHovered] = ImVec4(0.53f, 0.55f, 0.57f, 1.00f);
|
||||
colors[ImGuiCol_SeparatorActive] = ImVec4(0.63f, 0.65f, 0.67f, 1.00f);
|
||||
colors[ImGuiCol_ResizeGrip] = ImVec4(0.41f, 0.43f, 0.45f, 1.00f);
|
||||
@ -263,14 +263,15 @@ int ImGuiConfig::InitStyle() const
|
||||
style.WindowRounding = 4.0f;
|
||||
style.FrameRounding = 1.0f;
|
||||
style.ChildRounding = 2.0f;
|
||||
style.PopupRounding = 3.0f;
|
||||
style.PopupRounding = 4.0f;
|
||||
style.TabRounding = 1.0f;
|
||||
style.GrabRounding = 1.0f;
|
||||
style.ScrollbarRounding = 1.0f;
|
||||
|
||||
result = 2;
|
||||
}
|
||||
|
||||
style.ItemSpacing = ImVec2(4, 4);
|
||||
style.ItemSpacing = ImVec2(5, 4);
|
||||
style.FramePadding = ImVec2(4, 4);
|
||||
style.WindowPadding = ImVec2(5, 5);
|
||||
style.WindowMinSize = ImVec2(750, 510);
|
||||
|
Loading…
x
Reference in New Issue
Block a user