Unravel Engine C++ Reference
Loading...
Searching...
No Matches
create_scene_modal.h
Go to the documentation of this file.
1#pragma once
2
4#include <functional>
5
6namespace unravel
7{
8
14{
15public:
20 static void show(std::function<void(defaults::scene_preset)> on_preset_selected);
21
25 static void render();
26
28 static auto is_pending() -> bool;
29
34
36 static void cancel_if_pending();
37
38private:
39 create_scene_modal() = default;
40 static auto get_instance() -> create_scene_modal&;
41
42 std::function<void(defaults::scene_preset)> callback_;
44 bool show_requested_{};
45 bool open_requested_{};
46};
47
48} // namespace unravel
Modal for selecting a scene preset when creating a new scene. Call ShowCreateSceneModal() to open; Re...
static void show(std::function< void(defaults::scene_preset)> on_preset_selected)
Request the create scene modal to open.
static void render()
Draw the modal. Call every frame from the main UI render loop.
static auto complete_if_pending(defaults::scene_preset preset) -> bool
static auto is_pending() -> bool
True when Show was requested and the user has not yet confirmed/cancelled.
static void cancel_if_pending()
Dismiss a pending create-scene modal without invoking the callback.
defaults::scene_preset preset
scene_preset
Quality presets for new scene creation (low = less expensive, high = more expensive).
Definition defaults.h:215