implemented basic menu and options structure, most stuff works

This commit is contained in:
2024-05-30 19:45:13 +02:00
parent 7ed0c83fcd
commit 538216ea4d
8 changed files with 228 additions and 19 deletions

View File

@@ -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
}