Replies: 4 comments 4 replies
-
Please provide some concrete issues you're having and what to change, a change that just involves "change things" isn't something that can be realised or appreciated |
Beta Was this translation helpful? Give feedback.
-
Prefixing |
Beta Was this translation helpful? Give feedback.
-
All the suggestions for new components to add already exists, what do you mean by that |
Beta Was this translation helpful? Give feedback.
-
Some of the things you say already exist:
I suspect there is some complain you are not articulating here, or it is not coming across. Some things I do not agree with:
This is what I rescue from what you said:
I'm having a hard time understanding what you want from First time reading this I was going to just say that But you say that Godot lacks a way to add or remove "components". So I think you are talking about And I believe you mean that because if you just want to add arbitrary So, if I can see taking Speaking of usability, I sympathize with I do not know if something is worth doing about |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am dealing with the control / GUI of godot engine and I see ton of messy code all over the place.
I suggest that we rewrite some of the components from scratch, taking inspiration from Java Swing GUI library.
It is a challenging task, but if we want to keep moving forward I think we should take inspiration from other places.
For those who don't know, this is the architecture of Java Swing components:
The main idea is to use inheritance to avoid messy code and allow godot users to use and inherit existing components. This will allow the Godot GUI controls to provide reliable APIs with clear direction.
Why
_notification
function in all the components_shape
function in all the componentstheme_cache
is defined in multiple controls.set_enabled
,set_editable
,get_size
, width height of the component, and more.Add new components
Add base classes:
Component
- an object having a graphical representation that can be displayed on the screen and that can interact with the userContainer
- a generic abstract container that can contain other componentsGComponent
- a base class for all G* controlsAdd the controls:
GLabel
- a labelGTextField
- a text fieldGTree
- a tree control componentScrollable
interface - handle scrolling in container. This can be inherited by all the control objects that use scrolling.GButton
- a buttonGPasswordField
- password protected text fieldGTextArea
- expandable text field, multi-lineGCheckBox
GRadioButton
GList
- A component that displays a list of objects and allows the user to select one or more items.Change current controls
ItemList
ItemList includes unrelated functionality.
set_item_language
- should be dealt in base class (inherited)_notification
function can be handled in base classGComponent
._shape
fumction can be inherited byGComponent
base class.set_text_direction
function can be inherited byGComponent
- some components will be able to override this function.Button
_notification
function can be handled byGComponent
base class._shape
fumction can be inherited byGComponent
base class.set_text_direction
function can be inherited byGComponent
- some components will be able to override this function.Beta Was this translation helpful? Give feedback.
All reactions