Fix issue with frame deselection on spritesheet editor (???) + work on themes

This commit is contained in:
2025-11-15 11:01:27 -05:00
parent cbbf81b739
commit b9f195ab89
13 changed files with 81 additions and 22 deletions
+1 -1
View File
@@ -563,7 +563,7 @@ namespace anm2ed::imgui
auto cursor = areaType == tool::ANIMATION_PREVIEW || areaType == tool::ALL ? tool::INFO[useTool].cursor
: ImGuiMouseCursor_NotAllowed;
ImGui::SetMouseCursor(cursor);
ImGui::SetKeyboardFocusHere(-1);
ImGui::SetKeyboardFocusHere();
switch (useTool)
{
+1 -1
View File
@@ -258,7 +258,7 @@ namespace anm2ed::imgui
auto cursor = areaType == tool::SPRITESHEET_EDITOR || areaType == tool::ALL ? tool::INFO[useTool].cursor
: ImGuiMouseCursor_NotAllowed;
ImGui::SetMouseCursor(cursor);
ImGui::SetKeyboardFocusHere(-1);
ImGui::SetKeyboardFocusHere();
switch (useTool)
{
+3 -2
View File
@@ -16,7 +16,6 @@ using namespace glm;
namespace anm2ed::imgui
{
constexpr auto COLOR_HIDDEN_MULTIPLIER = vec4(0.5f, 0.5f, 0.5f, 1.000f);
constexpr auto FRAME_TIMELINE_COLOR = ImVec4(0.106f, 0.184f, 0.278f, 1.000f);
constexpr auto FRAME_BORDER_COLOR = ImVec4(1.0f, 1.0f, 1.0f, 0.15f);
constexpr auto FRAME_BORDER_COLOR_REFERENCED = ImVec4(1.0f, 1.0f, 1.0f, 0.50f);
constexpr auto FRAME_MULTIPLE_OVERLAY_COLOR = ImVec4(1.0f, 1.0f, 1.0f, 0.05f);
@@ -249,7 +248,9 @@ namespace anm2ed::imgui
ImGui::Image(resources.icons[icon].id, icon_size_get());
ImGui::SameLine();
if (isReferenced) ImGui::PushFont(resources.fonts[font::BOLD].get(), font::SIZE);
ImGui::PushStyleColor(ImGuiCol_Text, to_imvec4(color::WHITE));
ImGui::TextUnformatted(label.c_str());
ImGui::PopStyleColor();
if (isReferenced) ImGui::PopFont();
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4());
@@ -483,7 +484,7 @@ namespace anm2ed::imgui
{
drawList->AddRectFilled(cursorScreenPos,
ImVec2(cursorScreenPos.x + framesSize.x, cursorScreenPos.y + framesSize.y),
ImGui::GetColorU32(FRAME_TIMELINE_COLOR));
ImGui::GetColorU32(ImGui::GetStyleColorVec4(ImGuiCol_Header)));
for (int i = frameMin; i < frameMax; i++)
{
+1 -1
View File
@@ -50,7 +50,7 @@ namespace anm2ed::imgui
if (isSelected) ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive));
if (shortcut(manager.chords[info.shortcut], shortcut::GLOBAL_SET)) tool_use((tool::Type)i);
if (shortcut(manager.chords[info.shortcut], shortcut::GLOBAL_SET, true)) tool_use((tool::Type)i);
if (i == tool::COLOR)
{