Mercurial > projects > mde
annotate 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 |
rev | line source |
---|---|
31
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
1 Copyright © 2007-2008 Diggory Hardy |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
2 License: GNU General Public License version 2 or later (see COPYING) |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
3 |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
4 Todo plan: |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
5 * means done |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
6 |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
7 GUI: |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
8 -> Basic OpenGL code to: |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
9 ->* create orthographic projection |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
10 ->* draw boxes |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
11 -> maybe more (text, textures, ...) |
33
6886402c1545
Started implementing FreeType.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
31
diff
changeset
|
12 -> Windows with size & position |
6886402c1545
Started implementing FreeType.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
31
diff
changeset
|
13 -> position from Gui |
31
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
14 -> Widgets: |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
15 ->* minimum size but expandable, auto-set |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
16 -> no ability to resize yet except from config files |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
17 -> scripted widgets |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
18 -> Text rendering |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
19 -> text library? |
34
6b4116e6355c
Work on the Gui: some of the framework for drag & drop. Also made Window an IWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
33
diff
changeset
|
20 -> Drag & drop |
6b4116e6355c
Work on the Gui: some of the framework for drag & drop. Also made Window an IWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
33
diff
changeset
|
21 -> click/drag start triggers a callback on the widget |
6b4116e6355c
Work on the Gui: some of the framework for drag & drop. Also made Window an IWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
33
diff
changeset
|
22 -> when button is released, callback: |
6b4116e6355c
Work on the Gui: some of the framework for drag & drop. Also made Window an IWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
33
diff
changeset
|
23 -> finds release location |
6b4116e6355c
Work on the Gui: some of the framework for drag & drop. Also made Window an IWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
33
diff
changeset
|
24 -> checks if this is a valid drop target |
6b4116e6355c
Work on the Gui: some of the framework for drag & drop. Also made Window an IWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
33
diff
changeset
|
25 -> if so, acts on it |
31
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
26 |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
27 |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
28 |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
29 Notes: |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
30 Some unifications of the coordinate system are needed: |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
31 By default OpenGL uses the bottom left as the origin, with the first (bottom-left most) pixel at 0,0. |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
32 SDL's mouse events use the top left as the origin, with the first (top-left most) pixel at 1,1. |
baa87e68d7dc
GUI now supports basic interactible widgets, widget colour and border are more unified, and some code cleanup.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff
changeset
|
33 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. |