Compare commits
No commits in common. "bd1d685c20634316881a276a6ac2b82728df764e" and "62cbe14170ea2312af5492a6a14980cb4dc62bfc" have entirely different histories.
bd1d685c20
...
62cbe14170
@ -5,13 +5,15 @@ import (
|
||||
"image/color"
|
||||
"log"
|
||||
|
||||
"opslag.de/schobers/fs/ricefs"
|
||||
"opslag.de/schobers/geom"
|
||||
"opslag.de/schobers/zntg"
|
||||
"opslag.de/schobers/zntg/addons/riceres"
|
||||
"opslag.de/schobers/zntg/addons/res"
|
||||
"opslag.de/schobers/zntg/play"
|
||||
"opslag.de/schobers/zntg/ui"
|
||||
|
||||
rice "github.com/GeertJohan/go.rice"
|
||||
"github.com/veandco/go-sdl2/sdl"
|
||||
"opslag.de/schobers/tins2020"
|
||||
)
|
||||
|
||||
@ -26,8 +28,9 @@ func main() {
|
||||
}
|
||||
|
||||
func openResources(box *rice.Box) ui.Resources {
|
||||
embedded := riceres.New(box)
|
||||
return ui.NewFallbackResources(ui.NewPathResources(nil, box.Name()), embedded)
|
||||
fs := ricefs.NewFs(box)
|
||||
resources, _ := res.NewAferoFallbackResources(`res`, fs, `botanim`)
|
||||
return resources
|
||||
}
|
||||
|
||||
type app struct {
|
||||
@ -134,9 +137,8 @@ func run() error {
|
||||
}
|
||||
defer settings.Store()
|
||||
|
||||
var location *geom.PointF32
|
||||
if settings.Window.Location != nil {
|
||||
location = &geom.PointF32{X: float32(settings.Window.Location.X), Y: float32(settings.Window.Location.Y)}
|
||||
if settings.Window.Location == nil {
|
||||
settings.Window.Location = ptPtr(sdl.WINDOWPOS_UNDEFINED, sdl.WINDOWPOS_UNDEFINED)
|
||||
}
|
||||
if settings.Window.Size == nil {
|
||||
settings.Window.Size = ptPtr(800, 600)
|
||||
@ -146,7 +148,7 @@ func run() error {
|
||||
settings.Window.VSync = &vsync
|
||||
}
|
||||
renderer, err := ui.NewRenderer("Botanim - TINS 2020", settings.Window.Size.X, settings.Window.Size.Y, ui.NewRendererOptions{
|
||||
Location: location,
|
||||
Location: &geom.PointF32{X: float32(settings.Window.Location.X), Y: float32(settings.Window.Location.Y)},
|
||||
Resizable: true,
|
||||
VSync: *settings.Window.VSync,
|
||||
})
|
||||
|
@ -1,6 +0,0 @@
|
||||
// +build windows,allegro
|
||||
|
||||
package main
|
||||
|
||||
// #cgo LDFLAGS: -Wl,-subsystem,windows
|
||||
import "C"
|
@ -107,16 +107,16 @@ func (c *GameControls) Init(ctx ui.Context) {
|
||||
b.DisabledColor = zntg.MustHexColor("#AFAFAF")
|
||||
}),
|
||||
NewIconButtonConfigure("control-save", c.askUserBeforeSave, func(b *IconButton) {
|
||||
b.Tooltip = "Save game (key: Ctrl+S)"
|
||||
b.Tooltip = "Save game"
|
||||
}),
|
||||
NewIconButtonConfigure("control-load", c.askUserBeforeLoad, func(b *IconButton) {
|
||||
b.Tooltip = "Load last saved game (key: Ctrl+L)"
|
||||
b.Tooltip = "Load last saved game"
|
||||
}),
|
||||
NewIconButtonConfigure("control-new", c.askUserBeforeNew, func(b *IconButton) {
|
||||
b.Tooltip = "Start new game (key: Ctrl+N)"
|
||||
b.Tooltip = "Start new game"
|
||||
}),
|
||||
NewIconButtonConfigure("control-information", c.dialogs.ShowIntro, func(b *IconButton) {
|
||||
b.Tooltip = "Show information/intro (key: Escape)"
|
||||
b.Tooltip = "Show information/intro"
|
||||
}),
|
||||
}
|
||||
for i, child := range c.menu.Children {
|
||||
|
Loading…
Reference in New Issue
Block a user