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/Menu.go | |
| parent | e071f6670cf2d379237bf9cc66bd99696e48df8d (diff) | |
Menu description pt. 1
Diffstat (limited to 'engine/UI/Menu.go')
| -rw-r--r-- | engine/UI/Menu.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/engine/UI/Menu.go b/engine/UI/Menu.go index fa3888b..32e0dcc 100644 --- a/engine/UI/Menu.go +++ b/engine/UI/Menu.go @@ -1,6 +1,9 @@ package ui import ( + "encoding/json" + "fmt" + coreobjects "github.com/DegustatorPonos/RuinesOfRafdolon/CoreObjects" settings "github.com/DegustatorPonos/RuinesOfRafdolon/Settings" rl "github.com/gen2brain/raylib-go/raylib" @@ -23,6 +26,7 @@ func (base *Menu) Create(manager *coreobjects.SceneManager) { base.manager = manager base.cache = &layoutCache{} base.Contents.Init(base) + // rl.TraceLog(rl.LogInfo, "Parsed: %s", base) } func (base *Menu) Destroy() { @@ -92,3 +96,11 @@ func (base *Menu) RecalculateCache() { base.PaddingX, base.PaddingY) } + +func (base Menu) String() string { + var outp, jsonErr = json.MarshalIndent(base, "", " ") + if jsonErr != nil { + return fmt.Sprintf("Failed to parse: %s", jsonErr.Error()) + } + return string(outp) +} |
