Diff
diff --git a/main.go b/main.go
index 020c8e8..e90cbe6 100644
--- a/main.go
+++ b/main.go
@@ -5 +4,0 @@ import (
- "gui/color"
@@ -8,5 +6,0 @@ import (
- painter "gui/painter"
- "strconv"
-
- rl "github.com/gen2brain/raylib-go/raylib"
- "github.com/go-shiori/dom"
@@ -17,2 +11,2 @@ func main() {
- Width: 800,
- Height: 450,
+ Width: 1920,
+ Height: 1080,
@@ -32,15 +26 @@ func main() {
- p := css.Map(d.DOM)
-
- wm := painter.NewWindowManager()
-
- // Open the window
- wm.OpenWindow(d.Title, 800, 450)
- defer wm.CloseWindow()
-
- for _, v := range p.Render {
- styles := p.StyleMap[v.Id]
-
- x, _ := strconv.ParseFloat(styles["x"], 32)
- y, _ := strconv.ParseFloat(styles["y"], 32)
- width, _ := strconv.ParseFloat(styles["width"], 32)
- height, _ := strconv.ParseFloat(styles["height"], 32)
+ // fmt.Printf("%s\n", css.StyleSheets)
@@ -48,11 +28 @@ func main() {
- fmt.Printf("%s %s %f %f %f %f\n", v.Id, dom.InnerText(v.Node), x, y, width, height)
-
- bgColor := color.Background(styles)
-
- node := painter.Rect{
- Node: rl.NewRectangle(float32(x), float32(y), float32(width), float32(height)),
- Color: rl.NewColor(bgColor.R, bgColor.G, bgColor.B, bgColor.A),
- }
-
- wm.AddRectangle(node)
- }
+ p := css.Map(d.DOM)
@@ -60,4 +30,3 @@ func main() {
- // Main game loop
- for !wm.WindowShouldClose() {
- // Draw rectangles
- wm.DrawRectangles()
+ for k, v := range p.StyleMap {
+ fmt.Printf("%s\n", k)
+ fmt.Printf("%s\n", v)
@@ -65 +33,0 @@ func main() {
-