diff --git a/plugin-playground/src/main/kotlin/ToggleResizableSD/plugin.kt b/plugin-playground/src/main/kotlin/ToggleResizableSD/plugin.kt index c60c8cb..34f9479 100644 --- a/plugin-playground/src/main/kotlin/ToggleResizableSD/plugin.kt +++ b/plugin-playground/src/main/kotlin/ToggleResizableSD/plugin.kt @@ -39,15 +39,21 @@ class plugin : Plugin() { if (!osNameLowerCase.startsWith("mac")) { wantHd = true } - //Alternatively, we could just force HD off here, if we want: - //wantHd = false + if (API.GetData("want-hd") == false) { + wantHd = false + } } override fun ProcessCommand(commandStr: String, args: Array?) { when(commandStr.toLowerCase()) { - "::resizablesd" -> { + "::toggleresizablesd", "::resizablesd", "::togglersd", "::rsd" -> { toggleResize = true //We could call toggleResizableSd() directly here, but it's not necessary. } + "::toggleresizablesdhd", "::resizablesdhd", "::togglersdhd", "::rsdhd", -> { + wantHd = !wantHd + API.StoreData("want-hd", wantHd) + API.SendMessage("You have turned login screen HD " + (if (wantHd) "on" else "off")) + } } }