Draw localized checkboxes and radio buttons with their tooltips in one call

This commit is contained in:
shweet committed 2026-11-22 19:08:30 -05:00
1 parent f39ea8cdfc
commit bbfdafb006
15 files changed
+79 -109

No files matched your search

+6 -12
View File
@@ -342,8 +342,7 @@ void AnimationPreview::update(Manager& manager, Settings& settings, Resources& r
}
ImGui::EndDisabled();
ImGui::SameLine();
ImGui::Checkbox(localize.get(LABEL_AXES), &isAxes);
tooltip_set(TOOLTIP_AXES);
checkbox_draw(LABEL_AXES, isAxes, TOOLTIP_AXES);
ImGui::SameLine();
ImGui::ColorEdit4(localize.get(BASIC_COLOR), values_get(axesColor), ImGuiColorEditFlags_NoInputs);
tooltip_set(TOOLTIP_AXES_COLOR);
@@ -400,12 +399,9 @@ void AnimationPreview::update(Manager& manager, Settings& settings, Resources& r
if (ImGui::BeginChild("##Helpers Child 1", helpersChildSize))
{
ImGui::Checkbox(localize.get(LABEL_ROOT_TRANSFORM), &isRootTransform);
tooltip_set(TOOLTIP_ROOT_TRANSFORM);
ImGui::Checkbox(localize.get(LABEL_PIVOTS), &isPivots);
tooltip_set(TOOLTIP_PIVOTS);
ImGui::Checkbox(localize.get(LABEL_TRANSPARENT), &isTransparent);
tooltip_set(TOOLTIP_PREVIEW_TRANSPARENT);
checkbox_draw(LABEL_ROOT_TRANSFORM, isRootTransform, TOOLTIP_ROOT_TRANSFORM);
checkbox_draw(LABEL_PIVOTS, isPivots, TOOLTIP_PIVOTS);
checkbox_draw(LABEL_TRANSPARENT, isTransparent, TOOLTIP_PREVIEW_TRANSPARENT);
}
ImGui::EndChild();
@@ -413,10 +409,8 @@ void AnimationPreview::update(Manager& manager, Settings& settings, Resources& r
if (ImGui::BeginChild("##Helpers Child 2", helpersChildSize))
{
ImGui::Checkbox(localize.get(LABEL_ALT_ICONS), &isAltIcons);
tooltip_set(TOOLTIP_ALT_ICONS);
ImGui::Checkbox(localize.get(LABEL_BORDER), &isBorder);
tooltip_set(TOOLTIP_BORDER);
checkbox_draw(LABEL_ALT_ICONS, isAltIcons, TOOLTIP_ALT_ICONS);
checkbox_draw(LABEL_BORDER, isBorder, TOOLTIP_BORDER);
}
ImGui::EndChild();
}
+1 -2
View File
@@ -155,8 +155,7 @@ void CanvasView::grid_child_draw(ImVec2 childSize, bool& isGrid, Vec4& gridColor
{
if (ImGui::BeginChild("##Grid Child", childSize, true, ImGuiWindowFlags_HorizontalScrollbar))
{
ImGui::Checkbox(localize.get(BASIC_GRID), &isGrid);
tooltip_set(TOOLTIP_GRID_VISIBILITY);
checkbox_draw(BASIC_GRID, isGrid, TOOLTIP_GRID_VISIBILITY);
if (isGridSnap)
{
ImGui::SameLine();
+9 -16
View File
@@ -28,11 +28,9 @@ void Configure::update(Manager& manager, Settings& settings)
input_float_range(localize.get(LABEL_UI_SCALE), temporary.uiScale, UI_SCALE_MIN, UI_SCALE_MAX,
UI_SCALE_STEP, UI_SCALE_STEP, "%.0f%%");
tooltip_set(TOOLTIP_UI_SCALE);
ImGui::Checkbox(localize.get(LABEL_VSYNC), &temporary.isVsync);
tooltip_set(TOOLTIP_VSYNC);
checkbox_draw(LABEL_VSYNC, temporary.isVsync, TOOLTIP_VSYNC);
ImGui::SameLine();
ImGui::Checkbox(localize.get(LABEL_DETACHABLE_WINDOWS), &temporary.isDetachableWindows);
tooltip_set(TOOLTIP_DETACHABLE_WINDOWS);
checkbox_draw(LABEL_DETACHABLE_WINDOWS, temporary.isDetachableWindows, TOOLTIP_DETACHABLE_WINDOWS);
ImGui::SeparatorText(localize.get(LABEL_PLAYBACK_MENU));
ImGui::RadioButton("30 Hz", &temporary.playbackTickRate, 30);
@@ -64,13 +62,11 @@ void Configure::update(Manager& manager, Settings& settings)
{
ImGui::SeparatorText(localize.get(LABEL_AUTOSAVE));
ImGui::Checkbox(localize.get(BASIC_ENABLED), &temporary.fileIsAutosave);
tooltip_set(TOOLTIP_AUTOSAVE_ENABLED);
checkbox_draw(BASIC_ENABLED, temporary.fileIsAutosave, TOOLTIP_AUTOSAVE_ENABLED);
ImGui::SeparatorText(localize.get(LABEL_AUTO_RESOURCE_RELOAD));
ImGui::PushID(LABEL_AUTO_RESOURCE_RELOAD);
ImGui::Checkbox(localize.get(BASIC_ENABLED), &temporary.fileIsAutoReloadResources);
tooltip_set(TOOLTIP_AUTO_RESOURCE_RELOAD);
checkbox_draw(BASIC_ENABLED, temporary.fileIsAutoReloadResources, TOOLTIP_AUTO_RESOURCE_RELOAD);
ImGui::PopID();
ImGui::SeparatorText(localize.get(LABEL_SNAPSHOTS));
@@ -78,15 +74,13 @@ void Configure::update(Manager& manager, Settings& settings)
tooltip_set(TOOLTIP_STACK_SIZE);
ImGui::SeparatorText(localize.get(LABEL_OPTIONS));
ImGui::Checkbox(localize.get(LABEL_OVERWRITE_WARNING), &temporary.fileIsWarnOverwrite);
tooltip_set(TOOLTIP_OVERWRITE_WARNING);
checkbox_draw(LABEL_OVERWRITE_WARNING, temporary.fileIsWarnOverwrite, TOOLTIP_OVERWRITE_WARNING);
ImGui::SameLine();
ImGui::Checkbox(localize.get(LABEL_ISAAC_COMPATIBILITY_WARNING), &temporary.fileIsWarnIsaac);
tooltip_set(TOOLTIP_ISAAC_COMPATIBILITY_WARNING);
checkbox_draw(LABEL_ISAAC_COMPATIBILITY_WARNING, temporary.fileIsWarnIsaac,
TOOLTIP_ISAAC_COMPATIBILITY_WARNING);
ImGui::SeparatorText(localize.get(LABEL_SERIALIZATION));
ImGui::Checkbox(localize.get(LABEL_SAVE_AS_JSON), &temporary.fileIsJson);
tooltip_set(TOOLTIP_SAVE_AS_JSON);
checkbox_draw(LABEL_SAVE_AS_JSON, temporary.fileIsJson, TOOLTIP_SAVE_AS_JSON);
}
ImGui::EndChild();
@@ -109,8 +103,7 @@ void Configure::update(Manager& manager, Settings& settings)
ImGui::SeparatorText(localize.get(LABEL_TOOL));
ImGui::Checkbox(localize.get(LABEL_MOVE_TOOL_SNAP), &temporary.inputIsMoveToolSnapToMouse);
tooltip_set(TOOLTIP_MOVE_TOOL_SNAP);
checkbox_draw(LABEL_MOVE_TOOL_SNAP, temporary.inputIsMoveToolSnapToMouse, TOOLTIP_MOVE_TOOL_SNAP);
}
ImGui::EndChild();
+1 -2
View File
@@ -51,8 +51,7 @@ void GenerateAnimationFromGrid::update(Manager& manager, Document& document, Res
ImGui::InputInt(localize.get(BASIC_DURATION), &delay, STEP, STEP_FAST);
ImGui::Separator();
ImGui::Checkbox(localize.get(LABEL_GENERATE_MAKE_REGIONS), &isMakeRegions);
tooltip_set(TOOLTIP_GENERATE_MAKE_REGIONS);
checkbox_draw(LABEL_GENERATE_MAKE_REGIONS, isMakeRegions, TOOLTIP_GENERATE_MAKE_REGIONS);
ImGui::BeginDisabled(!isMakeRegions);
input_text_string(localize.get(LABEL_FORMAT), &regionNameFormat);
tooltip_set(TOOLTIP_GENERATE_REGION_NAME_FORMAT);
+18
View File
@@ -1,4 +1,5 @@
#include "ui/input.h"
#include "ui/layout.h"
#include <algorithm>
#include <climits>
@@ -167,3 +168,20 @@ bool input_float_range(const char* label, float& value, float min, float max, fl
value = vec_clamp(value, min, max);
return isActivated;
}
// A localized checkbox or radio button, with its tooltip.
bool checkbox_draw(StringType label, bool& value, StringType tooltip)
{
auto isChanged = ImGui::Checkbox(localize.get(label), &value);
if (tooltip != STRING_UNDEFINED)
tooltip_set(tooltip);
return isChanged;
}
bool radio_draw(StringType label, int& value, int buttonValue, StringType tooltip)
{
auto isChanged = ImGui::RadioButton(localize.get(label), &value, buttonValue);
if (tooltip != STRING_UNDEFINED)
tooltip_set(tooltip);
return isChanged;
}
+3
View File
@@ -4,6 +4,7 @@
#include <string>
#include <vector>
#include "localization.h"
#include "vec.h"
#include <imgui/imgui.h>
@@ -26,6 +27,8 @@ EditState drag_float_persistent(const char*, float*, float = DRAG_SPEED, float =
EditState drag_float2_persistent(const char*, Vec2*, float = DRAG_SPEED, float = {}, float = {}, const char* = "%.3f",
ImGuiSliderFlags = 0);
EditState color_edit4_persistent(const char*, Vec4*, ImGuiColorEditFlags = 0);
bool checkbox_draw(StringType, bool&, StringType = STRING_UNDEFINED);
bool radio_draw(StringType, int&, int, StringType = STRING_UNDEFINED);
bool radio_button_icon(const char*, int*, int, ImTextureID, ImVec2, ImVec4 = ImVec4(1.0f, 1.0f, 1.0f, 1.0f));
bool combo_id_mapped(const std::string&, int*, const std::vector<int>&, const std::vector<std::string>&);
bool combo_string_mapped(const std::string&, std::string*, const std::vector<std::string>&,
+13 -31
View File
@@ -55,42 +55,27 @@ bool ItemProperties::update(Manager& manager, Settings& settings, Document& docu
ImGui::SeparatorText(localize.get(LABEL_TYPE));
spaced_pair(
[&]() {
ImGui::RadioButton(localize.get(LABEL_LAYER), &type, LAYER);
tooltip_set(TOOLTIP_LAYER_TYPE);
},
[&]() {
ImGui::RadioButton(localize.get(LABEL_NULL), &type, NULL_);
tooltip_set(TOOLTIP_NULL_TYPE);
});
spaced_pair([&]() { radio_draw(LABEL_LAYER, type, LAYER, TOOLTIP_LAYER_TYPE); },
[&]() { radio_draw(LABEL_NULL, type, NULL_, TOOLTIP_NULL_TYPE); });
ImGui::SeparatorText(localize.get(LABEL_SOURCE));
auto isUnusedItems = animation && !unused_items_get(type).empty();
spaced_pair(
[&]() {
ImGui::RadioButton(localize.get(LABEL_NEW), &source, SOURCE_NEW);
tooltip_set(TOOLTIP_NEW_ITEM);
},
[&]() {
ImGui::BeginDisabled(!isUnusedItems);
ImGui::RadioButton(localize.get(LABEL_EXISTING), &source, SOURCE_EXISTING);
ImGui::EndDisabled();
ImGui::SetItemTooltip("%s", isUnusedItems ? localize.get(TOOLTIP_USE_EXISTING_ITEM)
: localize.get(TOOLTIP_NO_UNUSED_ITEMS));
});
spaced_pair([&]() { radio_draw(LABEL_NEW, source, SOURCE_NEW, TOOLTIP_NEW_ITEM); },
[&]() {
ImGui::BeginDisabled(!isUnusedItems);
ImGui::RadioButton(localize.get(LABEL_EXISTING), &source, SOURCE_EXISTING);
ImGui::EndDisabled();
ImGui::SetItemTooltip("%s", isUnusedItems ? localize.get(TOOLTIP_USE_EXISTING_ITEM)
: localize.get(TOOLTIP_NO_UNUSED_ITEMS));
});
ImGui::SeparatorText(localize.get(LABEL_DESTINATION));
spaced_pair(
[&]() { radio_draw(LABEL_ALL_ANIMATIONS, destination, DESTINATION_ALL, TOOLTIP_ITEM_ALL_ANIMATIONS); },
[&]() {
ImGui::RadioButton(localize.get(LABEL_ALL_ANIMATIONS), &destination, DESTINATION_ALL);
tooltip_set(TOOLTIP_ITEM_ALL_ANIMATIONS);
},
[&]() {
ImGui::RadioButton(localize.get(LABEL_THIS_ANIMATION), &destination, DESTINATION_THIS);
tooltip_set(TOOLTIP_ITEM_THIS_ANIMATION);
radio_draw(LABEL_THIS_ANIMATION, destination, DESTINATION_THIS, TOOLTIP_ITEM_THIS_ANIMATION);
});
if (source == SOURCE_NEW)
@@ -102,10 +87,7 @@ bool ItemProperties::update(Manager& manager, Settings& settings, Document& docu
if (type == LAYER)
layer_source_draw(document, edit);
else if (type == NULL_)
{
ImGui::Checkbox(localize.get(LABEL_RECT), &edit.isShowRect);
tooltip_set(TOOLTIP_NULL_RECT);
}
checkbox_draw(LABEL_RECT, edit.isShowRect, TOOLTIP_NULL_RECT);
}
else if (animation)
{
+1 -2
View File
@@ -234,8 +234,7 @@ void nulls_update(Panel& panel)
item_properties_update<Null>(panel, 1, NULL_PROPERTIES_ROWS, SelectionKind::NULLS, TOOLTIP_NULL_NAME, EDIT_ADD_NULL,
EDIT_SET_NULL_PROPERTIES, nulls_get, [](Manager::ItemEdit& null) {
ImGui::Checkbox(localize.get(LABEL_RECT), &null.isShowRect);
tooltip_set(TOOLTIP_NULL_RECT);
checkbox_draw(LABEL_RECT, null.isShowRect, TOOLTIP_NULL_RECT);
});
}
+4 -8
View File
@@ -36,18 +36,14 @@ void onionskin_update(Manager& manager, Settings& settings)
configure_widgets(localize.get(BASIC_BEFORE), beforeCount, beforeColor);
configure_widgets(localize.get(BASIC_AFTER), afterCount, afterColor);
ImGui::SeparatorText(localize.get(BASIC_MODE));
ImGui::RadioButton(localize.get(BASIC_TIME), &mode, (int)OnionskinMode::TIME);
tooltip_set(TOOLTIP_ONIONSKIN_TIME);
radio_draw(BASIC_TIME, mode, (int)OnionskinMode::TIME, TOOLTIP_ONIONSKIN_TIME);
ImGui::SameLine();
ImGui::RadioButton(localize.get(BASIC_INDEX), &mode, (int)OnionskinMode::INDEX);
tooltip_set(TOOLTIP_ONIONSKIN_INDEX);
radio_draw(BASIC_INDEX, mode, (int)OnionskinMode::INDEX, TOOLTIP_ONIONSKIN_INDEX);
ImGui::SeparatorText(localize.get(LABEL_OPTIONS));
ImGui::Checkbox(localize.get(LABEL_PIVOT_PATH), &settings.onionskinIsPivotPath);
tooltip_set(TOOLTIP_PIVOT_PATH);
checkbox_draw(LABEL_PIVOT_PATH, settings.onionskinIsPivotPath, TOOLTIP_PIVOT_PATH);
ImGui::SameLine();
ImGui::Checkbox(localize.get(LABEL_ONLY_SELECTED_ITEM), &settings.onionskinIsOnlySelected);
tooltip_set(TOOLTIP_ONLY_SELECTED_ITEM);
checkbox_draw(LABEL_ONLY_SELECTED_ITEM, settings.onionskinIsOnlySelected, TOOLTIP_ONLY_SELECTED_ITEM);
}
ImGui::End();
+4 -4
View File
@@ -357,10 +357,10 @@ static void region_export_popup_update(Panel& panel, RegionsPanel& regions)
ImGui::SameLine();
input_text_path(localize.get(LABEL_OUTPUT_PATH), &settings.exportRegionPath);
tooltip_set(TOOLTIP_OUTPUT_PATH);
ImGui::Checkbox(localize.get(LABEL_EXPORT_MAKE_SPRITESHEET), &settings.isExportRegionMakeSpritesheet);
tooltip_set(TOOLTIP_EXPORT_MAKE_SPRITESHEET);
ImGui::Checkbox(localize.get(LABEL_EXPORT_REMOVE_CURRENT_REGION), &settings.isExportRegionRemoveCurrent);
tooltip_set(TOOLTIP_EXPORT_REMOVE_CURRENT_REGION);
checkbox_draw(LABEL_EXPORT_MAKE_SPRITESHEET, settings.isExportRegionMakeSpritesheet,
TOOLTIP_EXPORT_MAKE_SPRITESHEET);
checkbox_draw(LABEL_EXPORT_REMOVE_CURRENT_REGION, settings.isExportRegionRemoveCurrent,
TOOLTIP_EXPORT_REMOVE_CURRENT_REGION);
}
ImGui::EndChild();
+4 -8
View File
@@ -160,8 +160,7 @@ void RenderAnimation::update(Manager& manager, Document& document, Resources& re
ImGui::Separator();
ImGui::Checkbox(localize.get(LABEL_CUSTOM_RANGE), &isRange);
tooltip_set(TOOLTIP_CUSTOM_RANGE);
checkbox_draw(LABEL_CUSTOM_RANGE, isRange, TOOLTIP_CUSTOM_RANGE);
ImGui::SameLine();
@@ -197,13 +196,11 @@ void RenderAnimation::update(Manager& manager, Document& document, Resources& re
ImGui::Separator();
ImGui::Checkbox(localize.get(LABEL_USE_ANIMATION_BOUNDS), &isUseAnimationBounds);
tooltip_set(TOOLTIP_USE_ANIMATION_BOUNDS);
checkbox_draw(LABEL_USE_ANIMATION_BOUNDS, isUseAnimationBounds, TOOLTIP_USE_ANIMATION_BOUNDS);
ImGui::SameLine();
ImGui::Checkbox(localize.get(LABEL_USE_ISOLATED_ANIMATION), &isUseIsolatedAnimation);
tooltip_set(TOOLTIP_USE_ISOLATED_ANIMATION);
checkbox_draw(LABEL_USE_ISOLATED_ANIMATION, isUseIsolatedAnimation, TOOLTIP_USE_ISOLATED_ANIMATION);
ImGui::BeginDisabled(!isUseAnimationBounds);
{
@@ -230,8 +227,7 @@ void RenderAnimation::update(Manager& manager, Document& document, Resources& re
ImGui::Separator();
ImGui::Checkbox(localize.get(LABEL_SOUND), &settings.timelineIsSound);
tooltip_set(TOOLTIP_SOUND);
checkbox_draw(LABEL_SOUND, settings.timelineIsSound, TOOLTIP_SOUND);
ImGui::Separator();
+2 -6
View File
@@ -102,18 +102,14 @@ void SpritesheetEditor::update(Manager& manager, Settings& settings, Resources&
}
ImGui::EndDisabled();
ImGui::Checkbox(localize.get(LABEL_BORDER), &isBorder);
tooltip_set(TOOLTIP_SPRITESHEET_BORDER);
checkbox_draw(LABEL_BORDER, isBorder, TOOLTIP_SPRITESHEET_BORDER);
}
ImGui::EndChild();
ImGui::SameLine();
if (ImGui::BeginChild("##Background Child 2", subChildSize))
{
ImGui::Checkbox(localize.get(LABEL_TRANSPARENT), &isTransparent);
tooltip_set(TOOLTIP_TRANSPARENT);
}
checkbox_draw(LABEL_TRANSPARENT, isTransparent, TOOLTIP_TRANSPARENT);
ImGui::EndChild();
}
+2 -2
View File
@@ -134,8 +134,8 @@ static void spritesheets_merge_popup_update(Panel& panel, SpritesheetsPanel& spr
tooltip_set(TOOLTIP_MERGE_SPRITESHEETS_TOP_RIGHT);
ImGui::SeparatorText(localize.get(LABEL_OPTIONS));
ImGui::Checkbox(localize.get(LABEL_MERGE_MAKE_SPRITESHEET_REGIONS), &settings.mergeSpritesheetsIsMakeRegions);
tooltip_set(TOOLTIP_MERGE_MAKE_SPRITESHEET_REGIONS);
checkbox_draw(LABEL_MERGE_MAKE_SPRITESHEET_REGIONS, settings.mergeSpritesheetsIsMakeRegions,
TOOLTIP_MERGE_MAKE_SPRITESHEET_REGIONS);
ImGui::BeginDisabled(!settings.mergeSpritesheetsIsMakeRegions);
ImGui::Checkbox(localize.get(LABEL_MERGE_MAKE_PRIMARY_SPRITESHEET_REGION),
+9 -14
View File
@@ -1,4 +1,5 @@
#include "ui/timeline_context.h"
#include "ui/input.h"
#include "ui/layout.h"
Timeline::Timeline() = default;
@@ -95,11 +96,9 @@ void TimelineContext::popups_update()
frame ? frame->duration : FRAME_DURATION_MIN);
tooltip_set(TOOLTIP_INTERVAL);
ImGui::Checkbox(localize.get(LABEL_ROUND_ROTATION), &isRoundRotation);
tooltip_set(TOOLTIP_ROUND_ROTATION);
checkbox_draw(LABEL_ROUND_ROTATION, isRoundRotation, TOOLTIP_ROUND_ROTATION);
ImGui::Checkbox(localize.get(LABEL_ROUND_SCALE), &isRoundScale);
tooltip_set(TOOLTIP_ROUND_SCALE);
checkbox_draw(LABEL_ROUND_SCALE, isRoundScale, TOOLTIP_ROUND_SCALE);
auto result = popup_buttons_draw(manager, {.confirm = LABEL_BAKE,
.confirmTooltip = TOOLTIP_BAKE_FRAMES_OPTIONS,
@@ -123,8 +122,7 @@ void TimelineContext::popups_update()
(int)BakeIntoOtherFramesTarget::CURRENT_SELECTION);
tooltip_set(TOOLTIP_BAKE_INTO_OTHER_FRAMES_CURRENT_SELECTION);
ImGui::SameLine();
ImGui::RadioButton(localize.get(LABEL_ALL), &target, (int)BakeIntoOtherFramesTarget::ALL);
tooltip_set(TOOLTIP_BAKE_INTO_OTHER_FRAMES_ALL);
radio_draw(LABEL_ALL, target, (int)BakeIntoOtherFramesTarget::ALL, TOOLTIP_BAKE_INTO_OTHER_FRAMES_ALL);
bakeIntoOtherFramesTarget = (BakeIntoOtherFramesTarget)target;
auto isCurrentSelection = bakeIntoOtherFramesTarget == BakeIntoOtherFramesTarget::CURRENT_SELECTION;
@@ -134,17 +132,14 @@ void TimelineContext::popups_update()
ImGui::Checkbox(localize.get(LABEL_NULLS), &isBakeIntoOtherFramesNulls);
ImGui::EndDisabled();
ImGui::Checkbox(localize.get(LABEL_ROUND_ROTATION), &isRoundRotation);
tooltip_set(TOOLTIP_ROUND_ROTATION);
checkbox_draw(LABEL_ROUND_ROTATION, isRoundRotation, TOOLTIP_ROUND_ROTATION);
ImGui::Checkbox(localize.get(LABEL_ROUND_SCALE), &isRoundScale);
tooltip_set(TOOLTIP_ROUND_SCALE);
checkbox_draw(LABEL_ROUND_SCALE, isRoundScale, TOOLTIP_ROUND_SCALE);
ImGui::Checkbox(localize.get(LABEL_BAKE_MATCH_ROOT_INTERPOLATION), &isMatchRootInterpolation);
tooltip_set(TOOLTIP_BAKE_MATCH_ROOT_INTERPOLATION);
checkbox_draw(LABEL_BAKE_MATCH_ROOT_INTERPOLATION, isMatchRootInterpolation,
TOOLTIP_BAKE_MATCH_ROOT_INTERPOLATION);
ImGui::Checkbox(localize.get(LABEL_BAKE_USE_ROOT_PIVOT), &isUseRootPivot);
tooltip_set(TOOLTIP_BAKE_USE_ROOT_PIVOT);
checkbox_draw(LABEL_BAKE_USE_ROOT_PIVOT, isUseRootPivot, TOOLTIP_BAKE_USE_ROOT_PIVOT);
auto result = popup_buttons_draw(manager, {.confirm = LABEL_BAKE,
.cancelTooltip = TOOLTIP_CANCEL_BAKE_FRAMES,
+2 -2
View File
@@ -1,4 +1,5 @@
#include "ui/timeline_context.h"
#include "ui/input.h"
#include "ui/layout.h"
// Moves the dragged frames to `target`'s track, before its frame index.
@@ -941,8 +942,7 @@ void TimelineContext::frames_child()
ImGui::SameLine();
ImGui::SetNextItemWidth(widgetSize.x);
ImGui::Checkbox(localize.get(LABEL_SOUND), &settings.timelineIsSound);
tooltip_set(TOOLTIP_SOUND);
checkbox_draw(LABEL_SOUND, settings.timelineIsSound, TOOLTIP_SOUND);
ImGui::PopStyleVar();
}