Added call function.

This commit is contained in:
mono 2022-06-28 21:51:50 +02:00
parent 922e5f778d
commit 0d6a00d432
152 changed files with 1788 additions and 122 deletions

View File

@ -0,0 +1,3 @@
source_md5="65887843cb9e3f314672714c33e5c80c"
dest_md5="e634cce8794e713a0204ac6665cce260"

View File

@ -0,0 +1,3 @@
source_md5="bd833f3f857ec3c97b54188096171119"
dest_md5="6597d56ed5e8f3497b427b2491b88e3b"

View File

@ -0,0 +1,3 @@
source_md5="ec6962b5da25c9a1c423db7010bad687"
dest_md5="8d6531273cead91578845851499e095b"

View File

@ -0,0 +1,3 @@
source_md5="8ddba6805dbefd0c82dfa792fc196cc0"
dest_md5="af0e03ec5b47e62a9fb5f7e3313f3dfb"

View File

@ -0,0 +1,3 @@
source_md5="ddf51718025a81777b02ba6bdf289c49"
dest_md5="34dd14e343c7cf783ea2c67b5f585bb1"

View File

@ -0,0 +1,3 @@
source_md5="77d4fca710d75112782629583d9b740c"
dest_md5="cd334a4b25cab7fa58485412f57359c0"

View File

@ -0,0 +1,3 @@
source_md5="79b3677527880574b6917b1fa9e9dc16"
dest_md5="22357d48ebaea669b019fbf8000d2e02"

View File

@ -0,0 +1,3 @@
source_md5="444c4516f46c4807667d8eb2ead11c6f"
dest_md5="97ed87635856ee8e8700631948925a18"

View File

@ -0,0 +1,3 @@
source_md5="9b590bd832f918054446ac9a4dccd19b"
dest_md5="5f9089446672bf1c5a7f0b920392e9b0"

View File

@ -0,0 +1,3 @@
source_md5="4d958eafe259b85ab0a3bd173c11bc2c"
dest_md5="fdbbbe040cd8478804ff155921a4c49a"

View File

@ -0,0 +1,3 @@
source_md5="56c8d7639e14f827309259f304cd7fe5"
dest_md5="b92639d4fad501a4ef29861caad5401f"

View File

@ -0,0 +1,3 @@
source_md5="87ea57e2033a8a6a1bf412eb78520fbd"
dest_md5="a31c6c68e3ff653886f24fda9cd6efe5"

View File

@ -0,0 +1,3 @@
source_md5="6b57a81861cb2fd762d65cbcc9a7f13f"
dest_md5="571c20090131492ae162f4f25145526b"

View File

@ -0,0 +1,3 @@
source_md5="36623d069b485b709ccba7950f821e19"
dest_md5="039c7f94933d9890d0fdecedc7ee9e46"

Binary file not shown.

View File

@ -0,0 +1,3 @@
source_md5="37189b32eb93cc04e61b046789dab6eb"
dest_md5="f8050a4a22fe61b460321869f09c7b0b"

View File

@ -0,0 +1,3 @@
source_md5="f98f23226d4bd3f848ac1a0c29af184b"
dest_md5="b5688b2575d68ead81b4bedaea0aba2f"

View File

@ -0,0 +1,3 @@
source_md5="72b98824d5b5e0105330376222014227"
dest_md5="a863cb9a37ac3a6023e42f2b1660b8a0"

View File

@ -0,0 +1,3 @@
source_md5="ffcd2543547a0b7befcc541d7be8ac55"
dest_md5="61dc498db30cb867457879319a1eb873"

View File

@ -0,0 +1,3 @@
source_md5="eca1cf9e0e3a87ae1926c96bb799563b"
dest_md5="7955dc8bbbc8f31034ca16e4d2d71f44"

View File

@ -0,0 +1,3 @@
source_md5="cebb0d65b47778589290a06a84b17a0d"
dest_md5="8b0573861334a96a007520bc6f097b51"

View File

@ -1,3 +1,3 @@
source_md5="ceec25b08b0d0ebb65b34989f2ac10b2"
dest_md5="34ea352b537e79967ccf8d818710414f"
source_md5="cebb0d65b47778589290a06a84b17a0d"
dest_md5="8b0573861334a96a007520bc6f097b51"

View File

@ -0,0 +1,3 @@
source_md5="b61d3993601a6ab00cada486c575f1ab"
dest_md5="af3c38cb5d6ac874c32b0c08d4256766"

