From 85666467056ccae2011128e0d38ea2dbd1efee8a Mon Sep 17 00:00:00 2001 From: Physcik Date: Fri, 6 Feb 2026 01:55:27 +0500 Subject: Menu description pt. 1 --- engine/UI/Void.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 engine/UI/Void.go (limited to 'engine/UI/Void.go') 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) +} -- cgit v1.3