mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-26 19:09:18 +01:00
Fix resizing PaintCanvas.
This commit is contained in:
parent
81e959089e
commit
fed839a235
@ -533,6 +533,9 @@ void PaintCanvas::resize(int width, int height) {
|
|||||||
height = 1;
|
height = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_canvas_width = width;
|
||||||
|
_canvas_height = height;
|
||||||
|
|
||||||
Size2 s;
|
Size2 s;
|
||||||
s.x = _canvas_height * _pixel_size;
|
s.x = _canvas_height * _pixel_size;
|
||||||
s.y = _canvas_width * _pixel_size;
|
s.y = _canvas_width * _pixel_size;
|
||||||
|
@ -102,7 +102,7 @@ void PaintVisualGrid::_notification(int p_what) {
|
|||||||
PaintVisualGrid::PaintVisualGrid() {
|
PaintVisualGrid::PaintVisualGrid() {
|
||||||
color = Color(1, 1, 1, 0.42);
|
color = Color(1, 1, 1, 0.42);
|
||||||
size = 16;
|
size = 16;
|
||||||
zoom = 0;
|
//zoom = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PaintVisualGrid::~PaintVisualGrid() {
|
PaintVisualGrid::~PaintVisualGrid() {
|
||||||
|
@ -40,8 +40,8 @@ public:
|
|||||||
|
|
||||||
Color color;
|
Color color;
|
||||||
int size;
|
int size;
|
||||||
float zoom;
|
//float zoom;
|
||||||
Vector2 offset;
|
//Vector2 offset;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
|
Loading…
Reference in New Issue
Block a user