-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotes&Proposals.txt
177 lines (98 loc) · 11.2 KB
/
Notes&Proposals.txt
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Proposals for V1.0:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[✓] Add a button class that inherits from box class, and by default can change it's color upon being hovered and change to another color when clicked.
[✓] Remove the contentBounds arg from the draw function in UI_Objects, as it redundant.
[SCRAPPED] Add size to content for boxes. Note that this means that child with percent based sizes will not affect the size of these containers.
Also, have the minimum size of the container be the default size in pixels - only stretch it if the content extends its bounds.
[✓] make the addChild function private/protected or fix it so that it can be called directly on objectContainers
[✓] Add string values, int values, and float values that can be added as children of objects
or... even better... add a value class that can hold a pointer to any type of value via templates, and can easily be deferenced
[IMPOSSIBLE DUE TO RESTRICTIONS] Everytime the user resizes the window, change the size of Workspace, then render, then after the next tick resize the window to the desired size.
This will eliminate the barely noticeable artififacts that appear on the first frame after the window is resized.
[✓] Implement supoort for anti-aliasing... it must be applied to the renderTexture of every ObjectContainer
[✓] Implement Z-Index
[✓] Add a function to swap the index of children in object containers, and add another to insert a child into a certain index.
[✓] Allow for the resizing, repositioning, and renaming of the window.
[✓] Instead of hitTestThrough, change rename this hitTestConsume, and make objects with HitTestThrough recieve input, but not consume it, thus passing input through to any objects behind them
Note that Input handling must be changed to support Z-indexing.
[✓] All drawables should inherit from the drawable class - not the UI_Object class.
[✓] As per C++ standards, create the .cpp files for all UI_Objects
[✓] Change the font class to look in the static \ font folder by default, but if the path starts with a drive letter (i.e. C:\) then treat it as an absolute path.
[✓] The cursor in text boxes should be able to be moved with the arrow keys (<- ->)
[✓] Instead of including the audio functionality with chalk/UI.h, make a seperate chalk/Audio.h or chalk/Sound.h file for this purpose.
[✓] Allow for the absolute bounds (in pixels) of objects to be extended via setInputBoundsExtension() and getInputBoundsExtension().
This is especially for things like textBoxes, because it can be difficult to select from the beginning and end.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[✓] Fix bug: anti-aliasing does not apply to the imageButton of sliders
[✓] Fix bug: characters are inserted an index behind the insertion bar if the bar is not at the very end of the text.
[✓] Fix Bug: The absolute bounds of drawables should take into account the margins of that object to prevent
the consuming of input of other objects caused by absolute bounds extending beyond whats drawn.
[✓] Fix Bug: HitTestThrough, HitTestConsume, and HitTestThroughAndConsume are not working properly for objects that aren't objectContainers
[✓] Fix bug: textboxes cannot have the insertion bar before the first character.
[✓] Fix bug: textboxes can only be deselected by hitting the escape key,
allow for clicking off of the textbox to trigger deselect()
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Proposals for V1.1:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[ ] Add a text alignment option for textBoxes
[ ] Add proper support for multiline textboxes, as well as clipping for text and textboxes that extend beyond their maximum size
[ ] Complete tests/StressTest and tests/HolisticTest
[ ] Make a function to compare lambdas in the event class - this should be possible by comparing the memory addresses of the lambdas.
Don't forgot to optimize the onMouseClickFunction of the textBox class.
[ ] In the objectChild class add a vector of pointers to UI_Objects* to hold all visible children,
that way invisible children do not have to be iterated through in draw calls, thus rendering time will be decreased.
[ ] Allow for Instances of UI_Objects to be overwritten with ==, rather than removing the instance and then creating a copy of the object.
[ ] optimize the updateTransformGrid function of the grid class.
[ ] Add an instancedImage class, indentical to image, but uses less memory because rather than storing a image for every image object,
it holds a reference to an image that can be shared across multiple instancedImage objects
[ ] The events within the UI_Object class take up lots of memory - about 900 bytes per UI_Object. Consider rewriting the code to use less RAM.
[ ] Implement multithreading of rendering to increase FPS and utilize more of CPU. Consider using SIMD along side multithreading, and be sure to add a Max Cores option.
[ ] Optimize the refresh function, there is no need to redraw the children of ObjectContainers if none of the children have a percent based sizing.
[ ] Divide the UI_Objects in the instance Class into 64-object chunks for the sake of efficiency and speed
[ ] Performance Target - 1000 FPS w/ 50 boxes (2 cores or less).
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Proposals for V1.2:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[ ] Consider adding a dedicated keybind class (this was implemented in a pre-1.0 version, but later removed)
[ ] Allow for the locking of all input.
[ ] Allow for integration with OpenGL
[ ] Implement shaders
[ ] Divide the sf::Text in textboxes and text into 256-byte chunks for the sake of efficiency, or create a largeText and largeTextbox class for this purpose.
[ ] Add formatted textboxes
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Proposals for V1.3:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
!consider writing an inputReciever class to allow for better management of input!
[ ] Add pre-draw and post-draw modifiers: Mirror, shadow, etc
[ ] Implement scale and rotation for all UI_Objects, consider allowing the rotation origin to be changed.
[ ] Implement content transparency, scale, and rotation for Object Containers
[ ] Add a group class, inherits from object container, and unlike a box it can render objects anywhere on the screen; it should also have certain events that allow that will fire when anyone of it's childrens events fire
(i.e. if a child is clicked the onClickedEvent of the group should fire aswell, and when testing for intersects absolute bounds it should test all children and return true if the pos intersects at least one of it's childrens bounds)
[ ] Sway towards the CSS style, and allow for backwards compatibility will CSS and HTML (i.e. set attributes from CSS, HTML, etc)
[ ] Add Inches and CM as unit sizes to align with CSS
[ ] Add relative and absolute poisitons
[ ] Implement a polygon class - that is, a simple, convex polygon that behaves similar to a box, or object container, but has a customizable shape.
Implement a advanced polygon class - like the polygon class, but allows for convave shapes and holes.
[ ] Add lineGraph, pointGraph, bar graph, and pieChart classes, all of which inherit from a graph base class.
[ ] Add a grid class
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Proposals for V1.4:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[ ] Implement an animation library that adheres to css standards.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Proposals for V1.5:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[ ] Create some debugging tools specifically for CHALK UI
[ ] Consider writing CHALK-UI bindings for Rust, Java, Go, and Python.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Proposals for V2.0:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[ ] Rewrite the graphics portion of SFML to be compatible with Vulkan - use glslangValidator to convert all GLSL (OpenGL) shaders into SPIR-V (Vulkan).
To convert a shader from SPIR-V to GLSL, use SPIRV-Cross.
[ ] Rewrite SFML and Chalk UI to allow for multiple windows at a time.
[ ] Create a dedicated editor for the Chalk UI Engine to streamline the development process.
(It would be nice to have a homebuilt IDE, and maybe add some drag and drop functionality (i.e. the ability to drag and drop if statements and entire lines and blocks of code))
[ ] Add scripts (support both C++ and Go)
[ ] If I do ever end up rewriting SFML's code, then I should omptimize the resizing of the RenderTexture with realloc(), if it isn't already.
[ ] Rewrite the sf::Texture to support anti-aliasing