mirror of
https://codeberg.org/scip/golsky.git
synced 2025-12-17 04:30:57 +01:00
implemented basic menu and options structure, most stuff works
This commit is contained in:
15
config.go
15
config.go
@@ -27,6 +27,8 @@ type Config struct {
|
||||
Wrap bool // wether wraparound mode is in place or not
|
||||
ShowVersion bool
|
||||
UseShader bool // to use a shader to render alife cells
|
||||
Restart bool
|
||||
StartWithMenu bool
|
||||
|
||||
// for internal profiling
|
||||
ProfileFile string
|
||||
@@ -209,3 +211,16 @@ func ParseCommandline() (*Config, error) {
|
||||
func (config *Config) TogglePaused() {
|
||||
config.Paused = !config.Paused
|
||||
}
|
||||
|
||||
func (config *Config) ToggleDebugging() {
|
||||
fmt.Println("DEBUG TOGGLED")
|
||||
config.Debug = !config.Debug
|
||||
}
|
||||
|
||||
func (config *Config) ToggleInvert() {
|
||||
config.Invert = !config.Invert
|
||||
}
|
||||
|
||||
func (config *Config) ToggleGridlines() {
|
||||
config.NoGrid = !config.NoGrid
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user