HAXXX: make the main game UI appear at the bottom

This commit is contained in:
2020-04-19 20:57:45 +01:00
parent c058f651dc
commit 1f4bfc771c
6 changed files with 83 additions and 19 deletions

View File

@@ -2,6 +2,7 @@ package menus
import (
"fmt"
"image"
"image/color"
"io/ioutil"
"path/filepath"
@@ -134,6 +135,14 @@ type Properties struct {
Help string
}
func (p *Properties) Point() image.Point {
if p.X > 0 || p.Y > 0 {
return image.Pt(p.X, p.Y)
}
return image.Point{}
}
func LoadMenu(filename string) (*Menu, error) {
name := filepath.Base(filename)
name = strings.TrimSuffix(name, filepath.Ext(name))