Skip to content
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


UI Builder

Creates a new Visual Tree Asset

all controls are available in the UI Builder :

image

uss

all uss files are located in the K2UI/Runtime/Controls/USS folder

Controls

Labels (Labels.cs and )

  • `Console : a simple Label used as a console.

class : .console

The control adds a simples Set and Add functions that clear the content and add a new line.

image

  • StatusLine : another label that can change

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

image

Clone this wiki locally