Renaming / moving buttons

Move "Leave" buttons always to upper right of screen. The "Get a Wav"
button now has a text that expresses better what it does depending on
the platform (save, download, share).
This commit is contained in:
Sebastian Lohff 2025-04-24 15:02:11 +02:00
parent d25f7fe0a3
commit cfddacb278
3 changed files with 16 additions and 10 deletions

View File

@ -93,6 +93,11 @@ text = "Freq:"
unique_name_in_owner = true
layout_mode = 2
[node name="LeaveButton" type="Button" parent="VBoxContainer/MorseView/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 10
text = "Leave Frequency"
[node name="PlayerContainer" type="VBoxContainer" parent="VBoxContainer/MorseView/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
@ -104,10 +109,6 @@ size_flags_vertical = 3
size_flags_stretch_ratio = 2.0
text = "MORSE"
[node name="LeaveButton" type="Button" parent="VBoxContainer/MorseView/VBoxContainer"]
layout_mode = 2
text = "Leave Frequency"
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
@ -145,8 +146,8 @@ autowrap_mode = 2
[connection signal="pressed" from="VBoxContainer/ConnectView/VBoxContainer/HBoxContainer/BackButton" to="." method="_on_back_button_pressed"]
[connection signal="pressed" from="VBoxContainer/ConnectView/VBoxContainer/RefreshButton" to="." method="_on_refresh_button_pressed"]
[connection signal="item_clicked" from="VBoxContainer/ConnectView/VBoxContainer/FreqList" to="." method="_on_freq_list_join"]
[connection signal="pressed" from="VBoxContainer/MorseView/VBoxContainer/HBoxContainer/LeaveButton" to="." method="_on_leave_button_pressed"]
[connection signal="button_down" from="VBoxContainer/MorseView/VBoxContainer/MorseButton" to="." method="_on_morse_button_button_down"]
[connection signal="button_up" from="VBoxContainer/MorseView/VBoxContainer/MorseButton" to="." method="_on_morse_button_button_up"]
[connection signal="pressed" from="VBoxContainer/MorseView/VBoxContainer/LeaveButton" to="." method="_on_leave_button_pressed"]
[connection signal="gui_input" from="VBoxContainer/HBoxContainer/HBoxContainer2/Label" to="." method="_on_error_label_gui_input"]
[connection signal="gui_input" from="VBoxContainer/HBoxContainer/HBoxContainer2/ErrorLabel" to="." method="_on_error_label_gui_input"]

View File

@ -20,6 +20,12 @@ func fill_buffer():
phase = fmod(phase + increment, 1.0)
func _ready():
match OS.get_name():
"Android":
%WavButton.text = "Share Wav"
"Web":
%WavButton.text = "Download Wav"
$Player.stream.mix_rate = sample_hz
$Player.volume_db = -100
$Player.play()
@ -29,13 +35,11 @@ func _ready():
if multiplayer_enabled:
%MultiplayerButton.visible = true
print("External freq: ", Utils.get_external_freq_param())
if Utils.get_external_freq_param():
print("Direct connect to external freq: ", Utils.get_external_freq_param())
_on_multiplayer_button_pressed()
# FIXME: make this dependant on button
# FIXME: make this dependent on button
OS.open_midi_inputs()
print(OS.get_connected_midi_inputs())

View File

@ -55,9 +55,10 @@ size_flags_stretch_ratio = 2.0
text = "MORSE"
[node name="WavButton" type="Button" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
text = "Write Wav"
text = "Save Wav"
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2