Skip to content

Commit

Permalink
Merge pull request #44 from yohamta/fix-bug-attrs
Browse files Browse the repository at this point in the history
fix bug for passing html attributes
  • Loading branch information
yohamta authored Apr 26, 2023
2 parents 2ac6979 + 8256e78 commit 49bfdfd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
16 changes: 8 additions & 8 deletions examples/game/assets/html/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
flex-grow: 1;
}

panel {
.panel-outer {
width: 300px;
height: 300px;
margin-top: 120px;
Expand All @@ -26,7 +26,7 @@
justify-content: center;
}

panel-inner {
.panel-inner {
flex-direction: column;
align-items: center;
justify-content: center;
Expand Down Expand Up @@ -120,7 +120,7 @@
top: 52;
}

play-game-inner-panel {
.play-game-panel {
width: 260px;
height: 140px;
flex-direction: column;
Expand Down Expand Up @@ -156,8 +156,8 @@
<body>
<game-ui>
<container>
<panel sprite="panel_brown.png">
<panel-inner sprite="panelInset_beige.png">
<panel class="panel-outer" sprite="panel_brown.png">
<panel class="panel-inner" sprite="panelInset_beige.png">
<gauge-container>
<gauge-text class="gauge-text">Health</gauge-text>
<health-gauge class="gauge"></health-gauge>
Expand All @@ -166,7 +166,7 @@
<gauge-text class="gauge-text">Mana</gauge-text>
<mana-gauge class="gauge"></mana-gauge>
</gauge-container2>
</panel-inner>
</panel>
<buttons>
<button-big class="button-inventory">Inventory</button-big>
<button-small class="button-ok">OK</button-small>
Expand All @@ -185,13 +185,13 @@
</bottom-buttons>

<play-game-container>
<play-game-inner-panel sprite="glassPanel_corners.png">
<panel class="play-game-panel" sprite="glassPanel_corners.png">
<play-game-text>PLAY THE GAME?</play-game-text>
<play-game-buttons>
<glass-button sprite="glassPanel_projection.png">YES</glass-button>
<glass-button sprite="glassPanel_projection.png" style="margin-left: 20px;">NO</glass-button>
</play-game-buttons>
</play-game-inner-panel>
</panel>
</play-game-container>
</game-ui>
</body>
Expand Down
1 change: 0 additions & 1 deletion examples/game/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func (g *Game) setupUI() {
Height: g.screen.Height,
Components: map[string]furex.Component{
"panel": &widgets.Panel{},
"panel-inner": &widgets.Panel{},
"gauge-text": &widgets.Text{Color: color.RGBA{50, 48, 41, 255}},
"health-gauge": &widgets.Bar{Color: "Green", Value: .8},
"mana-gauge": &widgets.Bar{Color: "Blue", Value: .8},
Expand Down

0 comments on commit 49bfdfd

Please sign in to comment.