3#ifndef REGISTER_QUICK_ACTION
5#define REGISTER_QUICK_ACTION(name, text, callback, disabled, active, button_color, description)
8#define ALWAYS_FALSE []() -> bool { return false; }
9#define DEFAULT_BTN []() -> int { return -1; }
14 [&]() { MapView()->MapGrid()->Toggle(); },
16 [&]() ->
bool {
return MapView()->MapGrid()->IsEnabled(); },
18 "[Ctrl+G] Toggle grid.")
23 [&]() ->
bool {
return !CanFillGameTiles(); },
26 "Construct game tiles from this layer.")
29 "Game tiles: Hookable",
31 [&]() ->
bool {
return !CanFillGameTiles(); },
34 "Construct game tiles from this layer.")
39 [&]() ->
bool {
return !CanFillGameTiles(); },
42 "Construct game tiles from this layer.")
45 "Game tiles: Unhookable",
47 [&]() ->
bool {
return !CanFillGameTiles(); },
50 "Construct game tiles from this layer.")
53 "Game tiles: Hookthrough",
55 [&]() ->
bool {
return !CanFillGameTiles(); },
58 "Construct game tiles from this layer.")
63 [&]() ->
bool {
return !CanFillGameTiles(); },
66 "Construct game tiles from this layer.")
69 "Game tiles: Unfreeze",
71 [&]() ->
bool {
return !CanFillGameTiles(); },
74 "Construct game tiles from this layer.")
77 "Game tiles: Deep Freeze",
79 [&]() ->
bool {
return !CanFillGameTiles(); },
82 "Construct game tiles from this layer.")
85 "Game tiles: Deep Unfreeze",
87 [&]() ->
bool {
return !CanFillGameTiles(); },
90 "Construct game tiles from this layer.")
93 "Game tiles: Blue Check Tele",
95 [&]() ->
bool {
return !CanFillGameTiles(); },
98 "Construct game tiles from this layer.")
101 "Game tiles: Red Check Tele",
103 [&]() ->
bool {
return !CanFillGameTiles(); },
106 "Construct game tiles from this layer.")
109 "Game tiles: Live Freeze",
111 [&]() ->
bool {
return !CanFillGameTiles(); },
114 "Construct game tiles from this layer.")
117 "Game tiles: Live Unfreeze",
119 [&]() ->
bool {
return !CanFillGameTiles(); },
122 "Construct game tiles from this layer.")
126 [&]() { AddGroup(); },
134 [&]() { MapView()->ResetZoom(); },
138 "[Numpad*] Zoom to normal and remove editor offset.")
142 [&]() { MapView()->Zoom()->ChangeValue(50.0f); },
146 "[Numpad-] Zoom out.")
150 [&]() { MapView()->Zoom()->ChangeValue(-50.0f); },
154 "[Numpad+] Zoom in.")
158 [&]() { MapView()->Focus(); },
162 "[Home] Restore map focus.")
166 [&]() { MapView()->ProofMode()->Toggle(); },
168 [&]() ->
bool {
return MapView()->ProofMode()->IsEnabled(); },
170 "Toggle proof borders. These borders represent the area that a player can see with default zoom.")
176 [&]() { AddSwitchLayer(); },
177 [&]() ->
bool {
return !GetSelectedGroup()->m_GameGroup || m_Map.m_pSwitchLayer; },
180 "Create a new switch layer.")
184 [&]() { AddTuneLayer(); },
185 [&]() ->
bool {
return !GetSelectedGroup()->m_GameGroup || m_Map.m_pTuneLayer; },
188 "Create a new tuning layer.")
192 [&]() { AddSpeedupLayer(); },
193 [&]() ->
bool {
return !GetSelectedGroup()->m_GameGroup || m_Map.m_pSpeedupLayer; },
196 "Create a new speedup layer.")
200 [&]() { AddTeleLayer(); },
201 [&]() ->
bool {
return !GetSelectedGroup()->m_GameGroup || m_Map.m_pTeleLayer; },
204 "Create a new tele layer.")
208 [&]() { AddFrontLayer(); },
209 [&]() ->
bool {
return !GetSelectedGroup()->m_GameGroup || m_Map.m_pFrontLayer; },
212 "Create a new item layer.")
228 "[Ctrl+Shift+S] Save the current map under a new name.")
235 if(!m_PopupEventWasActivated)
237 m_PopupEventType = POPEVENT_LOADCURRENT;
238 m_PopupEventActivated =
true;
249 "[Ctrl+Shift+L] Open the current ingame map for editing.")
253 [&]() { m_ActiveExtraEditor = m_ActiveExtraEditor == EXTRAEDITOR_ENVELOPES ? EXTRAEDITOR_NONE : EXTRAEDITOR_ENVELOPES; },
256 [&]() ->
int {
return m_ShowPicker ? -1 : m_ActiveExtraEditor == EXTRAEDITOR_ENVELOPES; },
257 "Toggle the envelope editor.")
261 [&]() { m_ActiveExtraEditor = m_ActiveExtraEditor == EXTRAEDITOR_SERVER_SETTINGS ? EXTRAEDITOR_NONE : EXTRAEDITOR_SERVER_SETTINGS; },
264 [&]() ->
int {
return m_ShowPicker ? -1 : m_ActiveExtraEditor == EXTRAEDITOR_SERVER_SETTINGS; },
265 "Toggle the server settings editor.")
269 [&]() { m_ActiveExtraEditor = m_ActiveExtraEditor == EXTRAEDITOR_HISTORY ? EXTRAEDITOR_NONE : EXTRAEDITOR_HISTORY; },
272 [&]() ->
int {
return m_ShowPicker ? -1 : m_ActiveExtraEditor == EXTRAEDITOR_HISTORY; },
273 "Toggle the editor history view.")
281 "Load a new image to use in the map.")
285 [&]() { LayerSelectImage(); },
286 [&]() ->
bool {
return !IsNonGameTileLayerSelected(); },
289 "Pick mapres image for currently selected layer.")
294 m_ShowTileInfo = SHOW_TILE_OFF;
295 m_ShowEnvelopePreview = SHOWENV_NONE;
298 [&]() ->
bool {
return m_ShowTileInfo == SHOW_TILE_OFF; },
300 "Do not show tile information.")
305 m_ShowTileInfo = SHOW_TILE_DECIMAL;
306 m_ShowEnvelopePreview = SHOWENV_NONE;
309 [&]() ->
bool {
return m_ShowTileInfo == SHOW_TILE_DECIMAL; },
311 "[Ctrl+I] Show tile information.")
316 m_ShowTileInfo = SHOW_TILE_HEXADECIMAL;
317 m_ShowEnvelopePreview = SHOWENV_NONE;
320 [&]() ->
bool {
return m_ShowTileInfo == SHOW_TILE_HEXADECIMAL; },
322 "[Ctrl+Shift+I] Show tile information in hexadecimal.")
326 [&]() { DeleteSelectedLayer(); },
339 [&]() { m_ColorPipetteActive = !m_ColorPipetteActive; },
341 [&]() ->
bool {
return m_ColorPipetteActive; },
343 "[Ctrl+Shift+C] Color pipette. Pick a color from the screen by clicking on it.")
347 [&]() { MapDetails(); },
351 "Adjust the map details of the current map.")
355 [&]() { AddQuadOrSound(); },
357 std::shared_ptr<CLayer>
pLayer = GetSelectedLayer(0);
364 "[Ctrl+Q] Add a new quad.")
368 [&]() { AddQuadOrSound(); },
370 std::shared_ptr<CLayer>
pLayer = GetSelectedLayer(0);
377 "[Ctrl+Q] Add a new sound source.")
381 [&]() { TestMapLocally(); },
385 "Run a local server with the current map and connect you to it.")
@ STATE_DEMOPLAYBACK
Definition client.h:57
@ STATE_ONLINE
Definition client.h:56
@ TYPE_ALL
Definition storage.h:27
@ TYPE_SAVE
Definition storage.h:26
const char * fs_filename(const char *path)
Definition system.cpp:2655
void fs_split_file_extension(const char *filename, char *name, size_t name_size, char *extension, size_t extension_size)
Definition system.cpp:2665
@ LAYERTYPE_QUADS
Definition mapitems.h:15
@ LAYERTYPE_SOUNDS
Definition mapitems.h:22
#define ALWAYS_FALSE
Definition quick_actions.h:8
#define REGISTER_QUICK_ACTION(name, text, callback, disabled, active, button_color, description)
Definition quick_actions.h:5
#define DEFAULT_BTN
Definition quick_actions.h:9
constexpr auto IO_MAX_PATH_LENGTH
Definition types.h:49