mirror of
https://codeberg.org/scip/golsky.git
synced 2025-12-16 20:20:57 +01:00
calculating zoom factor based on cellsize
This commit is contained in:
@@ -50,7 +50,7 @@ const (
|
|||||||
DEFAULT_GRID_WIDTH = 600
|
DEFAULT_GRID_WIDTH = 600
|
||||||
DEFAULT_GRID_HEIGHT = 400
|
DEFAULT_GRID_HEIGHT = 400
|
||||||
DEFAULT_CELLSIZE = 4
|
DEFAULT_CELLSIZE = 4
|
||||||
DEFAULT_ZOOMFACTOR = 150
|
DEFAULT_ZOOMFACTOR = 400
|
||||||
DEFAULT_GEOM = "640x384"
|
DEFAULT_GEOM = "640x384"
|
||||||
DEFAULT_THEME = "standard" // "light" // inverse => "dark"
|
DEFAULT_THEME = "standard" // "light" // inverse => "dark"
|
||||||
)
|
)
|
||||||
@@ -75,7 +75,7 @@ const KEYBINDINGS string = `
|
|||||||
`
|
`
|
||||||
|
|
||||||
func (config *Config) SetupCamera() {
|
func (config *Config) SetupCamera() {
|
||||||
config.Zoomfactor = DEFAULT_ZOOMFACTOR
|
config.Zoomfactor = DEFAULT_ZOOMFACTOR / config.Cellsize
|
||||||
|
|
||||||
// calculate the initial cam pos. It is negative if the total grid
|
// calculate the initial cam pos. It is negative if the total grid
|
||||||
// size is smaller than the screen in a centered position, but
|
// size is smaller than the screen in a centered position, but
|
||||||
@@ -129,7 +129,7 @@ func (config *Config) ParseGeom(geom string) error {
|
|||||||
config.ScreenWidth = width
|
config.ScreenWidth = width
|
||||||
config.ScreenHeight = height
|
config.ScreenHeight = height
|
||||||
|
|
||||||
config.Cellsize = DEFAULT_CELLSIZE
|
//config.Cellsize = DEFAULT_CELLSIZE
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user