101 if (ImGui::IsItemHovered()) {
102 ImGui::BeginTooltip();
103 ImGui::Text(
"Pencil (%s)",
104 static_cast<const char*
>(keys.
Get(
"pencil")));
109 if (ImGui::IsItemHovered()) {
110 ImGui::BeginTooltip();
111 ImGui::Text(
"Eraser (%s)",
112 static_cast<const char*
>(keys.
Get(
"eraser")));
117 if (ImGui::IsItemHovered()) {
118 ImGui::BeginTooltip();
119 ImGui::Text(
"Bucket (%s)",
120 static_cast<const char*
>(keys.
Get(
"bucket")));
125 if (ImGui::IsItemHovered()) {
126 ImGui::BeginTooltip();
127 ImGui::Text(
"Picker (%s)",
128 static_cast<const char*
>(keys.
Get(
"picker")));
133 if (ImGui::IsItemHovered()) {
134 ImGui::BeginTooltip();
135 ImGui::Text(
"Select (%s)",
136 static_cast<const char*
>(keys.
Get(
"select")));
146 keybinds.
Register(
"pencil",
"Pencil tool",
"Switches to pencil tool",
147 {
false,
false,
false, ImGuiKey_1});
148 keybinds.
Register(
"eraser",
"Eraser tool",
"Switches to eraser tool",
149 {
false,
false,
false, ImGuiKey_2});
150 keybinds.
Register(
"bucket",
"Bucket tool",
"Switches to bucket tool",
151 {
false,
false,
false, ImGuiKey_3});
152 keybinds.
Register(
"picker",
"Picker tool",
"Switches to picker tool",
153 {
false,
false,
false, ImGuiKey_4});
154 keybinds.
Register(
"select",
"Select tool",
"Switches to select tool",
155 {
false,
false,
false, ImGuiKey_5});
Logging system, assertion macros, platform utilities, and build/config macros.
ImGui/OpenGL/GLFW integration utilities and file dialog wrapper.
Keyboard input system including key masks, shortcuts, and keybind registry.
Global handles for textures and audio used across FuncDoodle.
Defines pixel color structures and frame/image data containers.
Stores and persists all keybinds used in FuncDoodle (default + user-defined).
Definition Keybinds.h:262
Shortcut Get(const char *id)
Returns the effective shortcut registered for an identifier.
Definition Keybinds.cc:191
void Register(const char *id, const char *friendlyName, const char *desc, Shortcut shortcut)
Registers a default shortcut for an identifier.
Definition Keybinds.cc:200
The FuncDoodle C++ namespace.
Definition Common.h:12
uint32_t s_BucketTexId
Bucket tool icon texture.
Definition LoadedAssets.cc:13
uint32_t s_PencilTexId
Pencil tool icon texture.
Definition LoadedAssets.cc:10
constexpr const char * ToolTypeName(ToolType t)
Returns the user-facing name of a tool type.
Definition Tool.h:56
static void ToolKeybindsRegister(KeybindsRegistry &keybinds)
Definition Tool.h:145
static void Tooltips(ToolType tool, KeybindsRegistry &keys)
Definition Tool.h:98
static void ToolKeybinds(ToolType *tool, KeybindsRegistry &keybinds)
Definition Tool.h:159
uint32_t s_PickerTexId
Color picker tool icon texture.
Definition LoadedAssets.cc:11
uint32_t s_SelectTexId
Selection tool icon texture.
Definition LoadedAssets.cc:14
ToolType
All available tools in the editor.
Definition Tool.h:33
@ Eraser
Definition Tool.h:35
@ Bucket
Definition Tool.h:36
@ Pencil
Definition Tool.h:34
@ Select
Definition Tool.h:38
@ Picker
Definition Tool.h:37
uint32_t s_EraserTexId
Eraser tool icon texture.
Definition LoadedAssets.cc:12
constexpr uint32_t ToolTexID(ToolType tool)
Returns the toolbar texture ID associated with a tool.
Definition Tool.h:76
constexpr std::array< ToolType, 5 > ToolTypes
Ordered list of tools used for iteration and UI rendering.
Definition Tool.h:45
bool IsPressed() const
Returns whether the full shortcut is active.
Definition Keybinds.cc:178