mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-29 18:20:44 +00:00
Add reset buttons + tooltips to timeline range options (#4024)
This commit is contained in:
parent
ce6494d5f2
commit
e2d8ffab54
@ -1654,14 +1654,30 @@ rewind_on_stop_tooltip = <<<END
|
||||
The 'Stop' button should rewind the animation
|
||||
where it was started.
|
||||
END
|
||||
timeline_selection = Timeline Range Selection
|
||||
keep_timeline_selection = Keep selection
|
||||
keep_timeline_selection_tooltip = <<<END
|
||||
Keep the selected range of layers/frames/cels
|
||||
when we edit the canvas.
|
||||
when we edit the canvas / the timeline loses
|
||||
the focus.
|
||||
END
|
||||
select_on_click = Select on Click
|
||||
select_on_click_tooltip = <<<END
|
||||
Enable the selected range of layers/frames/cels
|
||||
when we press the mouse button.
|
||||
END
|
||||
select_on_click_with_key = Select on Click + Shift
|
||||
select_on_click_with_key_tooltip = <<<END
|
||||
Enable the selected range of layers/frames/cels
|
||||
when we press the mouse button with the Shift key.
|
||||
END
|
||||
select_on_drag = Select on Drag
|
||||
select_on_drag_tooltip = <<<END
|
||||
Enable the selected range of layers/frames/cels
|
||||
when we press the mouse button and after we move
|
||||
the mouse to another position.
|
||||
END
|
||||
reset_as_v12 = Reset as Aseprite v1.2
|
||||
default_first_frame = Default First Frame:
|
||||
ui_mouse_cursor = UI Mouse Cursor
|
||||
native_cursor = Use native mouse cursors
|
||||
|
@ -274,15 +274,32 @@
|
||||
pref="general.autoshow_timeline" />
|
||||
<check text="@.rewind_on_stop" id="rewind_on_stop" tooltip="@.rewind_on_stop_tooltip"
|
||||
pref="general.rewind_on_stop" />
|
||||
<check text="@.keep_timeline_selection" id="keep_selection" tooltip="@.keep_timeline_selection_tooltip"
|
||||
pref="timeline.keep_selection" />
|
||||
<check text="@.select_on_click" pref="timeline.select_on_click" />
|
||||
<check text="@.select_on_click_with_key" pref="timeline.select_on_click_with_key" />
|
||||
<check text="@.select_on_drag" pref="timeline.select_on_drag" />
|
||||
<hbox>
|
||||
<label text="@.default_first_frame" />
|
||||
<expr id="first_frame" />
|
||||
</hbox>
|
||||
<separator text="@.timeline_selection" horizontal="true" />
|
||||
<check id="keep_selection"
|
||||
text="@.keep_timeline_selection"
|
||||
tooltip="@.keep_timeline_selection_tooltip"
|
||||
pref="timeline.keep_selection" />
|
||||
<check id="select_on_click"
|
||||
text="@.select_on_click"
|
||||
tooltip="@.select_on_click_tooltip"
|
||||
pref="timeline.select_on_click" />
|
||||
<check id="select_on_click_with_key"
|
||||
text="@.select_on_click_with_key"
|
||||
tooltip="@.select_on_click_with_key_tooltip"
|
||||
pref="timeline.select_on_click_with_key" />
|
||||
<check id="select_on_drag"
|
||||
text="@.select_on_drag"
|
||||
tooltip="@.select_on_drag_tooltip"
|
||||
pref="timeline.select_on_drag" />
|
||||
<hbox>
|
||||
<hbox expansive="true" />
|
||||
<button id="reset_timeline_sel" text="@general.reset" width="60" />
|
||||
<button id="reset_timeline_sel_as_v12" text="@.reset_as_v12" />
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<!-- Cursors -->
|
||||
|
@ -331,9 +331,12 @@ public:
|
||||
// Slices default color
|
||||
defaultSliceColor()->setColor(m_pref.slices.defaultColor());
|
||||
|
||||
// Others
|
||||
// Timeline
|
||||
firstFrame()->setTextf("%d", m_globPref.timeline.firstFrame());
|
||||
resetTimelineSel()->Click.connect([this]{ onResetTimelineSel(); });
|
||||
resetTimelineSelAsV12()->Click.connect([this]{ onResetTimelineSelV12(); });
|
||||
|
||||
// Others
|
||||
if (m_pref.general.expandMenubarOnMouseover())
|
||||
expandMenubarOnMouseover()->setSelected(true);
|
||||
|
||||
@ -1698,6 +1701,20 @@ private:
|
||||
layout();
|
||||
}
|
||||
|
||||
void onResetTimelineSel() {
|
||||
keepSelection()->setSelected(false);
|
||||
selectOnClick()->setSelected(false);
|
||||
selectOnClickWithKey()->setSelected(true);
|
||||
selectOnDrag()->setSelected(true);
|
||||
}
|
||||
|
||||
void onResetTimelineSelV12() {
|
||||
keepSelection()->setSelected(false);
|
||||
selectOnClick()->setSelected(true);
|
||||
selectOnClickWithKey()->setSelected(true);
|
||||
selectOnDrag()->setSelected(true);
|
||||
}
|
||||
|
||||
gfx::Rect gridBounds() const {
|
||||
return gfx::Rect(gridX()->textInt(), gridY()->textInt(),
|
||||
gridW()->textInt(), gridH()->textInt());
|
||||
|
Loading…
Reference in New Issue
Block a user