-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vote screen and revamped chatbox #252
Open
TheSecondReal0
wants to merge
26
commits into
opensuspect:main
Choose a base branch
from
TheSecondReal0:vote-screen-and-revamped-chatbox
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
5c9359e
Reorganized Chatbox
TheSecondReal0 770b50e
Created vote screen and reorganized chatbox
TheSecondReal0 5c0531b
Improved chatbox
TheSecondReal0 7da8d5b
Misc
TheSecondReal0 07588dc
infilitrator hud no longer blocks interactpoint buttons
TheSecondReal0 137b9a2
Added more vote functionality
TheSecondReal0 5f18f2f
Multiple different chatboxes can be synced and reorganized
TheSecondReal0 01074f9
Chatbox actually syncs now
TheSecondReal0 0d81069
Misc work on voteui
TheSecondReal0 493cfed
Merge remote-tracking branch 'upstream/main' into vote-screen-and-rev…
TheSecondReal0 1916a71
Misc merge, I don't know how to prevent this
TheSecondReal0 854cf9b
Merge pull request #1 from opensuspect/main
TheRyeGuyWhoWillNowDie 74ca34a
Merge branch 'main' into vote-screen-and-revamped-chatbox
TheRyeGuyWhoWillNowDie 2ee04ab
Reorganized Chatbox
TheSecondReal0 e71618e
Created vote screen and reorganized chatbox
TheSecondReal0 6e0d641
Improved chatbox
TheSecondReal0 7363ddd
Misc
TheSecondReal0 41a3bb0
Added more vote functionality
TheSecondReal0 2e54176
Multiple different chatboxes can be synced and reorganized
TheSecondReal0 b1bb846
Chatbox actually syncs now
TheSecondReal0 186fa65
Misc work on voteui
TheSecondReal0 cf02999
Misc merge, I don't know how to prevent this
TheSecondReal0 8c9c6eb
disabled movement while chatbox is open
TheSecondReal0 2b1b8fa
added vote ui interact point to test map
TheSecondReal0 a115f0a
Merge branch 'rebasing-vote-screen-revamped-chatbox' into vote-screen…
TheSecondReal0 6fa8bf4
polishing rebase
TheSecondReal0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,16 @@ var ui_list: Dictionary = { | |
"interactui": {"scene": preload("res://assets/ui/hud/interactui/interactui.tscn")}, | ||
"killui": {"scene": preload("res://assets/ui/hud/infiltrator_hud/infiltrator_hud.tscn")}, | ||
"rolescreen": {"scene": preload("res://assets/ui/hud/defaulthud/rolescreen/rolescreen.tscn")}, | ||
|
||
#common UI | ||
"pausemenu": {"scene": preload("res://assets/ui/pausemenu/pausemenu.tscn")}, | ||
"chatbox": {"scene": preload("res://assets/ui/lobbyui/chatbox/chatbox.tscn")}, | ||
"pausemenu": {"scene": preload("res://assets/ui/pausemenu/pausemenu.tscn")}, | ||
"keybind": {"scene": preload("res://assets/ui/submenus/settings/keybind/keybind.tscn")}, | ||
"appearance_editor": {"scene": preload("res://assets/ui/submenus/appearance_editor/appearance_editor.tscn")}, | ||
|
||
|
||
#lobby UI | ||
"chatbox": {"scene": preload("res://assets/ui/lobbyui/chatbox/chatbox.tscn")}, | ||
"voteui": {"scene": preload("res://assets/ui/lobbyui/voteui/voteui.tscn")}, | ||
|
||
#task UI | ||
"clockset": {"scene": preload("res://assets/ui/tasks/clockset/clockset.tscn")} | ||
} | ||
|
@@ -33,9 +36,7 @@ var ui_controller_node: Node | |
signal open_ui(ui_name, ui_data, reinstance) | ||
signal close_ui(ui_name, free) | ||
signal instance_ui(ui_name, ui_data) | ||
signal update_ui(ui_name, ui_data) | ||
signal free_ui(ui_name) | ||
signal close_all_ui() | ||
|
||
func _ready(): | ||
configfile = ConfigFile.new() | ||
|
@@ -51,10 +52,8 @@ func _ready(): | |
else: | ||
keybinds[key] = null | ||
set_game_binds() | ||
# warning-ignore:return_value_discarded | ||
# warning-ignore:return_value_discarded | ||
GameManager.connect("state_changed", self, "state_changed") | ||
# warning-ignore:return_value_discarded | ||
GameManager.connect("state_changed_priority", self, "state_changed_priority") | ||
|
||
#ui data is data to pass to the ui, such as a task identifier | ||
#reinstance is whether or not to recreate the corresponding ui node if it already exists | ||
|
@@ -75,19 +74,11 @@ func instance_ui(ui_name: String, ui_data: Dictionary = {}): | |
push_error("instance_ui() called with invalid ui name " + ui_name) | ||
emit_signal("instance_ui", ui_name, ui_data) | ||
|
||
func update_ui(ui_name: String, ui_data: Dictionary = {}): | ||
if not ui_list.keys().has(ui_name): | ||
push_error("update_ui() called with invalid ui name " + ui_name) | ||
emit_signal("update_ui", ui_name, ui_data) | ||
Comment on lines
-78
to
-81
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are these functions here removed? |
||
|
||
func free_ui(ui_name: String): | ||
if not ui_list.keys().has(ui_name): | ||
push_error("free_ui() called with invalid ui name " + ui_name) | ||
emit_signal("free_ui", ui_name) | ||
|
||
func close_all_ui(free: bool = false): | ||
emit_signal("close_all_ui", free) | ||
|
||
func get_ui(ui_name: String): | ||
if not ui_list.keys().has(ui_name): | ||
push_error("get_ui() called with invalid ui name " + ui_name) | ||
|
@@ -110,15 +101,11 @@ func ui_closed(menuName): | |
|
||
# warning-ignore:unused_argument | ||
func state_changed(old_state, new_state): | ||
if new_state == GameManager.State.Normal: | ||
pass | ||
if new_state == GameManager.State.Start: | ||
open_uis = [] | ||
|
||
func state_changed_priority(old_state, new_state, priority): | ||
if priority != 0: | ||
return | ||
if new_state == GameManager.State.Normal: | ||
# needs to call _on_ready to connect signals, before roles are assigned | ||
open_ui("rolescreen") | ||
Comment on lines
-115
to
-121
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By deleting this, the rolescreen doesn't appear in the end of the turn |
||
|
||
func in_ui() -> bool: | ||
return not open_uis.empty() | ||
|
||
|
@@ -142,12 +129,12 @@ func set_game_binds():#Set new binds | |
#Erases the key binds of previous action | ||
# warning-ignore:void_assignment | ||
erase = InputMap.action_erase_events(key) | ||
|
||
if value != null: | ||
var new_key = InputEventKey.new() | ||
new_key.set_scancode(value) | ||
InputMap.action_add_event(key, new_key) | ||
|
||
#print(keybinds) | ||
|
||
func write_config(): | ||
|
@@ -167,7 +154,7 @@ func write_keybinds(): | |
configFile.set_value("Keybinds","ui_down",int(83)) | ||
configFile.set_value("Keybinds","ui_left",int(65)) | ||
configFile.set_value("Keybinds","ui_right",int(68)) | ||
|
||
configFile.save(file) | ||
|
||
# warning-ignore:shadowed_variable | ||
|
Binary file not shown.
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The official terminology is "infiltrator" and "agent", please don't change it back.