summaryrefslogtreecommitdiff
path: root/engine/UI/Void.go
diff options
context:
space:
mode:
Diffstat (limited to 'engine/UI/Void.go')
-rw-r--r--engine/UI/Void.go36
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)
+}