Class FieldRenderer
java.lang.Object
org.collebol.client.gui.graphics.renderer.Renderer
org.collebol.client.gui.graphics.renderer.ui.FieldRenderer
The FieldRenderer class is responsible for rendering field components in the UI.
It handles the rendering of both standalone fields and sub-fields within a parent component.
This class uses OpenGL for rendering the field's background, border, and any subcomponents it contains.
Usage:
FieldRenderer fieldRenderer = new FieldRenderer(engine);
fieldRenderer.renderField(fieldId);
fieldRenderer.renderSubField(subFieldId, parentId);
- Since:
- 1.0-dev
- Author:
- ColleBol - contact@collebol.org
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrenderField(int id) Renders a field with the specified ID.voidrenderSubField(int id, int parentId) Renders a sub-field with the specified ID within a parent component.
-
Constructor Details
-
FieldRenderer
FieldRenderer constructor.- Parameters:
engine- instance
-
-
Method Details
-
renderField
public void renderField(int id) Renders a field with the specified ID.This method retrieves the field component by its ID, and renders its background, border, and any subcomponents it contains.
- Parameters:
id- the ID of the field to render
-
renderSubField
public void renderSubField(int id, int parentId) Renders a sub-field with the specified ID within a parent component.This method retrieves the parent component and the sub-field by their IDs, and renders the sub-field's background and border. The sub-field's position is relative to the parent component's position.
- Parameters:
id- the ID of the sub-field to renderparentId- the ID of the parent component
-