View File

@ -0,0 +1,3 @@
source_md5="6d8758139038c2a96a44c5a9d4768c66"
dest_md5="f59a0326fbe90c08fa9e0e47288c11b6"

View File

@ -0,0 +1,3 @@
source_md5="6d8758139038c2a96a44c5a9d4768c66"
dest_md5="f59a0326fbe90c08fa9e0e47288c11b6"

View File

@ -0,0 +1,3 @@
source_md5="6d8758139038c2a96a44c5a9d4768c66"
dest_md5="f59a0326fbe90c08fa9e0e47288c11b6"

View File

@ -0,0 +1,3 @@
source_md5="0a811ca5c8216b31e43b0c9d6381aa74"
dest_md5="276050e6954660279ecd0e05d517e74d"

View File

@ -0,0 +1,3 @@
source_md5="b58ab8a05a490ccd88b7feab51e26377"
dest_md5="d463371567af870e1664fbb3c8c75b88"

View File

@ -0,0 +1,3 @@
source_md5="f04219911999080ca24a619d4ca7f335"
dest_md5="a9e34d284aa4e706f15a17499bfb645e"

View File

@ -0,0 +1,3 @@
source_md5="45f2c86b387aec8066f8e156c2389950"
dest_md5="cf17fafb6e457c5543dc1a9f3cf2aed6"

View File

@ -0,0 +1,3 @@
source_md5="1b5390fb13d561dad8128bf91a33eb4e"
dest_md5="458c03ca20d395b63bea76f2b11b8b84"

View File

@ -0,0 +1,3 @@
source_md5="2ff41d92f6b13a1d03bf8f7bc70c61e3"
dest_md5="f0db47e5a20c83f6a1b258dd60a31128"

View File

@ -0,0 +1,3 @@
source_md5="c99f4f69ab16efc09489c22c7256d8cc"
dest_md5="3f93d137838e497e3fbc5e11d736e11c"

View File

@ -13,9 +13,10 @@ popup_menu_color = Color( 0.321569, 0.133333, 0.258824, 1 )
own_message_color = Color( 0.380392, 0.152941, 0.27451, 1 )
others_message_color = Color( 0.294118, 0.168627, 0.34902, 1 )
scroll_bar_color = Color( 0.372549, 0.137255, 0.286275, 1 )
scroll_bar_highlight_color = Color( 0.760784, 0.34902, 0.964706, 1 )
scroll_bar_highlight_color = Color( 0.52549, 0.321569, 0.623529, 1 )
scroll_bar_pressed_color = Color( 1, 0.631373, 0.701961, 1 )
casual_topic_color = Color( 0.415686, 0.168627, 0.298039, 1 )
daily_topic_color = Color( 0.341176, 0.168627, 0.337255, 1 )
urgent_topic_color = Color( 0.352941, 0.129412, 0.243137, 1 )
add_topic_button_color = Color( 0.745098, 0.301961, 0.521569, 1 )
call_background_color = Color( 0.290196, 0.0666667, 0.207843, 1 )

View File

@ -19,3 +19,4 @@ casual_topic_color = Color( 0.14902, 0.172549, 0.203922, 1 )
daily_topic_color = Color( 0.0980392, 0.180392, 0.305882, 1 )
urgent_topic_color = Color( 0.290196, 0.152941, 0.203922, 1 )
add_topic_button_color = Color( 0.231373, 0.266667, 0.321569, 1 )
call_background_color = Color( 0.0784314, 0.0901961, 0.301961, 1 )

View File

@ -1,3 +1,16 @@
[gd_resource type="AudioBusLayout" format=2]
[gd_resource type="AudioBusLayout" load_steps=2 format=2]
[sub_resource type="AudioEffectSpectrumAnalyzer" id=1]
resource_name = "SpectrumAnalyzer"
buffer_length = 0.1
fft_size = 0
[resource]
bus/1/name = "Recorder"
bus/1/solo = false
bus/1/mute = true
bus/1/bypass_fx = false
bus/1/volume_db = 0.0
bus/1/send = "Master"
bus/1/effect/0/effect = SubResource( 1 )
bus/1/effect/0/enabled = true

View File

@ -102,6 +102,10 @@ config/name="SelfMessenger"
run/main_scene="res://user_interface/main.tscn"
config/icon="res://icon.png"
[audio]
enable_audio_input=true
[autoload]
Data="*res://system/data/data_singleton.gd"

