About Store Forum Documentation Contact



Post Reply 
Modal Window
Author Message
fatcoder Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Modal Window
you will need to specify 'disabled' for all other windows
04-22-2012 08:37 AM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #3
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
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
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #5
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
Find all posts by this user Quote this message in a reply
Post Reply