diff --git a/data/strings/en.ini b/data/strings/en.ini index edc32c19f..d997d465d 100644 --- a/data/strings/en.ini +++ b/data/strings/en.ini @@ -458,7 +458,11 @@ SwitchColors = Switch Colors SwapCheckerboardColors = Swap Checkerboard Background Colors SwitchNonactiveLayersOpacity = Switch Nonactive Layers Opacity SymmetryMode = Symmetry Mode -TiledMode = Tiled Mode +TiledMode = Tiled Mode: {} +TiledMode_None = None +TiledMode_Both = Both Axes +TiledMode_X = X Axis +TiledMode_Y = Y Axis Timeline = Switch Timeline ToggleOtherLayersOpacity = Toggle Other Layers Opacity ToggleOtherLayersOpacity_PreviewEditor = Toggle Other Layers Opacity in Preview diff --git a/src/app/commands/cmd_tiled_mode.cpp b/src/app/commands/cmd_tiled_mode.cpp index 92a8656ce..8488ce98b 100644 --- a/src/app/commands/cmd_tiled_mode.cpp +++ b/src/app/commands/cmd_tiled_mode.cpp @@ -1,4 +1,5 @@ // Aseprite +// Copyright (C) 2024 Igara Studio S.A. // Copyright (C) 2001-2017 David Capello // // This program is distributed under the terms of @@ -12,6 +13,7 @@ #include "app/commands/command.h" #include "app/commands/params.h" #include "app/context.h" +#include "app/i18n/strings.h" #include "app/pref/preferences.h" #include "filters/tiled_mode.h" @@ -26,6 +28,7 @@ protected: bool onEnabled(Context* context) override; bool onChecked(Context* context) override; void onExecute(Context* context) override; + std::string onGetFriendlyName() const override; filters::TiledMode m_mode; }; @@ -64,6 +67,18 @@ void TiledModeCommand::onExecute(Context* ctx) Preferences::instance().document(doc).tiled.mode(m_mode); } +std::string TiledModeCommand::onGetFriendlyName() const +{ + std::string mode; + switch (m_mode) { + case filters::TiledMode::NONE: mode = Strings::commands_TiledMode_None(); break; + case filters::TiledMode::BOTH: mode = Strings::commands_TiledMode_Both(); break; + case filters::TiledMode::X_AXIS: mode = Strings::commands_TiledMode_X(); break; + case filters::TiledMode::Y_AXIS: mode = Strings::commands_TiledMode_Y(); break; + } + return Strings::commands_TiledMode(mode); +} + Command* CommandFactory::createTiledModeCommand() { return new TiledModeCommand;