Remove dead UI code and 39 unused strings

Sound pastes use the Paste Sound(s) edit label instead of a toast string.
The popup size table is defined once, and the shaders window reuses asset_path_get.
This commit is contained in:
shweet committed 2026-11-22 18:45:36 -05:00
1 parent 15e94192bd
commit 99e06b72ea
9 files changed
+2 -77

No files matched your search

-5
View File
@@ -25,11 +25,6 @@ constexpr ImVec4 to_imvec4(const Vec4& v) noexcept
return {v.x, v.y, v.z, v.w};
}
constexpr Vec4 to_vec4(const ImVec4& v) noexcept
{
return {v.x, v.y, v.z, v.w};
}
template <typename T> constexpr T& dummy_value()
{
static T value = {};
-6
View File
@@ -14,12 +14,6 @@ public:
using std::set<int>::set;
using std::set<int>::operator=;
using std::set<int>::begin;
using std::set<int>::rbegin;
using std::set<int>::end;
using std::set<int>::size;
using std::set<int>::insert;
using std::set<int>::erase;
MultiSelectStorage();
void start(size_t,
-9
View File
@@ -8,13 +8,6 @@
int PopupHelper::nextId = 1;
#define POPUP_LIST \
X(POPUP_SMALL, 0.25f, true) \
X(POPUP_NORMAL, 0.5f, true) \
X(POPUP_TO_CONTENT, 0.0f, true) \
X(POPUP_SMALL_NO_HEIGHT, 0.25f, false) \
X(POPUP_NORMAL_NO_HEIGHT, 0.5f, false)
constexpr float POPUP_MULTIPLIERS[] = {
#define X(name, multiplier, isHeightSet) multiplier,
POPUP_LIST
@@ -27,8 +20,6 @@ constexpr bool POPUP_IS_HEIGHT_SET[] = {
#undef X
};
#undef POPUP_LIST
PopupHelper::PopupHelper(StringType labelId, PopupType type, PopupPosition position)
{
this->labelId = labelId;
-3
View File
@@ -5,7 +5,6 @@
#include "localization.h"
#define POPUP_LIST \
X(POPUP_SMALL, 0.25f, true) \
X(POPUP_NORMAL, 0.5f, true) \
X(POPUP_TO_CONTENT, 0.0f, true) \
X(POPUP_SMALL_NO_HEIGHT, 0.25f, false) \
@@ -46,5 +45,3 @@ public:
void end();
void close();
};
#undef POPUP_LIST
-4
View File
@@ -4,8 +4,6 @@
#include "ui/input.h"
bool isSelectableInputTextRenaming = false;
std::string& selectable_input_text_id()
{
static std::string editID;
@@ -20,7 +18,6 @@ bool input_text_rename_update(std::string& text, RenameState& state, float width
selectable_input_text_id().clear();
isActivated = true;
state = RENAME_FINISHED;
isSelectableInputTextRenaming = false;
};
if (state == RENAME_BEGIN)
@@ -58,7 +55,6 @@ bool selectable_input_text(const std::string& label, const std::string& id, std:
state = RENAME_BEGIN;
editID = id;
isActivated = true;
isSelectableInputTextRenaming = true;
}
}
+1 -7
View File
@@ -49,12 +49,6 @@ static Shader* shader_element_get(Document& document, int id)
return item_get(document.model.content.shaders, id);
}
static std::filesystem::path shader_asset_path_get(Document& document, const std::filesystem::path& path)
{
auto loadPath = path_backslash_handle(path);
return path_backslash_replace(path_make_relative(loadPath, document.directory_get()));
}
static void shader_path_edit(Document& document, int shaderId, std::filesystem::path Shader::* member,
const std::filesystem::path& value)
{
@@ -75,7 +69,7 @@ static void shader_dialog_update(ShadersPanel& window, Manager& manager, Dialog&
auto dialogPath = dialog.path;
auto shaderId = window.dialogShaderId;
manager.command_push({manager.selected, [dialogPath, shaderId, member](Manager&, Document& document) {
shader_path_edit(document, shaderId, member, shader_asset_path_get(document, dialogPath));
shader_path_edit(document, shaderId, member, asset_path_get(document, dialogPath));
}});
window.dialogShaderId = -1;
dialog.reset();
+1 -1
View File
@@ -77,7 +77,7 @@ void sounds_update(Panel& panel)
},
TOOLTIP_RELOAD_SOUNDS);
actions.add(ACTION_REPLACE, isOne, [&]() { dialog.file_open(Dialog::SOUND_REPLACE); }, TOOLTIP_REPLACE_SOUND);
items_clipboard_actions_add<Sound>(actions, panel, SelectionKind::SOUNDS, TOAST_SOUNDS_PASTE,
items_clipboard_actions_add<Sound>(actions, panel, SelectionKind::SOUNDS, EDIT_PASTE_SOUNDS,
TOAST_SOUNDS_DESERIALIZE_ERROR, sounds_get);
ListRows rows{.label_get =
-3
View File
@@ -31,7 +31,6 @@ class Taskbar
GenerateAnimationFromGrid generateAnimationFromGrid = {};
RenderAnimation renderAnimation = {};
Canvas generate;
PopupHelper generatePopup = PopupHelper(LABEL_TASKBAR_GENERATE_ANIMATION_FROM_GRID);
PopupHelper generateRegionsPopup{
PopupHelper(LABEL_TASKBAR_GENERATE_REGIONS_FROM_ANIMATIONS, POPUP_SMALL_NO_HEIGHT)};
@@ -42,10 +41,8 @@ class Taskbar
PopupHelper vectorPopup = PopupHelper(LABEL_CONVERT_SVG_POPUP, POPUP_SMALL_NO_HEIGHT);
PopupHelper renderPopup = PopupHelper(LABEL_TASKBAR_RENDER_ANIMATION, POPUP_SMALL_NO_HEIGHT);
PopupHelper configurePopup = PopupHelper(LABEL_TASKBAR_CONFIGURE);
Settings editSettings = {};
int generateRegionsTarget = 0;
bool isGenerateRegionsMapFrames = true;
bool isQuittingMode = false;
bool save_execute(Manager&, const PendingSave&);
void save_enqueue(Manager&, const PendingSave&);