BIN
sounds/call_left.wav Normal file

Binary file not shown.

View File

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/call_left.wav-cb1676933b0dd5bc9fb8c01e9c67c91a.sample"
[deps]
source_file="res://sounds/call_left.wav"
dest_files=[ "res://.import/call_left.wav-cb1676933b0dd5bc9fb8c01e9c67c91a.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0

BIN
sounds/call_requested.wav Normal file

Binary file not shown.

View File

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/call_requested.wav-7b5ae508e5cfe6687362e0994586fc1d.sample"
[deps]
source_file="res://sounds/call_requested.wav"
dest_files=[ "res://.import/call_requested.wav-7b5ae508e5cfe6687362e0994586fc1d.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=true
compress/mode=0

BIN
sounds/mute.wav Normal file

Binary file not shown.

21
sounds/mute.wav.import Normal file
View File

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/mute.wav-dc1deab4311f362f84e52df9f218fcd2.sample"
[deps]
source_file="res://sounds/mute.wav"
dest_files=[ "res://.import/mute.wav-dc1deab4311f362f84e52df9f218fcd2.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0

BIN
sounds/unmute.wav Normal file

Binary file not shown.

21
sounds/unmute.wav.import Normal file
View File

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/unmute.wav-ceabb8573bbc427b75d71f10bb987d7d.sample"
[deps]
source_file="res://sounds/unmute.wav"
dest_files=[ "res://.import/unmute.wav-ceabb8573bbc427b75d71f10bb987d7d.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0

BIN
sounds/user_joined.wav Normal file

Binary file not shown.

View File

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/user_joined.wav-1f3374bde821efef06ce7951e4a7d031.sample"
[deps]
source_file="res://sounds/user_joined.wav"
dest_files=[ "res://.import/user_joined.wav-1f3374bde821efef06ce7951e4a7d031.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0

View File

@ -2,11 +2,105 @@ extends Node
# warning-ignore:unused_signal
signal requested
signal accepted
signal closed
signal mute_toggled(value)
signal microphone_input_state_changed
var is_call_active: bool = false
var muted: bool = false
const MUTE_SOUND = preload("res://sounds/mute.wav")
const UNMUTE_SOUND = preload("res://sounds/unmute.wav")
var is_active: bool = false
var is_accepted: bool = false
var is_muted: bool = false
var spectrum_analyizer: AudioEffectSpectrumAnalyzerInstance
var audio_stream_player: AudioStreamPlayer
var audio_stream_microphone: AudioStreamPlayer
var microphone_magnitude: float
var microphone_input_detected = false
var activity_value = 1.0
var activity_velocity = 0.0
func _ready():
var idx = AudioServer.get_bus_index("Recorder")
spectrum_analyizer = AudioServer.get_bus_effect_instance(idx, 0)
audio_stream_microphone = AudioStreamPlayer.new()
audio_stream_microphone.stream = AudioStreamMicrophone.new()
audio_stream_microphone.bus = "Recorder"
audio_stream_microphone.autoplay = true
add_child(audio_stream_microphone)
audio_stream_player = AudioStreamPlayer.new()
add_child(audio_stream_player)
var t = 0.0
func _process(delta):
var interval = 0.04
t += delta
while t > interval:
_check_for_microphone_input()
t -= interval
_check_for_hit_up(delta)
func request_call():
#emit_signal("requested")
pass
is_active = true
_reset_activity_stats()
emit_signal("requested")
func close_call():
is_active = false
is_accepted = false
emit_signal("closed")
func toggle_mute():
if is_muted:
audio_stream_player.stream = UNMUTE_SOUND
else:
audio_stream_player.stream = MUTE_SOUND
audio_stream_player.play()
is_muted = !is_muted
emit_signal("mute_toggled", is_muted)
func _check_for_microphone_input():
microphone_magnitude *= 0.92
var magnitude = spectrum_analyizer.get_magnitude_for_frequency_range(
80.0, 255.0, AudioEffectSpectrumAnalyzerInstance.MAGNITUDE_MAX
).length()
if microphone_magnitude < magnitude:
microphone_magnitude = magnitude
var above_threshold = Settings.microphone_threshold < microphone_magnitude
if above_threshold != microphone_input_detected:
microphone_input_detected = above_threshold
emit_signal("microphone_input_state_changed")
func _check_for_hit_up(delta): # Rather helper account should ping or not.
if not is_active:
return
if is_muted:
activity_velocity += delta * 0.5
else:
activity_velocity += delta * (1.3 if microphone_input_detected else -1.2)
activity_velocity = clamp(activity_velocity, -1.0, 1.0)
var delay = 0.066 / (1.0 + PingSystem.unhandled_ping_list.size() * 1.5)
activity_value += activity_velocity * delta * delay
activity_value = clamp(activity_value, -0.2, 1.0)
if activity_value <= 0.0:
PingSystem.send_ping(Time.get_current_time())
_reset_activity_stats()
func _reset_activity_stats():
activity_value = 1.0
activity_velocity = 0.0

View File

@ -23,6 +23,7 @@ func delete():
func edit(new_content: String):
content = new_content
Data.messages.dirty_flag = true
Data.messages.emit_signal("message_edited")
# Used by the MessageFeed, to spawn message nodes.

View File

@ -3,6 +3,8 @@ class_name MessageData
signal message_added(message)
signal message_group_added(message_group)
# warning-ignore:unused_signal
signal message_edited
const FILE_NAME = "message_history.dat"
const MAX_MESSAGES = 200
@ -104,8 +106,4 @@ func _add_message_group(time_stamp, user) -> MessageGroup:
message_group.time_stamp = time_stamp
loaded_message_groups.append(message_group)
emit_signal("message_group_added", message_group)
# var container = message_group.create_container()
# UI.message_feed_container.add_child(container)
return message_group

View File

@ -4,7 +4,8 @@ class_name MiscellaneousData
const FILE_NAME = "miscellaneous.dat"
var dirty_flag = false
var lkp_time_stamp = 0 # last_key_press_time_stamp
var big_interaction = 0 # Time stamp of last sent or filled out message.
var small_interaction = 0 # Time stamp of last key press
func load_data():
@ -17,14 +18,17 @@ func load_data():
printerr("\"" + FILE_NAME + "\" was found, but is corrupted.")
return
var data = parse_json(json_string)
if data.has("lkpts"):
lkp_time_stamp = data["lkpts"]
if data.has("big_interaction"):
big_interaction = data["big_interaction"]
if data.has("small_interaction"):
small_interaction = data["small_interaction"]
func save_data():
if dirty_flag:
var data = {
"lkpts" : lkp_time_stamp
"big_interaction" : big_interaction,
"small_interaction" : small_interaction,
}
var json_string = to_json(data)
var file = File.new()

View File

@ -4,12 +4,11 @@ extends Node
signal ping_handled(ping)
const AUTO_PING_ENABLED = true
const MAX_PINGS_ALLOWED = 8
const MAX_PINGS_ALLOWED = 6
onready var ping_sound = get_node("PingSound")
var unhandled_ping_list = []
var _unhandled_ping_count = 0
var total_ping_count = 0
var current_ping_id = 0
@ -42,22 +41,22 @@ func send_ping(time_stamp: int):
func reschedule_pings():
scheduled_pings.clear()
var lmbp_time_stamp = _get_lmbp_time_stamp()
var big_interaction = Data.miscellaneous.big_interaction
var lkp_time_stamp = Data.miscellaneous.lkp_time_stamp # last_key_press_time_stamp
var small_interaction = Data.miscellaneous.small_interaction # last_key_press_time_stamp
var last_t_s_of_interaction = max(lmbp_time_stamp, lkp_time_stamp)
var last_t_s_of_interaction = max(big_interaction, small_interaction)
seed(last_t_s_of_interaction)
var minimum_t_s_for_next_ping
minimum_t_s_for_next_ping = max(
lmbp_time_stamp + _get_time_until_next_ping(),
lkp_time_stamp + 30
big_interaction + _get_time_until_next_ping(),
small_interaction + 30
)
var previous_time_stamp = minimum_t_s_for_next_ping
for _i in range(8):
for i in range(8):
if not _is_time_stamp_during_active_phase(previous_time_stamp):
previous_time_stamp = Time.get_current_phase_skipped(
previous_time_stamp
@ -68,29 +67,19 @@ func reschedule_pings():
keep_pinging = randi() % 100 < 30 # 30% chance.
if keep_pinging:
previous_time_stamp += randi() % 6
previous_time_stamp += _get_time_until_next_ping()
func _get_lmbp_time_stamp():
var lmbp # last_message_by_primary
lmbp = Data.messages.get_last_message_of_user(
Users.get_primary()
)
if lmbp:
return lmbp.time_stamp
else:
return Time.get_current_time() # Just act as if just sent.
previous_time_stamp += _get_time_until_next_ping() + i * 2400
func _is_time_stamp_during_active_phase(time_stamp: int) -> bool:
var big_interaction = Data.miscellaneous.big_interaction
if Time.is_during_night_time(time_stamp):
return false
elif Time.is_during_inactive_time(time_stamp):
return Time.is_during_inactive_time(_get_lmbp_time_stamp())
return Time.is_during_inactive_time(big_interaction)
elif Time.is_during_active_time(time_stamp):
return true
else:
return Time.is_during_calm_down_time(_get_lmbp_time_stamp())
return Time.is_during_calm_down_time(big_interaction)
func _get_time_until_next_ping() -> int:

View File

@ -6,6 +6,9 @@ signal settings_menu_requested
var menu_open = false
# Microphone.
var microphone_threshold = 0.008
# Ping System behavior.
var inactive_time = 7
var active_time = 15

View File

@ -16,6 +16,7 @@ export(Color) var casual_topic_color
export(Color) var daily_topic_color
export(Color) var urgent_topic_color
export(Color) var add_topic_button_color
export(Color) var call_background_color
var message_box_content: String = ""

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/call_background.png-febb68c673359f8512b0b1b1fceb9195.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://user_interface/call_panel/call_background.png"
dest_files=[ "res://.import/call_background.png-febb68c673359f8512b0b1b1fceb9195.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@ -0,0 +1,83 @@
extends CenterContainer
const PROFILE_IMAGE_RECT_MASK = preload("res://user_interface/utility_controls/profile_image_rect/profile_image_rect_mask.png")
const PROFILE_IMAGE_RECT_MASK_WITH_MUTED_SLOT = preload("res://user_interface/call_panel/profile_image_rect_mask_with_muted_slot.png")
onready var mic_indicator = get_node("MicIndicator")
onready var profile_picture = get_node("ProfilePicture")
onready var muted_indicator = get_node("ProfilePicture/MutedIndicator")
var associated_user: User setget _set_associated_user
var picture_size: int setget _set_picture_size
var visibility: float setget _set_visibility
func _ready():
# warning-ignore:return_value_discarded
Call.connect("mute_toggled", self, "_on_mute_toggled")
# warning-ignore:return_value_discarded
Call.connect("accepted", self, "_check_if_muted")
# warning-ignore:return_value_discarded
Call.connect("closed", self, "_check_if_muted")
# warning-ignore:return_value_discarded
Call.connect(
"microphone_input_state_changed",
self,
"_on_microphone_input_state_changed"
)
func _check_if_muted():
if _is_valid():
if not Call.is_muted:
_change_mute_indication(false)
return
if name == "RightMember" and not Call.is_accepted:
_change_mute_indication(false)
return
_change_mute_indication(true)
func _check_if_microphone_input():
if _is_valid() and not Call.is_muted:
if not (Users.get_helper().is_current() and not Call.is_accepted):
mic_indicator.visible = Call.microphone_input_detected
return
mic_indicator.visible = false
func _change_mute_indication(muted):
if muted:
profile_picture.mask = PROFILE_IMAGE_RECT_MASK_WITH_MUTED_SLOT
muted_indicator.visible = true
else:
profile_picture.mask = PROFILE_IMAGE_RECT_MASK
muted_indicator.visible = false
func _on_mute_toggled(_value):
_check_if_microphone_input()
_check_if_muted()
func _on_microphone_input_state_changed():
_check_if_microphone_input()
func _is_valid():
return associated_user == Users.get_primary()
func _set_associated_user(user):
associated_user = user
profile_picture.texture = user.profile_image
_check_if_muted()
_check_if_microphone_input()
func _set_picture_size(value):
profile_picture.rect_min_size = Vector2(value, value)
func _set_visibility(value):
profile_picture.self_modulate.a = value

View File

@ -0,0 +1,63 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://user_interface/utility_controls/profile_image_rect/profile_image_rect.tscn" type="PackedScene" id=1]
[ext_resource path="res://user_interface/utility_controls/profile_image_rect/profile_image_rect_mask.png" type="Texture" id=2]
[ext_resource path="res://user_interface/call_panel/ping_effect.gd" type="Script" id=3]
[ext_resource path="res://user_interface/call_panel/call_member.gd" type="Script" id=4]
[ext_resource path="res://user_interface/call_panel/icons/mic_indicator.png" type="Texture" id=5]
[ext_resource path="res://user_interface/call_panel/icons/muted_indicator.png" type="Texture" id=7]
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
render_mode blend_mix;
uniform sampler2D mask;
void fragment() {
COLOR = texture(TEXTURE, UV) * vec4(vec3(1.0), texture(mask, UV).r);
}"
[sub_resource type="ShaderMaterial" id=2]
shader = SubResource( 1 )
shader_param/mask = ExtResource( 2 )
[node name="CallMember" type="CenterContainer"]
margin_left = 220.0
margin_right = 376.0
margin_bottom = 156.0
rect_min_size = Vector2( 156, 156 )
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="MicIndicator" type="TextureRect" parent="."]
visible = false
margin_left = 11.0
margin_top = 11.0
margin_right = 145.0
margin_bottom = 145.0
texture = ExtResource( 5 )
[node name="PingEffect" type="Control" parent="."]
visible = false
margin_left = 78.0
margin_top = 78.0
margin_right = 78.0
margin_bottom = 78.0
script = ExtResource( 3 )
[node name="ProfilePicture" parent="." instance=ExtResource( 1 )]
material = SubResource( 2 )
margin_left = 18.0
margin_top = 18.0
margin_right = 138.0
margin_bottom = 138.0
rect_min_size = Vector2( 120, 120 )
[node name="MutedIndicator" type="TextureRect" parent="ProfilePicture"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource( 7 )
expand = true

View File

@ -1,12 +1,28 @@
extends PanelContainer
extends ViewportContainer
onready var animation_player = get_node("AnimationPlayer")
onready var viewport = get_node("Viewport")
onready var interface = get_node("Viewport/Interface")
func _ready():
# warning-ignore:return_value_discarded
Call.connect("requested", self, "_on_call_requested")
# warning-ignore:return_value_discarded
Call.connect("closed", self, "_on_call_closed")
func _clips_input():
return true
func _on_call_requested():
animation_player.play("FadeIn")
func _on_call_closed():
animation_player.play("FadeOut")
func _on_resized():
if interface:
interface.margin_top = rect_size.y * 0.5 - interface.rect_size.y * 0.5

View File

@ -1,34 +1,82 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=22 format=2]
[ext_resource path="res://user_interface/call_panel/call_panel.gd" type="Script" id=1]
[ext_resource path="res://user_interface/call_panel/call_background.png" type="Texture" id=2]
[ext_resource path="res://user_interface/call_panel/icons/button_slot_01.png" type="Texture" id=3]
[ext_resource path="res://user_interface/call_panel/interface.gd" type="Script" id=4]
[ext_resource path="res://user_interface/call_panel/mute_button.gd" type="Script" id=5]
[ext_resource path="res://user_interface/call_panel/icons/mute_hover.png" type="Texture" id=6]
[ext_resource path="res://user_interface/call_panel/icons/end_call_pressed.png" type="Texture" id=7]
[ext_resource path="res://user_interface/call_panel/icons/end_call.png" type="Texture" id=8]
[ext_resource path="res://user_interface/call_panel/icons/mute_pressed.png" type="Texture" id=9]
[ext_resource path="res://user_interface/call_panel/icons/end_call_hover.png" type="Texture" id=10]
[ext_resource path="res://user_interface/fonts/username_font.tres" type="DynamicFont" id=11]
[ext_resource path="res://user_interface/call_panel/call_member.tscn" type="PackedScene" id=12]
[ext_resource path="res://user_interface/call_panel/icons/mute.png" type="Texture" id=13]
[ext_resource path="res://user_interface/call_panel/end_call_button.gd" type="Script" id=14]
[ext_resource path="res://user_interface/call_panel/icons/bad_connection_dummy.png" type="Texture" id=15]
[ext_resource path="res://user_interface/call_panel/icons/settings_dummy.png" type="Texture" id=16]
[ext_resource path="res://user_interface/call_panel/icons/button_slot_00.png" type="Texture" id=17]
[sub_resource type="StyleBoxTexture" id=4]
texture = ExtResource( 2 )
region_rect = Rect2( 0, 0, 17, 300 )
margin_left = 8.0
margin_right = 8.0
margin_top = 8.0
margin_bottom = 8.0
[sub_resource type="Animation" id=1]
resource_name = "FadeIn"
length = 0.2
length = 0.3
tracks/0/type = "value"
tracks/0/path = NodePath(".:visible")
tracks/0/interp = 1
tracks/0/path = NodePath(".:rect_min_size")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( 0.4, 4.43828 ),
"update": 0,
"values": [ Vector2( 0, 0 ), Vector2( 0, 300 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../..:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:rect_min_size")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.2 ),
"transitions": PoolRealArray( 1, 1 ),
tracks/2/type = "value"
tracks/2/path = NodePath("../..:rect_min_size")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( 0.4, 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ), Vector2( 0, 300 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
[sub_resource type="Animation" id=2]
resource_name = "FadeOut"
@ -41,12 +89,12 @@ tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( 1, 1 ),
"transitions": PoolRealArray( 0.4, 1 ),
"update": 0,
"values": [ Vector2( 0, 200 ), Vector2( 0, 0 ) ]
"values": [ Vector2( 0, 300 ), Vector2( 0, 0 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:visible")
tracks/1/path = NodePath("../..:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
@ -57,11 +105,35 @@ tracks/1/keys = {
"update": 1,
"values": [ false ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("../..:rect_min_size")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( 0.4, 1 ),
"update": 0,
"values": [ Vector2( 0, 300 ), Vector2( 0, 0 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.3 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[sub_resource type="Animation" id=3]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath(".:visible")
tracks/0/path = NodePath(".:rect_min_size")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
@ -70,10 +142,10 @@ tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ false ]
"values": [ Vector2( 0, 0 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:rect_min_size")
tracks/1/path = NodePath("../..:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
@ -82,20 +154,187 @@ tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ false ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("../..:rect_min_size")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ false ]
}
[node name="CallPanel" type="PanelContainer"]
self_modulate = Color( 0.219608, 2.00392, 3.52549, 1 )
margin_top = 88.0
margin_right = 1008.0
margin_bottom = 88.0
[node name="CallPanel" type="ViewportContainer"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 1
stretch = true
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Viewport" type="Viewport" parent="."]
size = Vector2( 1024, 576 )
transparent_bg = true
handle_input_locally = false
render_target_update_mode = 0
[node name="Interface" type="PanelContainer" parent="Viewport"]
visible = false
anchor_right = 1.0
custom_styles/panel = SubResource( 4 )
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="Viewport/Interface"]
margin_left = 8.0
margin_top = 8.0
margin_right = 1016.0
margin_bottom = 264.0
size_flags_vertical = 3
custom_constants/separation = 12
[node name="LabelMembers" type="Label" parent="Viewport/Interface/VBoxContainer"]
margin_right = 1008.0
margin_bottom = 12.0
custom_fonts/font = ExtResource( 11 )
[node name="CenterContainer" type="CenterContainer" parent="Viewport/Interface/VBoxContainer"]
margin_top = 24.0
margin_right = 1008.0
margin_bottom = 180.0
size_flags_vertical = 3
[node name="HBoxContainer" type="HBoxContainer" parent="Viewport/Interface/VBoxContainer/CenterContainer"]
margin_left = 316.0
margin_right = 692.0
margin_bottom = 156.0
custom_constants/separation = 64
alignment = 1
[node name="LeftMember" parent="Viewport/Interface/VBoxContainer/CenterContainer/HBoxContainer" instance=ExtResource( 12 )]
margin_left = 0.0
margin_right = 156.0
[node name="RightMember" parent="Viewport/Interface/VBoxContainer/CenterContainer/HBoxContainer" instance=ExtResource( 12 )]
[node name="HBoxContainer" type="HBoxContainer" parent="Viewport/Interface/VBoxContainer"]
margin_top = 192.0
margin_right = 1008.0
margin_bottom = 240.0
custom_constants/separation = 48
alignment = 1
[node name="ButtonSlot00" type="TextureRect" parent="Viewport/Interface/VBoxContainer/HBoxContainer"]
margin_left = 308.0
margin_top = 20.0
margin_right = 316.0
margin_bottom = 28.0
size_flags_vertical = 4
texture = ExtResource( 3 )
[node name="ButtonSlot01" type="TextureRect" parent="Viewport/Interface/VBoxContainer/HBoxContainer"]
margin_left = 364.0
margin_top = 14.0
margin_right = 384.0
margin_bottom = 34.0
size_flags_vertical = 4
texture = ExtResource( 17 )
[node name="EndCallButton" type="TextureButton" parent="Viewport/Interface/VBoxContainer/HBoxContainer"]
margin_left = 432.0
margin_right = 480.0
margin_bottom = 48.0
texture_normal = ExtResource( 8 )
texture_pressed = ExtResource( 7 )
texture_hover = ExtResource( 10 )
script = ExtResource( 14 )
[node name="MuteButton" type="TextureButton" parent="Viewport/Interface/VBoxContainer/HBoxContainer"]
margin_left = 528.0
margin_right = 576.0
margin_bottom = 48.0
texture_normal = ExtResource( 13 )
texture_pressed = ExtResource( 9 )
texture_hover = ExtResource( 6 )
script = ExtResource( 5 )
[node name="ButtonSlot02" type="TextureRect" parent="Viewport/Interface/VBoxContainer/HBoxContainer"]
margin_left = 624.0
margin_top = 14.0
margin_right = 644.0
margin_bottom = 34.0
size_flags_vertical = 4
texture = ExtResource( 17 )
[node name="ButtonSlot03" type="TextureRect" parent="Viewport/Interface/VBoxContainer/HBoxContainer"]
margin_left = 692.0
margin_top = 20.0
margin_right = 700.0
margin_bottom = 28.0
size_flags_vertical = 4
texture = ExtResource( 3 )
[node name="Filler" type="Control" parent="Viewport/Interface/VBoxContainer"]
margin_top = 252.0
margin_right = 1008.0
margin_bottom = 256.0
rect_min_size = Vector2( 0, 4 )
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="Viewport/Interface"]
[node name="Dummies" type="Control" parent="Viewport/Interface"]
margin_left = 8.0
margin_top = 8.0
margin_right = 1016.0
margin_bottom = 264.0
mouse_filter = 2
[node name="ConnectionDummy" type="TextureRect" parent="Viewport/Interface/Dummies"]
anchor_top = 1.0
anchor_bottom = 1.0
margin_left = 4.0
margin_top = -20.0
margin_right = 20.0
margin_bottom = -4.0
texture = ExtResource( 15 )
[node name="SettingsDummy" type="TextureRect" parent="Viewport/Interface/Dummies"]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -20.0
margin_top = 4.0
margin_right = -4.0
margin_bottom = 20.0
texture = ExtResource( 16 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
root_node = NodePath("../Viewport/Interface")
anims/FadeIn = SubResource( 1 )
anims/FadeOut = SubResource( 2 )
anims/RESET = SubResource( 3 )
[connection signal="resized" from="." to="." method="_on_resized"]
[connection signal="pressed" from="Viewport/Interface/VBoxContainer/HBoxContainer/EndCallButton" to="Viewport/Interface/VBoxContainer/HBoxContainer/EndCallButton" method="_on_pressed"]
[connection signal="pressed" from="Viewport/Interface/VBoxContainer/HBoxContainer/MuteButton" to="Viewport/Interface/VBoxContainer/HBoxContainer/MuteButton" method="_on_pressed"]

View File

@ -0,0 +1,5 @@
extends TextureButton
func _on_pressed():
Call.close_call()

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/bad_connection_dummy.png-d603acf473f5d93783cd2e8725da9aaa.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://user_interface/call_panel/icons/bad_connection_dummy.png"
dest_files=[ "res://.import/bad_connection_dummy.png-d603acf473f5d93783cd2e8725da9aaa.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/button_slot_00.png-d749c98176c3b5eb995d14535557ff84.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://user_interface/call_panel/icons/button_slot_00.png"
dest_files=[ "res://.import/button_slot_00.png-d749c98176c3b5eb995d14535557ff84.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/button_slot_01.png-a353ceb9ea4fce9f27981c31cba2f17f.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://user_interface/call_panel/icons/button_slot_01.png"
dest_files=[ "res://.import/button_slot_01.png-a353ceb9ea4fce9f27981c31cba2f17f.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/connection_dummy.png-04aac731a55c60ce979c8a1a9715e32c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://user_interface/call_panel/icons/connection_dummy.png"
dest_files=[ "res://.import/connection_dummy.png-04aac731a55c60ce979c8a1a9715e32c.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Some files were not shown because too many files have changed in this diff Show More