1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
package main
import (
"log"
components "github.com/DegustatorPonos/RuinesOfRafdolon/Components"
coreobjects "github.com/DegustatorPonos/RuinesOfRafdolon/CoreObjects"
dynamic "github.com/DegustatorPonos/RuinesOfRafdolon/Dynamic"
render "github.com/DegustatorPonos/RuinesOfRafdolon/Render"
settings "github.com/DegustatorPonos/RuinesOfRafdolon/Settings"
ui "github.com/DegustatorPonos/RuinesOfRafdolon/UI"
rl "github.com/gen2brain/raylib-go/raylib"
)
func main() {
settings.ReadSettings()
components.InitManager()
dynamic.Init()
render.InitWindow()
defer render.DeinitWindow()
// TEMPORARY SECTION
for _, v := range dynamic.Manager.AvaliablePackages {
// log.Printf("%s: %s", k, &v)
v.LoadTextures()
v.LoadObjects()
v.LoadWorlds()
}
log.Printf("Resource manager: %s", &components.Resources)
// var field = descriptor.GenerateMap()
var manager = coreobjects.InitSceneManager()
// render.StartLoop(manager, components.Resources.Worlds["MainWorld"])
var menu = menu_test()
render.StartLoop(manager, menu)
}
func menu_test() *ui.Menu {
return &ui.Menu{
PaddingX: 0.05,
PaddingY: 0.1,
Spacing: 0.025,
Rows: []*ui.GridRow {
{
HeightWeight: 1,
Objects: []ui.UIElement {
&ui.Label{ Text: "Ruines of Rafdolon" },
},
},
{
HeightWeight: 2,
Objects: []ui.UIElement {
&ui.Label{
Text: "Center div",
Style: ui.Style{
BacgroundColor: &rl.Pink,
},
},
},
},
{
HeightWeight: 1,
Objects: []ui.UIElement {
&ui.Label{ Text: "Test text" },
},
},
},
}
}
|