refactor: Restructure file dialog handling and introduce utility classes
- Updated file dialog references across the application to utilize a new `util::FileDialogWrapper` for consistent file handling. - Refactored existing code to replace direct calls to `core::FileDialogWrapper` with the new utility class, enhancing modularity and maintainability. - Introduced `util::PlatformPaths` for cross-platform directory management, ensuring consistent access to user directories and application data paths. - Added new utility functions for file operations, improving the overall file handling capabilities within the application. - Updated CMake configurations to include new utility source files, streamlining the build process.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "sprite_editor.h"
|
||||
|
||||
#include "app/gfx/performance_profiler.h"
|
||||
#include "app/core/platform/file_dialog.h"
|
||||
#include "util/file_util.h"
|
||||
#include "app/editor/sprite/zsprite.h"
|
||||
#include "app/gfx/arena.h"
|
||||
#include "app/gui/icons.h"
|
||||
@@ -254,7 +254,7 @@ void SpriteEditor::DrawCustomSpritesMetadata() {
|
||||
// ZSprite Maker format open file dialog
|
||||
if (ImGui::Button("Open ZSprite")) {
|
||||
// Open ZSprite file
|
||||
std::string file_path = core::FileDialogWrapper::ShowOpenFileDialog();
|
||||
std::string file_path = util::FileDialogWrapper::ShowOpenFileDialog();
|
||||
if (!file_path.empty()) {
|
||||
zsprite::ZSprite zsprite;
|
||||
status_ = zsprite.Load(file_path);
|
||||
|
||||
Reference in New Issue
Block a user