Skip to content

Commit

Permalink
Load from and store gui settings in current ApiProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
Griefed committed Sep 12, 2023
1 parent c88de30 commit 02ebcee
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import de.griefed.serverpackcreator.gui.window.settings.components.Editor
import javax.swing.JCheckBox
import javax.swing.JSlider

class GuiSettings(guiProps: GuiProps) : Editor("Gui", guiProps) {
class GuiSettings(private val guiProps: GuiProps) : Editor("Gui", guiProps) {

val fontSizeIcon = StatusIcon(guiProps,"Size of fonts in ServerPackCreators GUI.")

Check notice on line 32 in serverpackcreator-gui/src/main/kotlin/de/griefed/serverpackcreator/gui/window/settings/GuiSettings.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Class member can have 'private' visibility

Property 'fontSizeIcon' could be private
val fontSizeLabel = ElementLabel("Font Size")

Check notice on line 33 in serverpackcreator-gui/src/main/kotlin/de/griefed/serverpackcreator/gui/window/settings/GuiSettings.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Class member can have 'private' visibility

Property 'fontSizeLabel' could be private
Expand Down Expand Up @@ -90,10 +90,14 @@ class GuiSettings(guiProps: GuiProps) : Editor("Gui", guiProps) {
}

override fun loadSettings() {
TODO("Not yet implemented")
fontSizeSetting.value = guiProps.fontSize
startFocusSetting.isSelected = guiProps.startFocusEnabled
generationFocusSetting.isSelected = guiProps.generationFocusEnabled
}

override fun saveSettings() {
TODO("Not yet implemented")
guiProps.fontSize = fontSizeSetting.value
guiProps.startFocusEnabled = startFocusSetting.isSelected
guiProps.generationFocusEnabled = generationFocusSetting.isSelected
}
}

0 comments on commit 02ebcee

Please sign in to comment.