fatcoder
Member
|
Modal Window
Quick question, is there a way (or what's the easiest way) to open a window as modal... i.e. only that window accepts kayboard and mouse input, all other windows ignore input until the modal window is closed?
|
|
04-22-2012 08:12 AM |
|
Esenthel
Administrator
|
RE: Modal Window
you will need to specify 'disabled' for all other windows
|
|
04-22-2012 08:37 AM |
|
fatcoder
Member
|
RE: Modal Window
I feared that might be the answer... got a lot of windows. Oh well, thanks anyway.
|
|
04-22-2012 09:01 AM |
|
Esenthel
Administrator
|
RE: Modal Window
I just had an idea:
you could create custom class WindowOverlay : Window
extend its draw method and just render semi-transparent black rectangle over the screen
set its rectangle to full screen
set the Window::level of the window that its between all others and the modal window
background windows level=0
WindowOverlay level=1
modal window level=2
clicking outside of modal window will always detect the overlay window because it's stretched fullscreen and is above the background windows
|
|
06-20-2012 11:51 PM |
|
fatcoder
Member
|
RE: Modal Window
Hey, great idea. I came up with a similar idea, but your method is cleaner. I'll give it a try.
|
|
06-21-2012 12:57 AM |
|