mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-05 00:39:50 +00:00
Stop animation with right-click
This commit is contained in:
parent
b8a319ed6b
commit
82bcc090c0
@ -18,6 +18,7 @@
|
|||||||
#include "app/ui/editor/editor.h"
|
#include "app/ui/editor/editor.h"
|
||||||
#include "app/ui/editor/scrolling_state.h"
|
#include "app/ui/editor/scrolling_state.h"
|
||||||
#include "app/ui_context.h"
|
#include "app/ui_context.h"
|
||||||
|
#include "ui/message.h"
|
||||||
#include "ui/system.h"
|
#include "ui/system.h"
|
||||||
|
|
||||||
namespace app {
|
namespace app {
|
||||||
@ -65,6 +66,12 @@ bool PlayState::onMouseDown(Editor* editor, MouseMessage* msg)
|
|||||||
UIContext* context = UIContext::instance();
|
UIContext* context = UIContext::instance();
|
||||||
context->setActiveView(editor->getDocumentView());
|
context->setActiveView(editor->getDocumentView());
|
||||||
|
|
||||||
|
// A click with right-button stops the animation
|
||||||
|
if (msg->buttons() == kButtonRight) {
|
||||||
|
editor->stop();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Start scroll loop
|
// Start scroll loop
|
||||||
EditorStatePtr newState(new ScrollingState());
|
EditorStatePtr newState(new ScrollingState());
|
||||||
editor->setState(newState);
|
editor->setState(newState);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user