-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNOTES
More file actions
119 lines (91 loc) · 6.13 KB
/
NOTES
File metadata and controls
119 lines (91 loc) · 6.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
TODO:
Button:
* normal and pushed should scale when resized
ButtonToggle:
* should be abled to toggle between images as well
Container:
* Container needs all mouse input components added
* fix widths to account for scroll bar (or horizontal scrolling?)
* Make a ContainerGen class that inherits Container, Container stores images, ContainerGen stores images and generic objects
* fill out scroll functions + sort function
* change iwidth/iheight to isize(TSize)
Label:
* text isnt centred vertically
LabelExtended:
* needs to be finished
* LabelExtended needs all mouse input components added
Slider:
* Slider needs all mouse input components added
ListBox:
* ListBox's need to fix the length of text if it goes outside the width of the list box
ListBoxGen:
ListBoxDrop:
* Click anywhere on a closed ListBoxDrop to open it
* keep the arrow draw upon dropping, allow clicking on it to close again
* should be able to edit the size of the undropped box
TextBox:
* text box's should allow typing sentences outside of the box area
* if there is enough vertical space, allow multiple lines of text to be typed
* upon tab key being pressed, set next textbox in set (from parent) to the active one (or in the next set if there are no more textbox's in the current set)
* setting a textbox as the active one should place the positioner at the end of the text
GUIComponents:
* all input first needs to check if the component is enabled (direct input, meaning mouse click or key press)
* set change variables where appropriate
* upon being de-enabled, GUIControls should draw grey, transparent filter over their graphics
* every GUIControl needs alpha variable (upon being changed, set changed to true and set all appropriate Images to that alpha)
* split every GUIControl's checks to draw the graphic (check alpha first, then check visibility)
* make numItems in any GUIControl private and give it a getter function
* instead of using new Color(), create pre made colors in GUIManager
* add constant for font height to be used in all GUIControls
* should not draw outside of the size of the parent GUI
* remove the GUILoop function, its is basically the same as the game loop, not needed
* all components that implement scrollable, change mouseButtonDown(0) part to mousePressed(), set a boolean to false upon mouseReleased() to stop scrolling
* make updateC() protected and all inherited classes use it instead of their own
* remove 'priority' method from all base/subclasses
* make sure that most collection implementing components have synchronized functions in regards to editing their container types (or iterating over them)
* only allow clicking on a single component, e.g. multiple overlapping components will receive the same mouse click, etc, must be stopped
* adding a component should set its parent to the component doing the adding
* instead of checking if graphic == null, create a nullImage image and initialise all graphics with that (0x0 image with nothing in it)
* remove all excess changed = true; statements (most arent needed anymore)
* replace checks for mouseIsOver with TBounds
GUI:
* delete? obsolete?
GUILayout:
* putting one layout inside another and organising the other wont really effect the former (besides move it, but the spacing isnt considered), design flaw?
* setting a new parent should reorganise the children?
* should not be reliant on the parent for position and size, setting a parent should set the size and position according to the parent
* Cursor needs to have a setPointerPosition(int x, int y) that sets, on its image, a spot where it gets its x and y positions from
* implement debugging for all GUI/GUIControls (draws a yellow rectangle around them, 0, 0, width - 1, height - 1)
* check exception handling throughout gui stuff
* make sure that all GUI and GUIControls can handle using an image
* create Interfaces that describe different functions for GUIComponents
* create TGUIOutOfBoundsException that prints the error along with the id and possible range (and the value that was wrong), example in TGUIComponent
* replace all exceptions amongst all guis with this one
* TGUIEvent is obsolete, remove
* create a TGUIScreenLayout that positions gui's around the screen(far left, far right, top, bottom, centre, etc etc)
* colours should be more abstract, and they should be able to be edited without needing access to the actual colour
* components with separate parts should abstract those parts out (include their own colours)
* components should be able to handle animating images(animations)
* components should implement Iterable<>
* the TIGUICollection interface should implement Iterable<>
* create abstract classes for generic components (including TButtonToggle)
* allow returning topright and bottomleft corners as TPoints
* add get...X get...Y to TBound, allow access to each individual point
* add a TGUIPalette class that holds all colours used by the gui system
* also add a TPalettes enum that holds a bunch of pre-made themes and can swap out palettes
* complete TSize comparison methods
* add TGUIVisibilityEvent, gets called every time a component's visibility is toggled
* add 'final' keywords to all unoverridable methods
* create a Vector2<T> class that contains a bunch of methods (add, sub, etc)
* make TPoint implement it (TPoint<Float>), finish all methods
* create a muttable String type (can be edited directly)
BUGS:
* clicking on an Item in a ListBox gets gradually more offset for some reason (same in other collection implemented subclasses)
* ListBox numDown is 1 off when using scrollDown/Up compared to normal click scrolling (perhaps make click scroll use scrollDown/Up functions)
* ListBox selection background (black bar) doesnt draw in the right spot
* ListBox doesnt draw items that need to be scrolled to see
* label word wrapping sometimes adds a space to the list lines, also inf-loops when [[ involved
* label word wrapping draws the new lines onto the same line as the first
* label detecting when to word wrap is wrong (pos.x + textwidth is somehow larger than label width)
* TextBox little positioner can move backwards upon backspacing, even if no text was edited
* adding TGUIComponent to another will not update the new one properly (position is wrong)