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.")
84 GameTilesDeepUnfreeze,
85 "Game tiles: Deep Unfreeze",
87 [&]() ->
bool {
return !CanFillGameTiles(); },
90 "Construct game tiles from this layer.")
92 GameTilesBlueCheckTele,
93 "Game tiles: Blue Check Tele",
95 [&]() ->
bool {
return !CanFillGameTiles(); },
98 "Construct game tiles from this layer.")
100 GameTilesRedCheckTele,
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.")
116 GameTilesLiveUnfreeze,
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 || Map()->m_pSwitchLayer; },
180 "Create a new switch layer.")
184 [&]() { AddTuneLayer(); },
185 [&]() ->
bool {
return !GetSelectedGroup()->m_GameGroup || Map()->m_pTuneLayer; },
188 "Create a new tuning layer.")
192 [&]() { AddSpeedupLayer(); },
193 [&]() ->
bool {
return !GetSelectedGroup()->m_GameGroup || Map()->m_pSpeedupLayer; },
196 "Create a new speedup layer.")
200 [&]() { AddTeleLayer(); },
201 [&]() ->
bool {
return !GetSelectedGroup()->m_GameGroup || Map()->m_pTeleLayer; },
204 "Create a new tele layer.")
208 [&]() { AddFrontLayer(); },
209 [&]() ->
bool {
return !GetSelectedGroup()->m_GameGroup || 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;
297 [&]() ->
bool {
return m_ShowTileInfo == SHOW_TILE_OFF; },
299 "Do not show tile information.")
304 m_ShowTileInfo = SHOW_TILE_DECIMAL;
307 [&]() ->
bool {
return m_ShowTileInfo == SHOW_TILE_DECIMAL; },
309 "[Ctrl+I] Show tile information.")
314 m_ShowTileInfo = SHOW_TILE_HEXADECIMAL;
317 [&]() ->
bool {
return m_ShowTileInfo == SHOW_TILE_HEXADECIMAL; },
319 "[Ctrl+Shift+I] Show tile information in hexadecimal.")
321 PreviewQuadEnvelopes,
322 "Preview quad envelopes",
324 m_ShowEnvelopePreview = !m_ShowEnvelopePreview;
325 m_ActiveEnvelopePreview = EEnvelopePreview::NONE;
328 [&]() ->
bool {
return m_ShowEnvelopePreview; },
330 "Toggle previewing the paths of quads with a position envelope when a quad layer is selected.")
334 [&]() { DeleteSelectedLayer(); },
336 std::shared_ptr<CLayer> pCurrentLayer = GetSelectedLayer(0);
339 return Map()->m_pGameLayer == pCurrentLayer;
347 [&]() { m_ColorPipetteActive = !m_ColorPipetteActive; },
349 [&]() ->
bool {
return m_ColorPipetteActive; },
351 "[Ctrl+Shift+C] Color pipette. Pick a color from the screen by clicking on it.")
355 [&]() { MapDetails(); },
359 "Adjust the map details of the current map.")
363 [&]() { AddQuadOrSound(); },
365 std::shared_ptr<CLayer> pLayer = GetSelectedLayer(0);
372 "[Ctrl+Q] Add a new quad.")
376 [&]() { AddQuadOrSound(); },
378 std::shared_ptr<CLayer> pLayer = GetSelectedLayer(0);
385 "[Ctrl+Q] Add a new sound source.")
389 [&]() { TestMapLocally(); },
393 "Run a local server with the current map and connect you to it.")
@ IMAGE
Definition file_browser.h:22
@ MAP
Definition file_browser.h:21
@ STATE_DEMOPLAYBACK
Definition client.h:57
@ STATE_ONLINE
Definition client.h:56
@ TYPE_ALL
Definition storage.h:27
@ TYPE_SAVE
Definition storage.h:26
@ DEEP_FREEZE
Definition enums.h:28
@ DEEP_UNFREEZE
Definition enums.h:29
@ FREEZE
Definition enums.h:26
@ AIR
Definition enums.h:21
@ UNHOOKABLE
Definition enums.h:24
@ LIVE_FREEZE
Definition enums.h:32
@ UNFREEZE
Definition enums.h:27
@ HOOKABLE
Definition enums.h:22
@ DEATH
Definition enums.h:23
@ LIVE_UNFREEZE
Definition enums.h:33
@ HOOKTHROUGH
Definition enums.h:25
@ BLUE_CHECK_TELE
Definition enums.h:30
@ RED_CHECK_TELE
Definition enums.h:31
const char * fs_filename(const char *path)
Definition system.cpp:2497
void fs_split_file_extension(const char *filename, char *name, size_t name_size, char *extension, size_t extension_size)
Definition system.cpp:2507
@ LAYERTYPE_QUADS
Definition mapitems.h:15
@ LAYERTYPE_SOUNDS
Definition mapitems.h:22
#define REGISTER_QUICK_ACTION(name, text, callback, disabled, active, button_color, description)
Definition quick_actions.h:5
constexpr auto IO_MAX_PATH_LENGTH
Definition types.h:49