mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-13 15:40:57 +00:00
DIRECTOR: LINGO: Implement the rect of the stage
The rect of stage returns the values of the stage rect.
This commit is contained in:
parent
db006fac21
commit
c342819a60
@ -480,6 +480,7 @@ bool Window::hasField(int field) {
|
||||
case kTheDrawRect:
|
||||
case kTheFileName:
|
||||
case kTheModal:
|
||||
case kTheRect:
|
||||
case kTheSourceRect:
|
||||
case kTheTitle:
|
||||
case kTheTitleVisible:
|
||||
@ -502,6 +503,9 @@ Datum Window::getField(int field) {
|
||||
return isVisible();
|
||||
case kTheWindowType:
|
||||
return getWindowType();
|
||||
case kTheRect:
|
||||
return getStageRect();
|
||||
|
||||
default:
|
||||
warning("Window::getField: unhandled field '%s'", g_lingo->field2str(field));
|
||||
return Datum();
|
||||
|
@ -189,6 +189,18 @@ void Window::setStageColor(uint32 stageColor, bool forceReset) {
|
||||
}
|
||||
}
|
||||
|
||||
Datum Window::getStageRect() {
|
||||
Graphics::ManagedSurface *surface = getSurface();
|
||||
Datum d;
|
||||
d.type = RECT;
|
||||
d.u.farr = new FArray;
|
||||
d.u.farr->arr.push_back(0);
|
||||
d.u.farr->arr.push_back(0);
|
||||
d.u.farr->arr.push_back(surface->w);
|
||||
d.u.farr->arr.push_back(surface->h);
|
||||
return d;
|
||||
}
|
||||
|
||||
void Window::reset() {
|
||||
resize(_composeSurface->w, _composeSurface->h, true);
|
||||
_composeSurface->clear(_stageColor);
|
||||
|
@ -123,6 +123,7 @@ public:
|
||||
int getWindowType() const { return _windowType; }
|
||||
void setTitleVisible(bool titleVisible) { _titleVisible = titleVisible; updateBorderType(); };
|
||||
bool isTitleVisible() { return _titleVisible; };
|
||||
Datum getStageRect();
|
||||
|
||||
void updateBorderType();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user