mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-10 10:20:44 -07:00
Fixed HD flyover when logging out with resizable SD enabled
This commit is contained in:
parent
824f85c7b3
commit
7aab2d1735
2 changed files with 11 additions and 5 deletions
|
|
@ -162,7 +162,8 @@ public class PluginRepository {
|
|||
}
|
||||
|
||||
public static void OnLogout() {
|
||||
loadedPlugins.values().forEach(Plugin::OnLogout);
|
||||
List<Plugin> pluginsSnapshot = new ArrayList<>(loadedPlugins.values());
|
||||
pluginsSnapshot.forEach(Plugin::OnLogout);
|
||||
}
|
||||
|
||||
public static void DrawMiniMenu(MiniMenuEntry entry) {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ package ToggleResizableSD
|
|||
import plugin.Plugin
|
||||
import plugin.annotations.PluginMeta
|
||||
import plugin.api.API
|
||||
import rt4.DisplayMode
|
||||
import rt4.GameShell
|
||||
import rt4.InterfaceList
|
||||
import rt4.client
|
||||
import rt4.*
|
||||
import java.awt.event.KeyAdapter
|
||||
import java.awt.event.KeyEvent
|
||||
|
||||
|
|
@ -60,4 +57,12 @@ class plugin : Plugin() {
|
|||
toggleResizableSd()
|
||||
}
|
||||
}
|
||||
|
||||
override fun OnLogout() {
|
||||
if (DisplayMode.resizableSD) {
|
||||
DisplayMode.resizableSD = false
|
||||
//Because resizable SD always uses the "HD" size canvas/window mode (check the in-game Graphics Options with resizeable SD enabled if you don't believe me!), useHD becomes true when logging out, so logging out with resizeSD enabled means "HD" will always be enabled on the login screen after logging out, so we might as well fix the HD flyover by replacing the canvas and setting newMode to 2.
|
||||
DisplayMode.setWindowMode(true, 2, GameShell.frameWidth, GameShell.frameHeight)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue