Refactoring, FFmpeg updates
This commit is contained in:
36
src/tool.h
36
src/tool.h
@@ -21,53 +21,61 @@ namespace anm2ed::tool
|
||||
COUNT
|
||||
};
|
||||
|
||||
enum AreaType
|
||||
{
|
||||
ANIMATION_PREVIEW,
|
||||
SPRITESHEET_EDITOR,
|
||||
ALL
|
||||
};
|
||||
|
||||
struct Info
|
||||
{
|
||||
ImGuiMouseCursor cursor{ImGuiMouseCursor_None};
|
||||
resource::icon::Type icon{};
|
||||
ShortcutType shortcut{};
|
||||
AreaType areaType;
|
||||
const char* label{};
|
||||
const char* tooltip{};
|
||||
};
|
||||
|
||||
constexpr Info INFO[] = {
|
||||
{ImGuiMouseCursor_Hand, resource::icon::PAN, SHORTCUT_PAN, "##Pan",
|
||||
{ImGuiMouseCursor_Hand, resource::icon::PAN, SHORTCUT_PAN, ALL, "##Pan",
|
||||
"Use the pan tool.\nWill shift the view as the cursor is dragged.\nYou can also use the middle mouse button to "
|
||||
"pan at any time."},
|
||||
|
||||
{ImGuiMouseCursor_ResizeAll, resource::icon::MOVE, SHORTCUT_MOVE, "##Move",
|
||||
{ImGuiMouseCursor_ResizeAll, resource::icon::MOVE, SHORTCUT_MOVE, ALL, "##Move",
|
||||
"Use the move tool.\nAnimation Preview: Will move the position of the frame."
|
||||
"\nSpritesheet Editor: Will move the pivot, and holding right click will use the Crop functionality instead."
|
||||
"\nUse mouse or directional keys to change the value."},
|
||||
|
||||
{ImGuiMouseCursor_Arrow, resource::icon::ROTATE, SHORTCUT_ROTATE, "##Rotate",
|
||||
{ImGuiMouseCursor_Arrow, resource::icon::ROTATE, SHORTCUT_ROTATE, ANIMATION_PREVIEW, "##Rotate",
|
||||
"Use the rotate tool.\nWill rotate the selected item as the cursor is dragged, or directional keys are "
|
||||
"pressed.\n(Animation Preview only.)"},
|
||||
|
||||
{ImGuiMouseCursor_ResizeNESW, resource::icon::SCALE, SHORTCUT_SCALE, "##Scale",
|
||||
{ImGuiMouseCursor_ResizeNESW, resource::icon::SCALE, SHORTCUT_SCALE, ANIMATION_PREVIEW, "##Scale",
|
||||
"Use the scale tool.\nWill scale the selected item as the cursor is dragged, or directional keys are "
|
||||
"pressed.\n(Animation Preview only.)"},
|
||||
|
||||
{ImGuiMouseCursor_Arrow, resource::icon::CROP, SHORTCUT_CROP, "##Crop",
|
||||
"Use the crop tool.\nWill produce a crop rectangle based on how the cursor is dragged."
|
||||
"\nAlternatively, you can use the arrow keys and Ctrl/Shift to move the size/position, respectively."
|
||||
{ImGuiMouseCursor_Arrow, resource::icon::CROP, SHORTCUT_CROP, SPRITESHEET_EDITOR, "##Crop",
|
||||
"Use the crop tool.\nWill produce a crop rectangle based on how the cursor is dragged, or directional keys are "
|
||||
"pressed.\nHold CTRL with arrow keys to change position."
|
||||
"\nHolding right click will use the Move tool's functionality."
|
||||
"\n(Spritesheet Editor only.)"},
|
||||
|
||||
{ImGuiMouseCursor_Arrow, resource::icon::DRAW, SHORTCUT_DRAW, "##Draw",
|
||||
{ImGuiMouseCursor_Arrow, resource::icon::DRAW, SHORTCUT_DRAW, SPRITESHEET_EDITOR, "##Draw",
|
||||
"Draws pixels onto the selected spritesheet, with the current color.\n(Spritesheet Editor only.)"},
|
||||
|
||||
{ImGuiMouseCursor_Arrow, resource::icon::ERASE, SHORTCUT_ERASE, "##Erase",
|
||||
{ImGuiMouseCursor_Arrow, resource::icon::ERASE, SHORTCUT_ERASE, SPRITESHEET_EDITOR, "##Erase",
|
||||
"Erases pixels from the selected spritesheet.\n(Spritesheet Editor only.)"},
|
||||
|
||||
{ImGuiMouseCursor_Arrow, resource::icon::COLOR_PICKER, SHORTCUT_COLOR_PICKER, "##Color Picker",
|
||||
"Selects a color from the canvas.\n(Spritesheet Editor only.)"},
|
||||
{ImGuiMouseCursor_Arrow, resource::icon::COLOR_PICKER, SHORTCUT_COLOR_PICKER, SPRITESHEET_EDITOR,
|
||||
"##Color Picker", "Selects a color from the canvas.\n(Spritesheet Editor only.)"},
|
||||
|
||||
{ImGuiMouseCursor_None, resource::icon::UNDO, SHORTCUT_UNDO, "##Undo", "Undoes the last action."},
|
||||
{ImGuiMouseCursor_None, resource::icon::UNDO, SHORTCUT_UNDO, ALL, "##Undo", "Undoes the last action."},
|
||||
|
||||
{ImGuiMouseCursor_None, resource::icon::REDO, SHORTCUT_REDO, "##Redo", "Redoes the last action."},
|
||||
{ImGuiMouseCursor_None, resource::icon::REDO, SHORTCUT_REDO, ALL, "##Redo", "Redoes the last action."},
|
||||
|
||||
{ImGuiMouseCursor_None, resource::icon::NONE, SHORTCUT_COLOR, "##Color",
|
||||
{ImGuiMouseCursor_None, resource::icon::NONE, SHORTCUT_COLOR, ALL, "##Color",
|
||||
"Selects the color to be used for drawing.\n(Spritesheet Editor only.)"},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user