aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/global.gd15
-rw-r--r--client/menu/communicate/item/item_message.gd4
-rw-r--r--client/settings.gd18
3 files changed, 18 insertions, 19 deletions
diff --git a/client/global.gd b/client/global.gd
index c3f1ef55..732363ee 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -247,3 +247,18 @@ class ParsedItem:
var c = Array(full_name.split(":"))
name = c[0]
contents = c[1].split(",") if c.size() > 1 else []
+
+func configure_viewport_aa(vp: Viewport, aa: String) -> void:
+ match aa:
+ "disabled":
+ vp.msaa_3d = Viewport.MSAA_DISABLED
+ vp.screen_space_aa = Viewport.SCREEN_SPACE_AA_DISABLED
+ "fx":
+ vp.msaa_3d = Viewport.MSAA_DISABLED
+ vp.screen_space_aa = Viewport.SCREEN_SPACE_AA_FXAA
+ "ms2x":
+ vp.msaa_3d = Viewport.MSAA_2X
+ vp.screen_space_aa = Viewport.SCREEN_SPACE_AA_DISABLED
+ "ms4x":
+ vp.msaa_3d = Viewport.MSAA_4X
+ vp.screen_space_aa = Viewport.SCREEN_SPACE_AA_DISABLED
diff --git a/client/menu/communicate/item/item_message.gd b/client/menu/communicate/item/item_message.gd
index 53e6ff22..b99e8552 100644
--- a/client/menu/communicate/item/item_message.gd
+++ b/client/menu/communicate/item/item_message.gd
@@ -25,8 +25,8 @@ var timeout_initial := 0.
@onready var sub_viewport: SubViewport = $VBoxContainer/SubViewportContainer/SubViewport
@onready var v_box_container: VBoxContainer = $VBoxContainer
-#func _init():
-# progress_style = progress_style.duplicate()
+func _ready() -> void:
+ Global.configure_viewport_aa(sub_viewport, Global.get_setting("graphics.aa"))
func set_subviewport_size(sub_viewport_size: Vector2):
sub_viewport.size = sub_viewport_size
diff --git a/client/settings.gd b/client/settings.gd
index dec3ef2e..667ffa41 100644
--- a/client/settings.gd
+++ b/client/settings.gd
@@ -116,23 +116,7 @@ static func apply_initial():
static func h_aa(mode):
var vp = Global.get_viewport()
- match mode:
- "disabled":
- vp.msaa_2d = Viewport.MSAA_DISABLED
- vp.msaa_3d = Viewport.MSAA_DISABLED
- vp.screen_space_aa = Viewport.SCREEN_SPACE_AA_DISABLED
- "fx":
- vp.msaa_2d = Viewport.MSAA_DISABLED
- vp.msaa_3d = Viewport.MSAA_DISABLED
- vp.screen_space_aa = Viewport.SCREEN_SPACE_AA_FXAA
- "ms2x":
- vp.msaa_2d = Viewport.MSAA_2X
- vp.msaa_3d = Viewport.MSAA_2X
- vp.screen_space_aa = Viewport.SCREEN_SPACE_AA_DISABLED
- "ms4x":
- vp.msaa_2d = Viewport.MSAA_4X
- vp.msaa_3d = Viewport.MSAA_4X
- vp.screen_space_aa = Viewport.SCREEN_SPACE_AA_DISABLED
+ Global.configure_viewport_aa(vp, mode)
static func h_taa(enabled):
Global.get_viewport().use_taa = enabled