Mercurial > projects > mde
view codeDoc/gui/GUI notes.txt @ 34:6b4116e6355c
Work on the Gui: some of the framework for drag & drop. Also made Window an IWidget.
Implemented getWidget(x,y) to find the widget under this location for IWidgets (but not Gui).
Made Window an IWidget and made it work a little more similarly to widgets.
Implemented callbacks on the Gui for mouse events (enabling drag & drop, etc.).
committer: Diggory Hardy <diggory.hardy@gmail.com>
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 02 May 2008 16:03:52 +0100 |
parents | 6886402c1545 |
children | 23a1d2b1ec5f |
line wrap: on
line source
Copyright © 2007-2008 Diggory Hardy License: GNU General Public License version 2 or later (see COPYING) Todo plan: * means done GUI: -> Basic OpenGL code to: ->* create orthographic projection ->* draw boxes -> maybe more (text, textures, ...) -> Windows with size & position -> position from Gui -> Widgets: ->* minimum size but expandable, auto-set -> no ability to resize yet except from config files -> scripted widgets -> Text rendering -> text library? -> Drag & drop -> click/drag start triggers a callback on the widget -> when button is released, callback: -> finds release location -> checks if this is a valid drop target -> if so, acts on it Notes: Some unifications of the coordinate system are needed: By default OpenGL uses the bottom left as the origin, with the first (bottom-left most) pixel at 0,0. SDL's mouse events use the top left as the origin, with the first (top-left most) pixel at 1,1. I decided, for the GUI, to use the top-left at the origin with the top-left most pixel at 0,0. For OpenGL, the projection can simply be modified to achieve this; for SDL's events 1 is subtracted from each coordinate when the event is recieved.