Skip to content

Commit

Permalink
Make details panel constant height
Browse files Browse the repository at this point in the history
  • Loading branch information
kettek committed Jun 29, 2024
1 parent d3b8f1a commit ea3ab48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/game/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -1321,9 +1321,9 @@ func (ep *EquipmentPanel) Layout(o *UIOptions) {
ep.details.panel.SetPosition(ep.panel.X()+ep.panel.Width()+4*o.Scale, ep.panel.Y())

// Dynamically size our details panel.
newHeight := (ep.details.luck.Y() + ep.details.luck.Height()) - ep.details.panel.Y()
newHeight = math.Ceil(newHeight/ep.details.panel.center.Height()) * ep.details.panel.center.Height()
ep.details.panel.SetSize(128*o.Scale, newHeight)
//newHeight := (ep.details.luck.Y() + ep.details.luck.Height()) - ep.details.panel.Y()
//newHeight = math.Ceil(newHeight/ep.details.panel.center.Height()) * ep.details.panel.center.Height()
//ep.details.panel.SetSize(128*o.Scale, newHeight)
}

func (ep *EquipmentPanel) Update(o *UIOptions) {
Expand Down

0 comments on commit ea3ab48

Please sign in to comment.