Add TextWithSeparators gui function
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
namespace yaze {
|
namespace yaze {
|
||||||
namespace gui {
|
namespace gui {
|
||||||
|
|
||||||
void DisplayPalette(app::gfx::SNESPalette& palette, bool loaded) {
|
void DisplayPalette(app::gfx::SNESPalette& palette, bool loaded) {
|
||||||
static ImVec4 color = ImVec4(0, 0, 0, 255.f);
|
static ImVec4 color = ImVec4(0, 0, 0, 255.f);
|
||||||
ImGuiColorEditFlags misc_flags = ImGuiColorEditFlags_AlphaPreview |
|
ImGuiColorEditFlags misc_flags = ImGuiColorEditFlags_AlphaPreview |
|
||||||
@@ -47,7 +48,7 @@ void DisplayPalette(app::gfx::SNESPalette& palette, bool loaded) {
|
|||||||
color = backup_color;
|
color = backup_color;
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
ImGui::BeginGroup(); // Lock X position
|
ImGui::BeginGroup(); // Lock X position
|
||||||
ImGui::Text("Palette");
|
ImGui::Text("Palette");
|
||||||
for (int n = 0; n < IM_ARRAYSIZE(saved_palette); n++) {
|
for (int n = 0; n < IM_ARRAYSIZE(saved_palette); n++) {
|
||||||
ImGui::PushID(n);
|
ImGui::PushID(n);
|
||||||
@@ -80,5 +81,6 @@ ImGui::BeginGroup(); // Lock X position
|
|||||||
misc_flags | ImGuiColorEditFlags_NoSidePreview |
|
misc_flags | ImGuiColorEditFlags_NoSidePreview |
|
||||||
ImGuiColorEditFlags_NoSmallPreview);
|
ImGuiColorEditFlags_NoSmallPreview);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace gui
|
} // namespace gui
|
||||||
} // namespace yaze
|
} // namespace yaze
|
||||||
@@ -6,6 +6,12 @@
|
|||||||
namespace yaze {
|
namespace yaze {
|
||||||
namespace gui {
|
namespace gui {
|
||||||
|
|
||||||
|
void TextWithSeparators(const absl::string_view &text) {
|
||||||
|
ImGui::Separator();
|
||||||
|
ImGui::Text("%s", text.data());
|
||||||
|
ImGui::Separator();
|
||||||
|
}
|
||||||
|
|
||||||
void ColorsYaze() {
|
void ColorsYaze() {
|
||||||
ImGuiStyle *style = &ImGui::GetStyle();
|
ImGuiStyle *style = &ImGui::GetStyle();
|
||||||
ImVec4 *colors = style->Colors;
|
ImVec4 *colors = style->Colors;
|
||||||
|
|||||||
@@ -4,9 +4,13 @@
|
|||||||
#include <imgui/imgui.h>
|
#include <imgui/imgui.h>
|
||||||
#include <imgui/imgui_internal.h>
|
#include <imgui/imgui_internal.h>
|
||||||
|
|
||||||
|
#include "absl/strings/string_view.h"
|
||||||
|
|
||||||
namespace yaze {
|
namespace yaze {
|
||||||
namespace gui {
|
namespace gui {
|
||||||
|
|
||||||
|
void TextWithSeparators(const absl::string_view& text);
|
||||||
|
|
||||||
void ColorsYaze();
|
void ColorsYaze();
|
||||||
|
|
||||||
} // namespace gui
|
} // namespace gui
|
||||||
|
|||||||
Reference in New Issue
Block a user