beeping option
This commit is contained in:
1 parent
e03118ca9a
commit
654de86c10
11 files changed
+23
-4
No files matched your search
+1
-1
@@ -273,7 +273,7 @@ class KaTrainGui(Screen, KaTrainBase):
|
||||
self.controls.timer.paused = True
|
||||
if not self.timer_settings_popup:
|
||||
self.timer_settings_popup = I18NPopup(
|
||||
title_key="timer settings", size=[dp(350), dp(350)], content=ConfigTimerPopup(self)
|
||||
title_key="timer settings", size=[dp(350), dp(400)], content=ConfigTimerPopup(self)
|
||||
).__self__
|
||||
self.timer_settings_popup.content.popup = self.timer_settings_popup
|
||||
self.timer_settings_popup.open()
|
||||
|
||||
@@ -114,6 +114,7 @@ class ControlsPanel(BoxLayout):
|
||||
now = time.time()
|
||||
byo_len = max(1, self.katrain.config("timer/byo_length"))
|
||||
byo_num = max(1, self.katrain.config("timer/byo_periods"))
|
||||
sounds_on = max(1, self.katrain.config("timer/sounds",True))
|
||||
player = self.katrain.next_player_info
|
||||
ai = player.ai
|
||||
used_period = False
|
||||
@@ -144,13 +145,12 @@ class ControlsPanel(BoxLayout):
|
||||
time_remaining = byo_len - current_node.time_used
|
||||
periods_rem = byo_num - player.periods_used
|
||||
|
||||
if sounds_on:
|
||||
if beeping and not new_beeping and not used_period:
|
||||
self.beep.stop()
|
||||
print("STOP")
|
||||
elif not beeping and new_beeping and self.beep:
|
||||
self.beep.volume = 0.5 if periods_rem > 1 else 1
|
||||
self.beep.play()
|
||||
print("PLAY")
|
||||
|
||||
self.last_timer_update = (current_node, now, new_beeping)
|
||||
|
||||
|
||||
Binary file not shown.
@@ -253,6 +253,9 @@ msgstr "Time per Byo-yomi Period"
|
||||
msgid "byoyomi periods"
|
||||
msgstr "Number of Periods"
|
||||
|
||||
msgid "count down sounds"
|
||||
msgstr "Count Down Sounds"
|
||||
|
||||
#. submit button
|
||||
msgid "update timer"
|
||||
msgstr "Update Timer"
|
||||
|
||||
Binary file not shown.
@@ -594,3 +594,7 @@ msgstr ""
|
||||
"Le coup {move} a été annulé car il perdait {points_lost:.1f} points. Vous "
|
||||
"pouvez survoler le coup pour voir la réfutation. Veuillez jouer un nouveau "
|
||||
"coup."
|
||||
|
||||
#. TODO
|
||||
msgid "count down sounds"
|
||||
msgstr "Count Down Sounds"
|
||||
Binary file not shown.
@@ -526,3 +526,6 @@ msgid "teaching undo message"
|
||||
msgstr ""
|
||||
"ㅋㅋUndid move {move} as it lost {points_lost:.1f} points. Hover over the move"
|
||||
" to see expected refutation. Please try again."
|
||||
|
||||
msgid "count down sounds"
|
||||
msgstr "ㅋㅋCount Down Sounds"
|
||||
Binary file not shown.
@@ -535,3 +535,7 @@ msgstr ""
|
||||
msgid "teaching undo message"
|
||||
msgstr ""
|
||||
"{points_lost:.1f}집 손해이므로 {move}을/를 물렀습니다. 커서를 올려 상대의 대응책을 보십시오. 다시 두어 주세요."
|
||||
|
||||
#. TODO
|
||||
msgid "count down sounds"
|
||||
msgstr "Count Down Sounds"
|
||||
+6
-1
@@ -236,7 +236,7 @@
|
||||
<ConfigTimerPopup>:
|
||||
MDGridLayout:
|
||||
cols: 2
|
||||
rows: 2
|
||||
rows: 3
|
||||
spacing: CP_SPACING
|
||||
size_hint: 1,2
|
||||
DescriptionLabel:
|
||||
@@ -251,6 +251,11 @@
|
||||
LabelledIntInput:
|
||||
text: "5"
|
||||
input_property: "timer/byo_periods"
|
||||
DescriptionLabel:
|
||||
text: i18n._('count down sounds')
|
||||
AnchorLayout:
|
||||
LabelledCheckBox:
|
||||
input_property: "timer/sounds"
|
||||
AnchorLayout:
|
||||
size_hint: 1,1
|
||||
AutoSizedRoundedRectangleButton:
|
||||
|
||||
Reference in new issue
Block a user