mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 10:21:04 +00:00
Modified status bar text when we are dragging pixels in the editor.
+ Added PixelsMovement::getImageBounds() method.
This commit is contained in:
parent
ec06ad824f
commit
81fcdb53a3
@ -1161,8 +1161,16 @@ bool Editor::msg_proc(JMessage msg)
|
|||||||
jmouse_show();
|
jmouse_show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
editor_update_statusbar_for_standby();
|
// Update status bar for when the user is dragging pixels
|
||||||
|
{
|
||||||
|
// int x, y;
|
||||||
|
// screen_to_editor(msg->mouse.x, msg->mouse.y, &x, &y);
|
||||||
|
Rect bounds = m_pixelsMovement->getImageBounds();
|
||||||
|
app_get_statusbar()->setStatusText
|
||||||
|
(0, "Pos %d %d, Size %d %d [Press Ctrl+D to deselect]",
|
||||||
|
bounds.x, bounds.y, bounds.w, bounds.h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// In tool-loop
|
// In tool-loop
|
||||||
|
@ -162,6 +162,13 @@ public:
|
|||||||
return m_isDragging;
|
return m_isDragging;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rect getImageBounds()
|
||||||
|
{
|
||||||
|
Cel* cel = m_sprite_writer->getExtraCel();
|
||||||
|
Image* image = m_sprite_writer->getExtraCelImage();
|
||||||
|
return Rect(cel->x, cel->y, image->w, image->h);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
@ -211,3 +218,8 @@ bool PixelsMovement::isDragging()
|
|||||||
{
|
{
|
||||||
return m_impl->isDragging();
|
return m_impl->isDragging();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rect PixelsMovement::getImageBounds()
|
||||||
|
{
|
||||||
|
return m_impl->getImageBounds();
|
||||||
|
}
|
||||||
|
@ -43,6 +43,8 @@ public:
|
|||||||
void dropImage();
|
void dropImage();
|
||||||
bool isDragging();
|
bool isDragging();
|
||||||
|
|
||||||
|
Rect getImageBounds();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class PixelsMovementImpl* m_impl;
|
class PixelsMovementImpl* m_impl;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user