17 #ifndef HEADER_SUPERTUX_EDITOR_OBJECT_SETTINGS_HPP 18 #define HEADER_SUPERTUX_EDITOR_OBJECT_SETTINGS_HPP 24 #include "editor/object_option.hpp" 25 #include "object/path_walker.hpp" 45 const std::string& get_name()
const {
return m_name; }
47 void add_bool(
const std::string& text,
bool* value_ptr,
48 const std::string& key = {},
49 const std::optional<bool>& default_value = {},
50 unsigned int flags = 0);
51 void add_float(
const std::string& text,
float* value_ptr,
52 const std::string& key = {},
53 const std::optional<float>& default_value = {},
54 unsigned int flags = 0);
55 void add_int(
const std::string& text,
int* value_ptr,
56 const std::string& key = {},
57 const std::optional<int>& default_value = {},
58 unsigned int flags = 0);
59 void add_label(
const std::string& text,
unsigned int flags = 0);
60 void add_rectf(
const std::string& text,
Rectf* value_ptr,
61 const std::string& key = {},
62 unsigned int flags = 0);
63 void add_worldmap_direction(
const std::string& text, worldmap::Direction* value_ptr,
64 std::optional<worldmap::Direction> default_value = {},
65 const std::string& key = {},
unsigned int flags = 0);
66 void add_direction(
const std::string& text, Direction* value_ptr,
67 std::vector<Direction> possible_directions = {},
68 const std::string& key = {},
unsigned int flags = 0);
69 void add_walk_mode(
const std::string& text, WalkMode* value_ptr,
70 const std::optional<WalkMode>& default_value = {},
71 const std::string& key = {},
unsigned int flags = 0);
72 void add_objects(
const std::string& text, std::vector<std::unique_ptr<GameObject>>* value_ptr,
73 uint8_t get_objects_param = 0,
const std::function<
void (std::unique_ptr<GameObject>)>& add_object_func = {},
74 const std::string& key = {},
unsigned int flags = 0);
75 void add_color(
const std::string& text,
Color* value_ptr,
76 const std::string& key = {},
77 const std::optional<Color>& default_value = {},
78 unsigned int flags = 0);
79 void add_rgba(
const std::string& text,
Color* value_ptr,
80 const std::string& key = {},
81 const std::optional<Color>& default_value = {},
82 unsigned int flags = 0);
83 void add_rgb(
const std::string& text,
Color* value_ptr,
84 const std::string& key = {},
85 const std::optional<Color>& default_value = {},
86 unsigned int flags = 0);
88 void add_script(
const std::string& text, std::string* value_ptr,
89 const std::string& key = {},
unsigned int flags = 0);
90 void add_text(
const std::string& text, std::string* value_ptr,
91 const std::string& key = {},
92 const std::optional<std::string>& default_value = {},
93 unsigned int flags = 0);
94 void add_translatable_text(
const std::string& text, std::string* value_ptr,
95 const std::string& key = {},
96 const std::optional<std::string>& default_value = {},
97 unsigned int flags = 0);
98 void add_multiline_text(
const std::string& text, std::string* value_ptr,
99 const std::string& key = {},
100 const std::optional<std::string>& default_value = {},
101 unsigned int flags = 0);
102 void add_multiline_translatable_text(
const std::string& text, std::string* value_ptr,
103 const std::string& key = {},
104 const std::optional<std::string>& default_value = {},
105 unsigned int flags = 0);
106 void add_string_select(
const std::string& text,
int* value_ptr,
const std::vector<std::string>& select,
107 const std::optional<int>& default_value = {},
108 const std::string& key = {},
unsigned int flags = 0);
109 void add_enum(
const std::string& text,
int* value_ptr,
110 const std::vector<std::string>& labels,
111 const std::vector<std::string>& symbols,
112 const std::optional<int>& default_value = {},
113 const std::string& key = {},
unsigned int flags = 0);
115 void add_sprite(
const std::string& text, std::string* value_ptr,
116 const std::string& key = {},
117 std::optional<std::string> default_value = {},
118 unsigned int flags = 0);
119 void add_surface(
const std::string& text, std::string* value_ptr,
120 const std::string& key = {},
121 std::optional<std::string> default_value = {},
122 unsigned int flags = 0);
123 void add_sound(
const std::string& text, std::string* value_ptr,
124 const std::string& key = {},
125 std::optional<std::string> default_value = {},
126 unsigned int flags = 0);
127 void add_music(
const std::string& text, std::string* value_ptr,
128 const std::string& key = {},
129 std::optional<std::string> default_value = {},
130 unsigned int flags = 0);
132 void add_worldmap(
const std::string& text, std::string* value_ptr,
const std::string& key = {},
133 unsigned int flags = 0);
134 void add_level(
const std::string& text, std::string* value_ptr,
const std::string& basedir,
135 const std::string& key = {},
unsigned int flags = 0);
136 void add_tiles(
const std::string& text,
TileMap* value_ptr,
const std::string& key = {},
137 unsigned int flags = 0);
138 void add_path(
const std::string& text,
Path* path,
const std::string& key = {},
139 unsigned int flags = 0);
140 void add_path_ref(
const std::string& text,
PathObject& target,
const std::string& path_ref,
141 const std::string& key = {},
unsigned int flags = 0);
142 void add_file(
const std::string& text, std::string* value_ptr,
143 const std::string& key = {},
144 const std::optional<std::string>& default_value = {},
145 const std::vector<std::string>& filter = {},
146 const std::string& basedir = {},
147 bool path_relative_to_basedir =
true,
148 unsigned int flags = 0);
149 void add_sexp(
const std::string& text,
const std::string& key,
150 sexp::Value& value,
unsigned int flags = 0);
151 void add_string_array(
const std::string& text,
const std::string& key, std::vector<std::string>& items);
152 void add_test_from_here();
153 void add_particle_editor();
155 const std::string& key = {},
unsigned int flags = 0);
156 void add_list(
const std::string& text,
const std::string& key,
const std::vector<std::string>& items, std::string* value_ptr);
159 void add_button(
const std::string& text,
const std::function<
void()>& callback);
161 const std::vector<std::unique_ptr<BaseObjectOption> >& get_options()
const {
return m_options; }
165 void reorder(
const std::vector<std::string>& order);
168 void remove(
const std::string& key);
171 void add_option(std::unique_ptr<BaseObjectOption> option);
175 std::vector<std::unique_ptr<BaseObjectOption> > m_options;
Helper class that allows to displace a handle on an object.
Definition: path_walker.hpp:35
Definition: object_settings.hpp:39
Definition: object_settings.hpp:32
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
Definition: object_option.hpp:39
A base class for all objects that contain, or make use of a path.
Definition: path_object.hpp:36
This class is responsible for managing an array of tiles.
Definition: tilemap.hpp:49