mirror of
https://codeberg.org/scip/golsky.git
synced 2025-12-16 20:20:57 +01:00
added wrap option to option popup
This commit is contained in:
@@ -259,3 +259,7 @@ func (config *Config) ToggleGridlines() {
|
||||
func (config *Config) ToggleEvolution() {
|
||||
config.ShowEvolution = !config.ShowEvolution
|
||||
}
|
||||
|
||||
func (config *Config) ToggleWrap() {
|
||||
config.Wrap = !config.Wrap
|
||||
}
|
||||
|
||||
@@ -111,6 +111,12 @@ func (scene *SceneOptions) Init() {
|
||||
})
|
||||
scene.SetInitialValue(evolution, scene.Config.ShowEvolution)
|
||||
|
||||
wrap := NewCheckbox("Wrap around edges",
|
||||
func(args *widget.CheckboxChangedEventArgs) {
|
||||
scene.Config.ToggleWrap()
|
||||
})
|
||||
scene.SetInitialValue(wrap, scene.Config.Wrap)
|
||||
|
||||
separator := NewSeparator(3)
|
||||
|
||||
cancel := NewMenuButton("Close",
|
||||
@@ -123,6 +129,7 @@ func (scene *SceneOptions) Init() {
|
||||
rowContainer.AddChild(invert)
|
||||
rowContainer.AddChild(gridlines)
|
||||
rowContainer.AddChild(evolution)
|
||||
rowContainer.AddChild(wrap)
|
||||
rowContainer.AddChild(separator)
|
||||
rowContainer.AddChild(cancel)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user