From 26faab7cb61b0ea8b7d04c014fc136474da37667 Mon Sep 17 00:00:00 2001 From: Gaspar Capello Date: Fri, 7 May 2021 16:15:25 -0300 Subject: [PATCH] Add "Space+1/2/3" shortcuts to tile mode button tooltips --- src/app/ui/color_bar.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/ui/color_bar.cpp b/src/app/ui/color_bar.cpp index e12d4f5f0..617ab18b0 100644 --- a/src/app/ui/color_bar.cpp +++ b/src/app/ui/color_bar.cpp @@ -1782,15 +1782,20 @@ void ColorBar::setupTooltips(TooltipManager* tooltipManager) m_tilesButton.getItem(0), key_tooltip(Strings::color_bar_switch_tileset().c_str(), CommandId::ToggleTilesMode()), BOTTOM); + Command* cmd = Commands::instance()->byId(CommandId::TilesetMode()); + Params params; + params.set("mode", "manual"); tooltipManager->addTooltipFor( m_tilesetModeButtons.getItem((int)TilesetMode::Manual), - Strings::color_bar_tileset_mode_manual(), BOTTOM); + key_tooltip(Strings::color_bar_tileset_mode_manual().c_str(), cmd->id().c_str(), params), BOTTOM); + params.set("mode", "auto"); tooltipManager->addTooltipFor( m_tilesetModeButtons.getItem((int)TilesetMode::Auto), - Strings::color_bar_tileset_mode_auto(), BOTTOM); + key_tooltip(Strings::color_bar_tileset_mode_auto().c_str(), cmd->id().c_str(), params), BOTTOM); + params.set("mode", "stack"); tooltipManager->addTooltipFor( m_tilesetModeButtons.getItem((int)TilesetMode::Stack), - Strings::color_bar_tileset_mode_stack(), BOTTOM); + key_tooltip(Strings::color_bar_tileset_mode_stack().c_str(), cmd->id().c_str(), params), BOTTOM); } // static