-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IMPROVEMENT: Render quality slider and filter button implemented. Bac…
…kspace now hides the bottom bar.
- Loading branch information
Showing
9 changed files
with
103 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,35 @@ | ||
extends Viewport | ||
|
||
export var scale_factor = 0.65 | ||
# Values. | ||
# TODO: Throw it into options and sync with slider | ||
var screen_res_factor = 0.7 | ||
# Objects. | ||
# Parameters. | ||
# Nodes. | ||
var signals = Node | ||
|
||
func _ready(): | ||
self.get_texture().flags = Texture.FLAG_FILTER | ||
self.size = Vector2(1024, 600)*scale_factor | ||
# ======================Z====== Initialize nodes =========================== | ||
signals = get_node("/root/Cont/View/Main/Input/Signals") | ||
# ============================ Connect signals ============================ | ||
signals.connect("sig_screen_filter_on", self, "is_screen_filter_on") | ||
signals.connect("sig_viewport_update", self, "is_viewport_update") | ||
signals.connect("sig_screen_res_value_changed", self, "is_screen_res_value_changed") | ||
# ========================================================================= | ||
|
||
|
||
# ============================ Signal processing ============================== | ||
func is_screen_filter_on(flag): | ||
if flag: | ||
self.get_texture().flags = Texture.FLAG_FILTER | ||
print("ON") | ||
else: | ||
self.get_texture().flags = !Texture.FLAG_FILTER | ||
print("OFF") | ||
|
||
func is_viewport_update(): | ||
self.size = OS.window_size*screen_res_factor | ||
|
||
# TODO: implement ratio setting, factor, size | ||
|
||
func _on_View_size_changed(): | ||
self.size = Vector2(1024, 600)*scale_factor | ||
func is_screen_res_value_changed(value): | ||
screen_res_factor = value | ||
self.size = OS.window_size*screen_res_factor |