feat(GUI): Updated colors, border rounding and added storopia font
This commit is contained in:
parent
4fd2768aa0
commit
ff8c4cda25
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
extern const std::uint8_t font_rubik[140732];
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
extern const std::uint8_t font_rubik[140732];
|
||||
extern const std::uint8_t font_storopia[89888];
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "fonts.hpp"
|
||||
#include "fonts/fonts.hpp"
|
||||
|
||||
const std::uint8_t font_rubik[140732]
|
||||
{
|
7497
BigBaseV2/src/fonts/storopia.cpp
Normal file
7497
BigBaseV2/src/fonts/storopia.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,11 @@ namespace big
|
||||
{
|
||||
void gui::dx_init()
|
||||
{
|
||||
static ImVec4 bgColor = ImVec4(0.105f, 0.1f, 0.1f, 1.00f);
|
||||
static ImVec4 primary = ImVec4(0.117f, 0.529f, 0.941f, 1.f);
|
||||
static ImVec4 secondary = ImVec4(0.156f, 0.647f, 0.97f, 1.f);
|
||||
static ImVec4 whiteBroken = ImVec4(.972f, .972f, .972f, 1.f);
|
||||
|
||||
auto &style = ImGui::GetStyle();
|
||||
style.WindowPadding = { 10.f, 10.f };
|
||||
style.PopupRounding = 0.f;
|
||||
@ -27,17 +32,17 @@ namespace big
|
||||
style.IndentSpacing = 21.f;
|
||||
style.ScrollbarSize = 15.f;
|
||||
style.GrabMinSize = 8.f;
|
||||
style.WindowBorderSize = 1.f;
|
||||
style.WindowBorderSize = 0.f;
|
||||
style.ChildBorderSize = 0.f;
|
||||
style.PopupBorderSize = 1.f;
|
||||
style.PopupBorderSize = 0.f;
|
||||
style.FrameBorderSize = 0.f;
|
||||
style.TabBorderSize = 0.f;
|
||||
style.WindowRounding = 0.f;
|
||||
style.ChildRounding = 0.f;
|
||||
style.FrameRounding = 0.f;
|
||||
style.ScrollbarRounding = 0.f;
|
||||
style.WindowRounding = 5.f;
|
||||
style.ChildRounding = 2.f;
|
||||
style.FrameRounding = 3.f;
|
||||
style.ScrollbarRounding = 3.f;
|
||||
style.GrabRounding = 0.f;
|
||||
style.TabRounding = 0.f;
|
||||
style.TabRounding = 3.f;
|
||||
style.WindowTitleAlign = { 0.5f, 0.5f };
|
||||
style.ButtonTextAlign = { 0.5f, 0.5f };
|
||||
style.DisplaySafeAreaPadding = { 3.f, 3.f };
|
||||
@ -45,7 +50,7 @@ namespace big
|
||||
auto &colors = style.Colors;
|
||||
colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
|
||||
colors[ImGuiCol_TextDisabled] = ImVec4(1.00f, 0.90f, 0.19f, 1.00f);
|
||||
colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.06f, 0.06f, 1.00f);
|
||||
colors[ImGuiCol_WindowBg] = bgColor;
|
||||
colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
|
||||
colors[ImGuiCol_PopupBg] = ImVec4(0.08f, 0.08f, 0.08f, 0.94f);
|
||||
colors[ImGuiCol_Border] = ImVec4(0.30f, 0.30f, 0.30f, 0.50f);
|
||||
@ -57,25 +62,25 @@ namespace big
|
||||
colors[ImGuiCol_TitleBgActive] = ImVec4(0.19f, 0.19f, 0.19f, 1.00f);
|
||||
colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
|
||||
colors[ImGuiCol_MenuBarBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.00f);
|
||||
colors[ImGuiCol_ScrollbarBg] = ImVec4(0.02f, 0.02f, 0.02f, 0.53f);
|
||||
colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
|
||||
colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
|
||||
colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.51f, 0.51f, 0.51f, 1.00f);
|
||||
colors[ImGuiCol_ScrollbarBg] = colors[ImGuiCol_WindowBg];
|
||||
colors[ImGuiCol_ScrollbarGrab] = primary;
|
||||
colors[ImGuiCol_ScrollbarGrabHovered] = secondary;
|
||||
colors[ImGuiCol_ScrollbarGrabActive] = primary;
|
||||
colors[ImGuiCol_CheckMark] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
|
||||
colors[ImGuiCol_SliderGrab] = ImVec4(0.34f, 0.34f, 0.34f, 1.00f);
|
||||
colors[ImGuiCol_SliderGrabActive] = ImVec4(0.39f, 0.38f, 0.38f, 1.00f);
|
||||
colors[ImGuiCol_Button] = ImVec4(0.41f, 0.41f, 0.41f, 0.74f);
|
||||
colors[ImGuiCol_ButtonHovered] = ImVec4(0.41f, 0.41f, 0.41f, 0.78f);
|
||||
colors[ImGuiCol_ButtonActive] = ImVec4(0.41f, 0.41f, 0.41f, 0.87f);
|
||||
colors[ImGuiCol_Button] = primary;
|
||||
colors[ImGuiCol_ButtonHovered] = secondary;
|
||||
colors[ImGuiCol_ButtonActive] = colors[ImGuiCol_ButtonHovered];
|
||||
colors[ImGuiCol_Header] = ImVec4(0.37f, 0.37f, 0.37f, 0.31f);
|
||||
colors[ImGuiCol_HeaderHovered] = ImVec4(0.38f, 0.38f, 0.38f, 0.37f);
|
||||
colors[ImGuiCol_HeaderActive] = ImVec4(0.37f, 0.37f, 0.37f, 0.51f);
|
||||
colors[ImGuiCol_Separator] = ImVec4(0.38f, 0.38f, 0.38f, 0.50f);
|
||||
colors[ImGuiCol_SeparatorHovered] = ImVec4(0.46f, 0.46f, 0.46f, 0.50f);
|
||||
colors[ImGuiCol_SeparatorActive] = ImVec4(0.46f, 0.46f, 0.46f, 0.64f);
|
||||
colors[ImGuiCol_ResizeGrip] = ImVec4(0.26f, 0.26f, 0.26f, 1.00f);
|
||||
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
|
||||
colors[ImGuiCol_ResizeGripActive] = ImVec4(0.35f, 0.35f, 0.35f, 1.00f);
|
||||
colors[ImGuiCol_ResizeGrip] = whiteBroken;
|
||||
colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.f, 1.f, 1.f, 1.00f);
|
||||
colors[ImGuiCol_ResizeGripActive] = whiteBroken;
|
||||
colors[ImGuiCol_Tab] = ImVec4(0.21f, 0.21f, 0.21f, 0.86f);
|
||||
colors[ImGuiCol_TabHovered] = ImVec4(0.27f, 0.27f, 0.27f, 0.86f);
|
||||
colors[ImGuiCol_TabActive] = ImVec4(0.34f, 0.34f, 0.34f, 0.86f);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "common.hpp"
|
||||
#include "fonts.hpp"
|
||||
#include "fonts/fonts.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "gui.hpp"
|
||||
#include "pointers.hpp"
|
||||
@ -51,9 +51,10 @@ namespace big
|
||||
|
||||
ImFontConfig font_cfg{};
|
||||
font_cfg.FontDataOwnedByAtlas = false;
|
||||
std::strcpy(font_cfg.Name, "Rubik");
|
||||
std::strcpy(font_cfg.Name, "Storopia");
|
||||
|
||||
m_font = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_rubik), sizeof(font_rubik), 20.f, &font_cfg);
|
||||
m_font = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_storopia), sizeof(font_storopia), 20.f, &font_cfg);
|
||||
//m_font = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_rubik), sizeof(font_rubik), 20.f, &font_cfg);
|
||||
m_monospace_font = ImGui::GetIO().Fonts->AddFontDefault();
|
||||
|
||||
g_gui.dx_init();
|
||||
|
Reference in New Issue
Block a user