RE: [GD-General] GUI Design
Brought to you by:
vexxed72
From: Nicolas R. <nic...@fr...> - 2003-01-24 13:04:47
|
Helo, Our engine is defining "windows" which look like a mix between MFC CWnd and HWND :) Any time a window is receiving a "size" event (from windows when the window is the top-most backbuffer, or from the engine for child-windows) a "OnSize" method is called. The first thing OnSize does is to call each child's OnParentSize (leaving them a chance to resize themselves), finally the OnSize may "re-position" child windows as wanted. A "glue" mechanism is supported to help in most cases. A "glue" tells that a border should be "glued" to a parent's border with a given amount. For exemple, window A left-border should be glued to parent's right-border - 100 pixels. Pixels can be replaced w/ width relative values. You should keep pixels because of UI designers usually given you nice 49x71 buttons (not speaking about window backgrounds :) ) that usually cannot be resized at all :) Nicolas. -----Original Message----- How have you guys solved this problem? My solution presented seems like it'll add a whole lot more math to the GUI to do all the translations for the virtual screen space. |