-
Notifications
You must be signed in to change notification settings - Fork 0
Home
cfloutier edited this page Apr 15, 2024
·
16 revisions
This set of controls is used by the K2D2 Kerbal Space Program 2 mod
You can use this repo as an example of use of the controls. https://github.com/cfloutier/test_k2ui
Creates a new Visual Tree Asset
all controls are available in the UI Builder :

all uss files are located in the K2UI/Runtime/Controls/USS folder
use The main K2UI.uss as it includes all others uss files
class : .console
The control adds a simples Set and Add functions that clear the content and add a new line.

usefull control used as the K2D2 pilot current status.
class : .k2-status-line and .k2-status-line--normal / .k2-status-line--warning / .k2-status-line--error
a simple label with a variable used to setup a status color

update the line with
void Set(string text, Level level)