mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 11:51:52 +00:00
BURIED: Implement window enabling
This commit is contained in:
parent
e97c2f47a8
commit
33444e800d
@ -31,6 +31,7 @@ namespace Buried {
|
||||
|
||||
Window::Window(BuriedEngine *vm) : _vm(vm) {
|
||||
_parent = 0;
|
||||
_enabled = true;
|
||||
}
|
||||
|
||||
Window::~Window() {
|
||||
@ -110,4 +111,18 @@ void Window::dispatchAllMessages() {
|
||||
}
|
||||
}
|
||||
|
||||
void Window::enableWindow(bool enable) {
|
||||
if (_enabled != enable) {
|
||||
_enabled = enable;
|
||||
sendMessage(new EnableMessage(enable));
|
||||
}
|
||||
}
|
||||
|
||||
bool Window::isWindowEnabled() const {
|
||||
if (_parent && !_parent->isWindowEnabled())
|
||||
return false;
|
||||
|
||||
return _enabled;
|
||||
}
|
||||
|
||||
} // End of namespace Buried
|
||||
|
@ -65,6 +65,8 @@ public:
|
||||
const Common::Rect &getRect() const { return _rect; }
|
||||
Common::Rect getClientRect() const;
|
||||
void updateWindow() { onPaint(); }
|
||||
void enableWindow(bool enable);
|
||||
bool isWindowEnabled() const;
|
||||
|
||||
// TODO:
|
||||
// SetTimer
|
||||
@ -82,9 +84,9 @@ private:
|
||||
BuriedEngine *_vm;
|
||||
Common::Queue<Message *> _queue;
|
||||
|
||||
// TODO: Something about children?
|
||||
Window *_parent;
|
||||
Common::Rect _rect;
|
||||
bool _enabled;
|
||||
};
|
||||
|
||||
} // End of namespace Buried
|
||||
|
Loading…
Reference in New Issue
Block a user