chore: client default size & dark theme backgroud
This commit is contained in:
+6
-1
@@ -192,6 +192,9 @@ func (e *client) BuildUI(w fyne.Window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *client) loadWorld(w *world.World) {
|
func (e *client) loadWorld(w *world.World) {
|
||||||
|
if w == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
w.SetCircleRadiusScaleFp(world.SCALE / 4)
|
w.SetCircleRadiusScaleFp(world.SCALE / 4)
|
||||||
e.world = w
|
e.world = w
|
||||||
// TODO: store camera position in user settings
|
// TODO: store camera position in user settings
|
||||||
@@ -218,9 +221,11 @@ func (e *client) loadWorld(w *world.World) {
|
|||||||
|
|
||||||
func (e *client) Run() error {
|
func (e *client) Run() error {
|
||||||
e.BuildUI(e.window)
|
e.BuildUI(e.window)
|
||||||
e.window.SetMaster()
|
|
||||||
e.startBackground()
|
e.startBackground()
|
||||||
e.RequestRefresh()
|
e.RequestRefresh()
|
||||||
|
e.window.SetMaster()
|
||||||
|
e.window.Resize(fyne.NewSize(800, 600))
|
||||||
|
e.window.CenterOnScreen()
|
||||||
e.window.ShowAndRun()
|
e.window.ShowAndRun()
|
||||||
e.stopBackground()
|
e.stopBackground()
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -189,8 +189,9 @@ func (*DarkTheme) Name() string { return "Dark (Soft + Texture)" }
|
|||||||
|
|
||||||
func (*DarkTheme) BackgroundColor() color.Color { return cRGBA(30, 32, 38, 255) } // #1E2026
|
func (*DarkTheme) BackgroundColor() color.Color { return cRGBA(30, 32, 38, 255) } // #1E2026
|
||||||
func (t *DarkTheme) BackgroundImage() image.Image {
|
func (t *DarkTheme) BackgroundImage() image.Image {
|
||||||
|
return nil
|
||||||
// This image is immutable after creation.
|
// This image is immutable after creation.
|
||||||
return t.bg
|
// return t.bg
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*DarkTheme) BackgroundTileMode() BackgroundTileMode { return BackgroundTileRepeat }
|
func (*DarkTheme) BackgroundTileMode() BackgroundTileMode { return BackgroundTileRepeat }
|
||||||
|
|||||||
Reference in New Issue
Block a user