-
Notifications
You must be signed in to change notification settings - Fork 4
Component overview
GUI Engine makes no sense without components.
As stated earlier, components should be built using Builders, which are descendants of ComponentBuilder
. To build a component you should get nesessary builder, set all you need and build component. But what can you set? What functionality each component provide?
You can see a short entry for everything that exists in GExt in the list below.
Note: you can set position and size to any component. Builder syntax is:
component = Graphics.<component_name>
...
.size(...)
.placeAt(...)
.build();
A couple of bright
Independent components that could be used directly in the user interface.
Just a plain single-line text on the screen. In the other words, the string API adaptation.
Additionally: color, custom font renderer, text scale, is string should be centered.
Represents clickable button. Label and action to each mouse button can be attached. Additionally, you can set texture mapping that should be displayed at the background of the button.
Shows a list of points, but only one can be selected. The size of checkbox and interval between lines can be specified.
Plain image API adaptation. In addition to the basic settings, you can only specify the image.
Represents GUI background drawn according to style rules. Border and corner thickness should be set.
Just a plain checkbox implementation. It will show checkbox and user can tick it and untick.
General implementation of progress bar. You can set and get progress in format: float number from 0 to 1.
Represents user-immutable multiline text box. Provides methods for working with text, but doesn't support keybindings. Supported features:
- working with content from code
- selection by mouse dragging
- copying selected content
- content wrapping(computing the size of the content and expanding panel to cover it)
Text panel is first really complex component developed on the GExt platform. And of course, it has many parameters that you can set:
- generally, text
- internal offsets
- enable/disable selection
- custom renderer
- text scale
- etc.
Represents fully mutable multiline text box and extends GTextPanel.
Note: this component is still in beta. Some functions can behave wrongly. Please submit fatal errors on GitHub.
Supported features:
- basic text editing
- working with transfer buffer (Ctrl+C, Ctrl+V)
- selection by Shift + arrows
- advanced navigation (arrows in selection, Home-End, PageUp-PageDown)
Coming soon:
- editing history (Ctrl+Z, Ctrl+Shift+Z)
- scrolling feature
A darker one
Components generally without self graphics representation. It defines some behaviour around of management other components.
Enables scrolling on supported components when attaching to it.
Controls selection process on targeted component.