791b7746 [nostalgia] Update liccor file 842e3587 [nostalgia] Update .gitignore for new location of scripts dir 318e7900 [ox] Update liccor file 9f338a74 [ox] Run liccor 645e48af [nostalgia,olympic] Run liccor ef92c8df [nostalgia] Make pkg-gba.py force lower case for pack tool 849d50be [nostalgia/core] Make getTileIdx return an Optional 845092f1 [turbine] Make common turbine.cpp file private to its target 75819a17 [ox/std] Add SmallMap::values() d66da857 [ox/std] SmallMap fixes, add findIdx function git-subtree-dir: deps/nostalgia git-subtree-split: 791b7746f331a3ad02cfdcdbc7c3ecde0cab7779
44 lines
868 B
C++
44 lines
868 B
C++
/*
|
|
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <ox/event/signal.hpp>
|
|
#include <ox/std/string.hpp>
|
|
|
|
#include <turbine/context.hpp>
|
|
|
|
#include <studio/filedialog.hpp>
|
|
#include <studio/task.hpp>
|
|
|
|
namespace studio {
|
|
|
|
class FileDialogManager: public studio::Task {
|
|
private:
|
|
enum class UpdateProjectPathState {
|
|
None,
|
|
EnableSystemCursor,
|
|
RunFileDialog,
|
|
Start = EnableSystemCursor,
|
|
} m_state = UpdateProjectPathState::Start;
|
|
|
|
public:
|
|
FileDialogManager() noexcept = default;
|
|
|
|
template<class... Args>
|
|
explicit FileDialogManager(Args ...args) noexcept {
|
|
pathChosen.connect(args...);
|
|
}
|
|
|
|
~FileDialogManager() noexcept override = default;
|
|
|
|
studio::TaskState update(turbine::Context &ctx) noexcept final;
|
|
|
|
// signals
|
|
ox::Signal<ox::Error(ox::String const&)> pathChosen;
|
|
|
|
};
|
|
|
|
}
|