diff options
author | Paul Gilbert | 2019-08-04 19:41:05 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-08-08 20:10:33 -0700 |
commit | b2f6280e348aa595ee505c512e499f839b08e593 (patch) | |
tree | 6f1ab6b0352d38a3a469fc6674f58c8c9d020eb8 /engines/glk/windows.cpp | |
parent | 6fe59d14e5c4e592f4e1d8766c05de0f1e1989e5 (diff) | |
download | scummvm-rg350-b2f6280e348aa595ee505c512e499f839b08e593.tar.gz scummvm-rg350-b2f6280e348aa595ee505c512e499f839b08e593.tar.bz2 scummvm-rg350-b2f6280e348aa595ee505c512e499f839b08e593.zip |
GLK: Add methods for sending windows to the front/back of draw order
Diffstat (limited to 'engines/glk/windows.cpp')
-rw-r--r-- | engines/glk/windows.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/glk/windows.cpp b/engines/glk/windows.cpp index 7b6833ff59..32f2868b7e 100644 --- a/engines/glk/windows.cpp +++ b/engines/glk/windows.cpp @@ -735,6 +735,24 @@ void Window::getSize(uint *width, uint *height) const { *height = 0; } +void Window::bringToFront() { + PairWindow *pairWin = dynamic_cast<PairWindow *>(_parent); + + if (pairWin && pairWin->_dir == winmethod_Arbitrary && pairWin->_children.back() != this) { + pairWin->_children.remove(this); + pairWin->_children.push_back(this); + } +} + +void Window::sendToBack() { + PairWindow *pairWin = dynamic_cast<PairWindow *>(_parent); + + if (pairWin && pairWin->_dir == winmethod_Arbitrary && pairWin->_children.front() != this) { + pairWin->_children.remove(this); + pairWin->_children.insert_at(0, this); + } +} + /*--------------------------------------------------------------------------*/ BlankWindow::BlankWindow(Windows *windows, uint rock) : Window(windows, rock) { |