mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 07:53:36 +00:00
GRAPHICS: MACGUI: Added support to change inner dimension of macwindow derived object
Added setInnerDimension which calls resize (with bool inner dimension change: true), moveto and finally updateOuterDimension. This was implemented to match window rectangle size as used by window property `rect`, `rect of window` in `workshop` uses this.
This commit is contained in:
parent
23f1229e67
commit
4f07e8dec4
@ -147,6 +147,15 @@ void MacWindow::setDimensions(const Common::Rect &r) {
|
||||
_wm->setFullRefresh(true);
|
||||
}
|
||||
|
||||
void MacWindow::setInnerDimensions(const Common::Rect &r) {
|
||||
resizeInner(r.width(), r.height());
|
||||
_innerDims.moveTo(r.left, r.top);
|
||||
updateOuterDims();
|
||||
|
||||
_contentIsDirty = true;
|
||||
_wm->setFullRefresh(true);
|
||||
}
|
||||
|
||||
void MacWindow::setBackgroundPattern(int pattern) {
|
||||
_pattern = pattern;
|
||||
_hasPattern = true;
|
||||
|
@ -233,6 +233,14 @@ public:
|
||||
*/
|
||||
void setDimensions(const Common::Rect &r) override;
|
||||
|
||||
/**
|
||||
* Change the inner dimension of the window.
|
||||
* Note that this changes the window inner dimension and calculates
|
||||
* outer dimension (ie with border, etc)
|
||||
* @param r The desired dimensions of the window.
|
||||
*/
|
||||
void setInnerDimensions(const Common::Rect &r);
|
||||
|
||||
/**
|
||||
* Set a background pattern for the window.
|
||||
* @param pattern
|
||||
|
Loading…
x
Reference in New Issue
Block a user