Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/ketMix/ebijam24
Browse files Browse the repository at this point in the history
  • Loading branch information
liqMix committed Jun 29, 2024
2 parents 3da69db + a6fd95f commit d5c9cca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions internal/game/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,20 @@ func (g *Game) Update() error {

if ebiten.IsKeyPressed(ebiten.KeyQ) || ebiten.IsKeyPressed(ebiten.KeyLeft) || ebiten.IsKeyPressed(ebiten.KeyA) {
g.camera.SetRotationAt(g.camera.Rotation()-0.05, 1)
g.selectedDude = nil
} else if ebiten.IsKeyPressed(ebiten.KeyE) || ebiten.IsKeyPressed(ebiten.KeyRight) || ebiten.IsKeyPressed(ebiten.KeyD) {
g.camera.SetRotationAt(g.camera.Rotation()+0.05, 1)
g.selectedDude = nil
}

if inpututil.IsKeyJustPressed(ebiten.KeyW) || inpututil.IsKeyJustPressed(ebiten.KeyUp) {
if g.tower != nil && g.camera.Story() < len(g.tower.Stories)-2 {
g.camera.SetStory(g.camera.Story() + 1)
g.selectedDude = nil
}
} else if inpututil.IsKeyJustPressed(ebiten.KeyS) || inpututil.IsKeyJustPressed(ebiten.KeyDown) {
g.camera.SetStory(g.camera.Story() - 1)
g.selectedDude = nil
}

if inpututil.IsKeyJustPressed(ebiten.Key1) {
Expand Down
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 d5c9cca

Please sign in to comment.