diff options
| author | Physcik <mynameisgennadiy@vk.com> | 2026-02-06 01:55:27 +0500 |
|---|---|---|
| committer | Physcik <mynameisgennadiy@vk.com> | 2026-02-06 01:55:27 +0500 |
| commit | 85666467056ccae2011128e0d38ea2dbd1efee8a (patch) | |
| tree | fa91af8a8e9be05e6ef87a4ecddc6b3f0303dea4 /engine/UI/Void.go | |
| parent | e071f6670cf2d379237bf9cc66bd99696e48df8d (diff) | |
Menu description pt. 1
Diffstat (limited to 'engine/UI/Void.go')
| -rw-r--r-- | engine/UI/Void.go | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/engine/UI/Void.go b/engine/UI/Void.go new file mode 100644 index 0000000..f167f30 --- /dev/null +++ b/engine/UI/Void.go @@ -0,0 +1,36 @@ +package ui + +import ( + "encoding/json" + "fmt" + + rl "github.com/gen2brain/raylib-go/raylib" +) + +type Void struct { + Weight float32 +} + +// Used in the element parsing from JSON +const VoidTypeName string = "void" + +func (base *Void) Init(*Menu) { +} + +func (base *Void) Destroy() { +} + +func (base *Void) GetOccupationWeight() float32 { + return base.Weight +} + +func (base *Void) Draw(*rl.Rectangle) { +} + +func (base Void) String() string { + var outp, jsonErr = json.Marshal(base) + if jsonErr != nil { + return fmt.Sprintf("Failed to parse settings: %s", jsonErr.Error()) + } + return string(outp) +} |
