mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Renamed PixelsMovement::m_isCatched (which should be Caught) to m_isDragging.
This commit is contained in:
parent
c5c1f45b96
commit
8e985a3bd8
@ -637,7 +637,7 @@ void Editor::controlInfiniteScroll(JMessage msg)
|
|||||||
|
|
||||||
void Editor::dropPixels()
|
void Editor::dropPixels()
|
||||||
{
|
{
|
||||||
if (m_pixelsMovement->isCatched())
|
if (m_pixelsMovement->isDragging())
|
||||||
m_pixelsMovement->dropImageTemporarily();
|
m_pixelsMovement->dropImageTemporarily();
|
||||||
|
|
||||||
// Drop pixels if the user press a button outside the selection
|
// Drop pixels if the user press a button outside the selection
|
||||||
@ -1114,7 +1114,7 @@ bool Editor::msg_proc(JMessage msg)
|
|||||||
// Moving pixels
|
// Moving pixels
|
||||||
else if (m_state == EDITOR_STATE_MOVING_PIXELS) {
|
else if (m_state == EDITOR_STATE_MOVING_PIXELS) {
|
||||||
// If there is a button pressed
|
// If there is a button pressed
|
||||||
if (m_pixelsMovement->isCatched()) {
|
if (m_pixelsMovement->isDragging()) {
|
||||||
// Infinite scroll
|
// Infinite scroll
|
||||||
controlInfiniteScroll(msg);
|
controlInfiniteScroll(msg);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class PixelsMovementImpl
|
|||||||
int m_initial_x, m_initial_y;
|
int m_initial_x, m_initial_y;
|
||||||
int m_catch_x, m_catch_y;
|
int m_catch_x, m_catch_y;
|
||||||
bool m_firstDrop;
|
bool m_firstDrop;
|
||||||
bool m_isCatched;
|
bool m_isDragging;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PixelsMovementImpl(Sprite* sprite, const Image* moveThis, int initial_x, int initial_y, int opacity)
|
PixelsMovementImpl(Sprite* sprite, const Image* moveThis, int initial_x, int initial_y, int opacity)
|
||||||
@ -44,7 +44,7 @@ public:
|
|||||||
, m_initial_x(initial_x)
|
, m_initial_x(initial_x)
|
||||||
, m_initial_y(initial_y)
|
, m_initial_y(initial_y)
|
||||||
, m_firstDrop(true)
|
, m_firstDrop(true)
|
||||||
, m_isCatched(false)
|
, m_isDragging(false)
|
||||||
{
|
{
|
||||||
m_sprite_writer->prepareExtraCel(initial_x, initial_y, moveThis->w, moveThis->h, opacity);
|
m_sprite_writer->prepareExtraCel(initial_x, initial_y, moveThis->w, moveThis->h, opacity);
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ public:
|
|||||||
{
|
{
|
||||||
m_catch_x = x;
|
m_catch_x = x;
|
||||||
m_catch_y = y;
|
m_catch_y = y;
|
||||||
m_isCatched = true;
|
m_isDragging = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void catchImageAgain(int x, int y)
|
void catchImageAgain(int x, int y)
|
||||||
@ -81,7 +81,7 @@ public:
|
|||||||
Cel* cel = m_sprite_writer->getExtraCel();
|
Cel* cel = m_sprite_writer->getExtraCel();
|
||||||
m_initial_x = cel->x;
|
m_initial_x = cel->x;
|
||||||
m_initial_y = cel->y;
|
m_initial_y = cel->y;
|
||||||
m_isCatched = true;
|
m_isDragging = true;
|
||||||
|
|
||||||
m_catch_x = x;
|
m_catch_x = x;
|
||||||
m_catch_y = y;
|
m_catch_y = y;
|
||||||
@ -128,7 +128,7 @@ public:
|
|||||||
|
|
||||||
void dropImageTemporarily()
|
void dropImageTemporarily()
|
||||||
{
|
{
|
||||||
m_isCatched = false;
|
m_isDragging = false;
|
||||||
|
|
||||||
Cel* cel = m_sprite_writer->getExtraCel();
|
Cel* cel = m_sprite_writer->getExtraCel();
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ public:
|
|||||||
|
|
||||||
void dropImage()
|
void dropImage()
|
||||||
{
|
{
|
||||||
m_isCatched = false;
|
m_isDragging = false;
|
||||||
|
|
||||||
Cel* cel = m_sprite_writer->getExtraCel();
|
Cel* cel = m_sprite_writer->getExtraCel();
|
||||||
Image* image = m_sprite_writer->getExtraCelImage();
|
Image* image = m_sprite_writer->getExtraCelImage();
|
||||||
@ -157,9 +157,9 @@ public:
|
|||||||
m_undoable.commit();
|
m_undoable.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isCatched()
|
bool isDragging()
|
||||||
{
|
{
|
||||||
return m_isCatched;
|
return m_isDragging;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -207,7 +207,7 @@ void PixelsMovement::dropImage()
|
|||||||
m_impl->dropImage();
|
m_impl->dropImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PixelsMovement::isCatched()
|
bool PixelsMovement::isDragging()
|
||||||
{
|
{
|
||||||
return m_impl->isCatched();
|
return m_impl->isDragging();
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
Rect moveImage(int x, int y);
|
Rect moveImage(int x, int y);
|
||||||
void dropImageTemporarily();
|
void dropImageTemporarily();
|
||||||
void dropImage();
|
void dropImage();
|
||||||
bool isCatched();
|
bool isDragging();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class PixelsMovementImpl* m_impl;
|
class PixelsMovementImpl* m_impl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user