theme sounds
This commit is contained in:
1 parent
bfa673d4b6
commit
0586d73cd9
4 files changed
+18
-2
No files matched your search
@@ -199,6 +199,8 @@ In addition to shortcuts mentioned above and those shown in the main menu:
|
|||||||
|
|
||||||
## <a name="faq"></a> FAQ
|
## <a name="faq"></a> FAQ
|
||||||
|
|
||||||
|
* How can I create themes?
|
||||||
|
* See [these instructions](THEMES.md).
|
||||||
* The program is running too slowly. How can I speed it up?
|
* The program is running too slowly. How can I speed it up?
|
||||||
* Adjust the number of visits or maximum time allowed in the settings.
|
* Adjust the number of visits or maximum time allowed in the settings.
|
||||||
* KataGo crashes with out of memory errors, how can I prevent this?
|
* KataGo crashes with out of memory errors, how can I prevent this?
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# Themes
|
||||||
|
Version 1.7 brings basic support for themes.
|
||||||
|
|
||||||
|
* Look at the `Theme` class in `katrain/gui/theme.py`.
|
||||||
|
* Make a `theme.json` file in your `~/.katrain` directory and specify any variables from the above class you want to override, e.g.
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"BACKGROUND_COLOR": [1,0,0,1]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
* All resources (including icons which can not be renamed for now) will be looked up in `~/.katrain` first, so files with identical names there can be used to override sounds and images.
|
||||||
@@ -9,6 +9,7 @@ from kivymd.uix.floatlayout import MDFloatLayout
|
|||||||
from katrain.core.constants import MODE_ANALYZE, MODE_PLAY, PLAYER_HUMAN, STATUS_ANALYSIS, STATUS_ERROR
|
from katrain.core.constants import MODE_ANALYZE, MODE_PLAY, PLAYER_HUMAN, STATUS_ANALYSIS, STATUS_ERROR
|
||||||
from katrain.core.lang import rank_label
|
from katrain.core.lang import rank_label
|
||||||
from katrain.gui.kivyutils import AnalysisToggle, CollapsablePanel
|
from katrain.gui.kivyutils import AnalysisToggle, CollapsablePanel
|
||||||
|
from katrain.gui.theme import Theme
|
||||||
|
|
||||||
|
|
||||||
class PlayAnalyzeSelect(MDFloatLayout):
|
class PlayAnalyzeSelect(MDFloatLayout):
|
||||||
@@ -70,8 +71,8 @@ class ControlsPanel(BoxLayout):
|
|||||||
self.status_state = (None, -1e9, None)
|
self.status_state = (None, -1e9, None)
|
||||||
self.active_comment_node = None
|
self.active_comment_node = None
|
||||||
self.last_timer_update = (None, 0, False)
|
self.last_timer_update = (None, 0, False)
|
||||||
self.beep = SoundLoader.load("sounds/countdownbeep.wav")
|
self.beep = SoundLoader.load(Theme.COUNTDOWN_SOUND)
|
||||||
self.boing = SoundLoader.load("sounds/boing.wav")
|
self.boing = SoundLoader.load(Theme.MINIMUM_TIME_PASSED_SOUND)
|
||||||
if self.boing:
|
if self.boing:
|
||||||
self.boing.volume = 0.1
|
self.boing.volume = 0.1
|
||||||
self.beep_start = 5.2
|
self.beep_start = 5.2
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ class Theme:
|
|||||||
GRAPH_TEXTURE = "graph_bg.png"
|
GRAPH_TEXTURE = "graph_bg.png"
|
||||||
# sounds
|
# sounds
|
||||||
STONE_SOUNDS = [f"stone{i}.wav" for i in [1, 2, 3, 4, 5]]
|
STONE_SOUNDS = [f"stone{i}.wav" for i in [1, 2, 3, 4, 5]]
|
||||||
|
COUNTDOWN_SOUND = "countdownbeep.wav"
|
||||||
|
MINIMUM_TIME_PASSED_SOUND = "boing.wav"
|
||||||
|
|
||||||
# eval dots
|
# eval dots
|
||||||
EVAL_COLORS = {
|
EVAL_COLORS = {
|
||||||
|
|||||||
Reference in new issue
Block a user