Maze Builder Docs 8.2.1
Loading...
Searching...
No Matches
loading_state.h
Go to the documentation of this file.
1#ifndef LOADING_STATE_H
2#define LOADING_STATE_H
3
5#include <MazeBuilder/state.h>
6
7#include <mutex>
8#include <optional>
9
12namespace mazes
13{
14 class args;
15 class runtime_stack;
16
18 class loading_state final : public state
19 {
20 public:
21 // constructor
22 explicit loading_state(const runtime_app::context& ctx, runtime_stack* rs);
23
24 void draw() const noexcept override;
25
30 bool update(const std::optional<args>& args, double delta_time) noexcept override;
31
32 private:
35 void load_resources(const std::optional<args>& args) const noexcept;
36
37 grid_manager* grid_mapper;
38 processed_text_manager* processed_text_mapper;
39
40 std::once_flag resource_loaded_flag;
41 bool has_finished{false};
42 };
43} // namespace mazes
44
45#endif // LOADING_STATE_H
Command-line argument handler with JSON support.
Definition args.h:19
State for loading and pre-generating mazes.
Definition loading_state.h:19
bool update(const std::optional< args > &args, double delta_time) noexcept override
Updates the state of the loading process.
Class representing the runtime stack of states in the maze builder application.
Definition runtime_stack.h:23
struct representing the context passed to states in the runtime_app stack
Definition runtime_app.h:34
struct representing a state in the runtime stack
Definition state.h:18