let's try this

This commit is contained in:
2025-12-13 23:06:14 -05:00
parent efa9533a52
commit 225a584a21
5 changed files with 34 additions and 14 deletions
+4 -2
View File
@@ -14,6 +14,7 @@
#include <imgui/imgui.h>
#include "filesystem_.h"
#include "log.h"
#include "math_.h"
#include "render.h"
@@ -31,6 +32,7 @@ using namespace anm2ed::types;
using namespace anm2ed::canvas;
using namespace anm2ed::util;
using namespace glm;
namespace filesystem = anm2ed::util::filesystem;
namespace anm2ed::imgui
{
@@ -874,7 +876,7 @@ namespace anm2ed::imgui
if (dialog.is_selected(dialog::FFMPEG_PATH_SET))
{
ffmpegPath = dialog.path.string();
ffmpegPath = filesystem::path_to_utf8(dialog.path);
dialog.reset();
}
@@ -892,7 +894,7 @@ namespace anm2ed::imgui
if (dialog.is_selected(dialogType))
{
path = dialog.path.string();
path = filesystem::path_to_utf8(dialog.path);
dialog.reset();
}
+4 -4
View File
@@ -34,7 +34,7 @@ namespace anm2ed::imgui
auto behavior = [&]()
{
int id{};
auto pathString = path.string();
auto pathString = filesystem::path_to_utf8(path);
if (anm2.sound_add(document.directory_get(), path, id))
{
selection = {id};
@@ -76,7 +76,7 @@ namespace anm2ed::imgui
{
anm2::Sound& sound = anm2.content.sounds[id];
sound.reload(document.directory_get());
auto pathString = sound.path.string();
auto pathString = filesystem::path_to_utf8(sound.path);
toasts.push(std::vformat(localize.get(TOAST_RELOAD_SOUND), std::make_format_args(id, pathString)));
logger.info(
std::vformat(localize.get(TOAST_RELOAD_SOUND, anm2ed::ENGLISH), std::make_format_args(id, pathString)));
@@ -95,7 +95,7 @@ namespace anm2ed::imgui
auto& id = *selection.begin();
anm2::Sound& sound = anm2.content.sounds[id];
sound = anm2::Sound(document.directory_get(), path);
auto pathString = sound.path.string();
auto pathString = filesystem::path_to_utf8(sound.path);
toasts.push(std::vformat(localize.get(TOAST_REPLACE_SOUND), std::make_format_args(id, pathString)));
logger.info(
std::vformat(localize.get(TOAST_REPLACE_SOUND, anm2ed::ENGLISH), std::make_format_args(id, pathString)));
@@ -215,7 +215,7 @@ namespace anm2ed::imgui
bool isValid = sound.is_valid();
auto& soundIcon = isValid ? resources.icons[icon::SOUND] : resources.icons[icon::NONE];
auto tintColor = !isValid ? ImVec4(1.0f, 0.25f, 0.25f, 1.0f) : ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
auto pathString = sound.path.string();
auto pathString = filesystem::path_to_utf8(sound.path);
ImGui::SetNextItemSelectionUserData(id);
ImGui::SetNextItemStorageID(id);