mirror of
https://github.com/aclist/dztui.git
synced 2026-11-22 09:29:31 +01:00
chore: abstract side button strings
This commit is contained in:
1 parent
ca7fea3601
commit
f2025dd48d
3 files changed
+21
-37
No files matched your search
+11
-10
@@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
|
||||
from dzgui.strings import side_buttons
|
||||
from dzgui.util import strings
|
||||
from dzgui.strings import rows
|
||||
|
||||
@@ -262,28 +263,28 @@ class ModButton(Enum):
|
||||
|
||||
class ButtonType(Enum):
|
||||
SERVERS = ButtonTypeMeta(
|
||||
strings.buttons.servers_label,
|
||||
strings.buttons.servers_tooltip,
|
||||
side_buttons.servers_label,
|
||||
side_buttons.servers_tooltip,
|
||||
NotebookPage.SERVERS,
|
||||
)
|
||||
MODS = ButtonTypeMeta(
|
||||
strings.buttons.mods_label,
|
||||
strings.buttons.mods_tooltip,
|
||||
side_buttons.mods_label,
|
||||
side_buttons.mods_tooltip,
|
||||
NotebookPage.MODS,
|
||||
)
|
||||
OPTIONS = ButtonTypeMeta(
|
||||
strings.buttons.options_label,
|
||||
strings.buttons.options_tooltip,
|
||||
side_buttons.options_label,
|
||||
side_buttons.options_tooltip,
|
||||
NotebookPage.OPTIONS,
|
||||
)
|
||||
HELP = ButtonTypeMeta(
|
||||
strings.buttons.help_label,
|
||||
strings.buttons.help_tooltip,
|
||||
side_buttons.help_label,
|
||||
side_buttons.help_tooltip,
|
||||
NotebookPage.HELP,
|
||||
)
|
||||
EXIT = ButtonTypeMeta(
|
||||
strings.buttons.exit_label,
|
||||
strings.buttons.exit_tooltip,
|
||||
side_buttons.exit_label,
|
||||
side_buttons.exit_tooltip,
|
||||
None,
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
exit_label = "Exit"
|
||||
exit_tooltip = "Quits the application"
|
||||
help_label = "Help"
|
||||
help_tooltip = "Troubleshooting and documentation"
|
||||
mods_label = "Mods"
|
||||
mods_tooltip = "Manage local mods"
|
||||
options_label = "Options"
|
||||
options_tooltip = "Advanced options"
|
||||
servers_label = "Servers"
|
||||
servers_tooltip = "Search for and connect to servers"
|
||||
@@ -50,20 +50,6 @@ class Init:
|
||||
requires_steam: str
|
||||
|
||||
|
||||
@dataclass(slots=True, frozen=True)
|
||||
class Button:
|
||||
servers_label: str
|
||||
servers_tooltip: str
|
||||
mods_label: str
|
||||
mods_tooltip: str
|
||||
options_label: str
|
||||
options_tooltip: str
|
||||
help_label: str
|
||||
help_tooltip: str
|
||||
exit_label: str
|
||||
exit_tooltip: str
|
||||
|
||||
|
||||
@dataclass(slots=True, frozen=True)
|
||||
class Crumbs:
|
||||
changelog: str
|
||||
@@ -310,19 +296,6 @@ dialog = Dialog(
|
||||
scanning="Scanning LAN ports",
|
||||
)
|
||||
|
||||
buttons = Button(
|
||||
servers_label="Servers",
|
||||
servers_tooltip="Search for and connect to servers",
|
||||
mods_label="Mods",
|
||||
mods_tooltip="Manage local mods",
|
||||
options_label="Options",
|
||||
options_tooltip="Advanced options",
|
||||
help_label="Help",
|
||||
help_tooltip="Troubleshooting and documentation",
|
||||
exit_label="Exit",
|
||||
exit_tooltip="Quits the application",
|
||||
)
|
||||
|
||||
crumbs = Crumbs(
|
||||
changelog="Help > Changelog",
|
||||
keys="Keybindings",
|
||||
|
||||
Reference in new issue
Block a user