2026-11-14 04:25:51 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
# resources/code_res/game_constants.py
|
|
|
|
|
|
feat(ui): overhaul menus, stats & dialogs to custom canvas-based Gothic UI
- Add ui_typography.py and update game_constants.py for Old London typography and new image assets
- Upgrade AssetManager with downscaled 9-slice box rendering and PIL Old London text engine
- Convert ResizingBG to full-window Canvas with automatic horizontal/vertical background switching
- Add GothEntry and two-part GothDropdown with proportional arrow cap, mousewheel scrolling, and scroll indicators
- Update ImageButton with 3-slice side caps, frame-aware auto-width, and automatic icon stripping
- Refactor GothTopbar, LoginView, MainMenuView (hover zoom), StatisticsView, StatsBoardWidget, BotSetupWidget, and AudioSettingsDialog
- Migrate Blackjack, Poker, FreeCell, Klondike, and Spider menu/stats views plus BlackjackResultDialog to frameless canvas layouts
- Fix Crostini shelf icon matching via exact X11 WM_CLASS and absolute pixmap path
2026-11-17 21:31:02 +00:00
|
|
|
from resources.code_res.ui_typography import (
|
|
|
|
|
BTN_AMETHYST_TEXT_ACTIVE,
|
|
|
|
|
BTN_AMETHYST_TEXT_DISABLED,
|
|
|
|
|
BTN_AMETHYST_TEXT_HOVER,
|
|
|
|
|
BTN_AMETHYST_TEXT_NORMAL,
|
|
|
|
|
BTN_FIRE_TEXT_ACTIVE,
|
|
|
|
|
BTN_FIRE_TEXT_DISABLED,
|
|
|
|
|
BTN_FIRE_TEXT_HOVER,
|
|
|
|
|
BTN_FIRE_TEXT_NORMAL,
|
|
|
|
|
DROPDOWN_ITEM_TEXT_HOVER,
|
|
|
|
|
DROPDOWN_ITEM_TEXT_NORMAL,
|
|
|
|
|
DROPDOWN_ITEM_TEXT_SELECTED,
|
|
|
|
|
DROPDOWN_TEXT_CLOSED,
|
|
|
|
|
FONT_ANTIALIAS,
|
|
|
|
|
FONT_COLOR_BODY_DEFAULT,
|
|
|
|
|
FONT_COLOR_BODY_MUTED,
|
|
|
|
|
FONT_COLOR_DISABLED,
|
|
|
|
|
FONT_COLOR_HEADING_SUB,
|
|
|
|
|
FONT_COLOR_STATUS_LOSS,
|
|
|
|
|
FONT_COLOR_STATUS_WARN,
|
|
|
|
|
FONT_COLOR_STATUS_WIN,
|
|
|
|
|
FONT_COLOR_TITLE_MAIN,
|
|
|
|
|
FONT_FAMILY_ALTERNATE,
|
|
|
|
|
FONT_FAMILY_PRIMARY,
|
|
|
|
|
FONT_FILE_ALTERNATE,
|
|
|
|
|
FONT_FILE_PRIMARY,
|
|
|
|
|
FONT_FORCE_MIXED_CASE,
|
|
|
|
|
FONT_LETTER_SPACING_PX,
|
|
|
|
|
FONT_LINE_HEIGHT_FACTOR,
|
|
|
|
|
FONT_OUTLINE_COLOR,
|
|
|
|
|
FONT_OUTLINE_THICKNESS_PX,
|
|
|
|
|
FONT_SHADOW_COLOR,
|
|
|
|
|
FONT_SHADOW_ENABLED,
|
|
|
|
|
FONT_SHADOW_OFFSET_DEFAULT,
|
|
|
|
|
FONT_SHADOW_OFFSET_SMALL,
|
|
|
|
|
FONT_SIZE_BODY,
|
|
|
|
|
FONT_SIZE_BUTTON,
|
|
|
|
|
FONT_SIZE_DROPDOWN,
|
|
|
|
|
FONT_SIZE_HEADING,
|
|
|
|
|
FONT_SIZE_INPUT,
|
|
|
|
|
FONT_SIZE_SMALL_MIN,
|
|
|
|
|
FONT_SIZE_TITLE_LG,
|
|
|
|
|
FONT_SIZE_TITLE_XL,
|
|
|
|
|
FONT_VERTICAL_OFFSET_PX,
|
|
|
|
|
INPUT_CARET_COLOR,
|
|
|
|
|
INPUT_SELECTION_BG,
|
|
|
|
|
INPUT_TEXT_PLACEHOLDER,
|
|
|
|
|
INPUT_TEXT_VALUE,
|
|
|
|
|
UI_ACCENT_AMETHYST,
|
|
|
|
|
UI_ACCENT_GOLD,
|
|
|
|
|
UI_BG_DARK,
|
|
|
|
|
)
|
|
|
|
|
|
2026-11-14 04:25:51 +00:00
|
|
|
# --- Dateien & Verzeichnisse ---
|
|
|
|
|
INTERNAL_DB_REL_PATH = "resources/code_res/internal_base.db"
|
|
|
|
|
USER_DB_FILENAME = "user_data.db"
|
|
|
|
|
GAMES_ROOT_DIR = "games"
|
|
|
|
|
ENTRY_FILENAME = "start.py"
|
|
|
|
|
DEFAULT_CARD_THEME = "default"
|
|
|
|
|
|
feat(ui): overhaul menus, stats & dialogs to custom canvas-based Gothic UI
- Add ui_typography.py and update game_constants.py for Old London typography and new image assets
- Upgrade AssetManager with downscaled 9-slice box rendering and PIL Old London text engine
- Convert ResizingBG to full-window Canvas with automatic horizontal/vertical background switching
- Add GothEntry and two-part GothDropdown with proportional arrow cap, mousewheel scrolling, and scroll indicators
- Update ImageButton with 3-slice side caps, frame-aware auto-width, and automatic icon stripping
- Refactor GothTopbar, LoginView, MainMenuView (hover zoom), StatisticsView, StatsBoardWidget, BotSetupWidget, and AudioSettingsDialog
- Migrate Blackjack, Poker, FreeCell, Klondike, and Spider menu/stats views plus BlackjackResultDialog to frameless canvas layouts
- Fix Crostini shelf icon matching via exact X11 WM_CLASS and absolute pixmap path
2026-11-17 21:31:02 +00:00
|
|
|
# --- Neue UI-Grafiken in resources/images/ (inkl. abwärtskompatibler Aliase) ---
|
2026-11-14 04:25:51 +00:00
|
|
|
UI_IMAGES = {
|
feat(ui): overhaul menus, stats & dialogs to custom canvas-based Gothic UI
- Add ui_typography.py and update game_constants.py for Old London typography and new image assets
- Upgrade AssetManager with downscaled 9-slice box rendering and PIL Old London text engine
- Convert ResizingBG to full-window Canvas with automatic horizontal/vertical background switching
- Add GothEntry and two-part GothDropdown with proportional arrow cap, mousewheel scrolling, and scroll indicators
- Update ImageButton with 3-slice side caps, frame-aware auto-width, and automatic icon stripping
- Refactor GothTopbar, LoginView, MainMenuView (hover zoom), StatisticsView, StatsBoardWidget, BotSetupWidget, and AudioSettingsDialog
- Migrate Blackjack, Poker, FreeCell, Klondike, and Spider menu/stats views plus BlackjackResultDialog to frameless canvas layouts
- Fix Crostini shelf icon matching via exact X11 WM_CLASS and absolute pixmap path
2026-11-17 21:31:02 +00:00
|
|
|
# Hintergründe (Quer- & Hochformat)
|
|
|
|
|
"bg_horizontal": "background_horizontal.jpg",
|
|
|
|
|
"bg_vertical": "background_vertical.jpg",
|
|
|
|
|
"background": "background_horizontal.jpg", # Legacy-Alias
|
|
|
|
|
|
|
|
|
|
# Banner & Spieltische
|
|
|
|
|
"title": "title.png",
|
2026-11-15 22:06:29 +00:00
|
|
|
"general_table": "general_table.jpg",
|
feat(ui): overhaul menus, stats & dialogs to custom canvas-based Gothic UI
- Add ui_typography.py and update game_constants.py for Old London typography and new image assets
- Upgrade AssetManager with downscaled 9-slice box rendering and PIL Old London text engine
- Convert ResizingBG to full-window Canvas with automatic horizontal/vertical background switching
- Add GothEntry and two-part GothDropdown with proportional arrow cap, mousewheel scrolling, and scroll indicators
- Update ImageButton with 3-slice side caps, frame-aware auto-width, and automatic icon stripping
- Refactor GothTopbar, LoginView, MainMenuView (hover zoom), StatisticsView, StatsBoardWidget, BotSetupWidget, and AudioSettingsDialog
- Migrate Blackjack, Poker, FreeCell, Klondike, and Spider menu/stats views plus BlackjackResultDialog to frameless canvas layouts
- Fix Crostini shelf icon matching via exact X11 WM_CLASS and absolute pixmap path
2026-11-17 21:31:02 +00:00
|
|
|
"poker_table": "poker_table.jpg",
|
|
|
|
|
"game_icon_art": "game_icon.jpg",
|
|
|
|
|
|
|
|
|
|
# Buttons (Normal, Amethyst-Hover, Feuer-Highlight)
|
|
|
|
|
"btn_default": "button.png",
|
|
|
|
|
"btn_purple": "button_highlighted_purple.png",
|
|
|
|
|
"btn_fire": "button_highlighted_fire.png",
|
|
|
|
|
|
|
|
|
|
# Legacy-Button-Aliase (zeigen direkt auf die neuen Button-Grafiken)
|
|
|
|
|
"btn_normal": "button_highlighted_fire.png",
|
|
|
|
|
"btn_active": "button_highlighted_fire.png",
|
|
|
|
|
"sel_inactive": "button.png",
|
|
|
|
|
"sel_active": "button_highlighted_purple.png",
|
|
|
|
|
|
|
|
|
|
# Transparente Zierrahmen (ersetzen selbst gezeichnete Frame-Ränder!)
|
|
|
|
|
"box_big": "box_big.png",
|
|
|
|
|
"box_gold_small": "box_gold_smal.png", # Dateiname exakt: box_gold_smal.png
|
|
|
|
|
"box_gold_double": "box_gold_small_double.png",
|
|
|
|
|
"box_purple": "box_small_purple.png",
|
|
|
|
|
"card_frame": "box_big.png", # Legacy-Alias
|
|
|
|
|
|
|
|
|
|
# Formular-Elemente (Input & geteiltes Dropdown)
|
|
|
|
|
"input_field": "input.png",
|
|
|
|
|
"dropdown_closed": "dropdown_closed.png",
|
|
|
|
|
"dropdown_closed_btn": "dropdown_closed_button.png",
|
|
|
|
|
"dropdown_open": "dropdown_box_hightlighted.png",
|
|
|
|
|
"dropdown_open_btn": "dropdown_box_hightlighted_button.png",
|
|
|
|
|
"dropdown_box": "dropdown_box.png",
|
|
|
|
|
"dropdown_selection": "dropdown_selection.png",
|
|
|
|
|
|
|
|
|
|
# Animationen
|
2026-11-14 04:25:51 +00:00
|
|
|
"win_gif": "win.gif",
|
|
|
|
|
"lose_gif": "lose.gif",
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-14 21:47:38 +00:00
|
|
|
APP_ICON_REL_PATH = "resources/images/game_icon.ico"
|
2026-11-15 22:06:29 +00:00
|
|
|
GAME_ICONS_SUBDIR = "game_icons"
|
|
|
|
|
|
|
|
|
|
GAME_ICON_MAP = {
|
|
|
|
|
"blackjack": "blackjack_icon.ico",
|
|
|
|
|
"poker": "poker_icon.ico",
|
|
|
|
|
"solitaire/klondike": "klondike_icon.ico",
|
|
|
|
|
"solitaire/freecell": "freecell_icon.ico",
|
|
|
|
|
"solitaire/spider_solitaire": "spider_icon.ico",
|
feat(ui): overhaul menus, stats & dialogs to custom canvas-based Gothic UI
- Add ui_typography.py and update game_constants.py for Old London typography and new image assets
- Upgrade AssetManager with downscaled 9-slice box rendering and PIL Old London text engine
- Convert ResizingBG to full-window Canvas with automatic horizontal/vertical background switching
- Add GothEntry and two-part GothDropdown with proportional arrow cap, mousewheel scrolling, and scroll indicators
- Update ImageButton with 3-slice side caps, frame-aware auto-width, and automatic icon stripping
- Refactor GothTopbar, LoginView, MainMenuView (hover zoom), StatisticsView, StatsBoardWidget, BotSetupWidget, and AudioSettingsDialog
- Migrate Blackjack, Poker, FreeCell, Klondike, and Spider menu/stats views plus BlackjackResultDialog to frameless canvas layouts
- Fix Crostini shelf icon matching via exact X11 WM_CLASS and absolute pixmap path
2026-11-17 21:31:02 +00:00
|
|
|
"solitaire/pyramid": "pyramid_icon.ico",
|
|
|
|
|
"solitaire/tripeaks": "tripeaks_icon.ico",
|
2026-11-15 22:06:29 +00:00
|
|
|
"romme": "romme_icon.ico",
|
|
|
|
|
"party/romme": "romme_icon.ico",
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-14 21:47:38 +00:00
|
|
|
FONTS_REL_DIR = "resources/fonts"
|
|
|
|
|
CUSTOM_FONT_FILES = (
|
feat(ui): overhaul menus, stats & dialogs to custom canvas-based Gothic UI
- Add ui_typography.py and update game_constants.py for Old London typography and new image assets
- Upgrade AssetManager with downscaled 9-slice box rendering and PIL Old London text engine
- Convert ResizingBG to full-window Canvas with automatic horizontal/vertical background switching
- Add GothEntry and two-part GothDropdown with proportional arrow cap, mousewheel scrolling, and scroll indicators
- Update ImageButton with 3-slice side caps, frame-aware auto-width, and automatic icon stripping
- Refactor GothTopbar, LoginView, MainMenuView (hover zoom), StatisticsView, StatsBoardWidget, BotSetupWidget, and AudioSettingsDialog
- Migrate Blackjack, Poker, FreeCell, Klondike, and Spider menu/stats views plus BlackjackResultDialog to frameless canvas layouts
- Fix Crostini shelf icon matching via exact X11 WM_CLASS and absolute pixmap path
2026-11-17 21:31:02 +00:00
|
|
|
FONT_FILE_PRIMARY,
|
|
|
|
|
FONT_FILE_ALTERNATE,
|
2026-11-14 21:47:38 +00:00
|
|
|
)
|
|
|
|
|
|
feat(ui): overhaul menus, stats & dialogs to custom canvas-based Gothic UI
- Add ui_typography.py and update game_constants.py for Old London typography and new image assets
- Upgrade AssetManager with downscaled 9-slice box rendering and PIL Old London text engine
- Convert ResizingBG to full-window Canvas with automatic horizontal/vertical background switching
- Add GothEntry and two-part GothDropdown with proportional arrow cap, mousewheel scrolling, and scroll indicators
- Update ImageButton with 3-slice side caps, frame-aware auto-width, and automatic icon stripping
- Refactor GothTopbar, LoginView, MainMenuView (hover zoom), StatisticsView, StatsBoardWidget, BotSetupWidget, and AudioSettingsDialog
- Migrate Blackjack, Poker, FreeCell, Klondike, and Spider menu/stats views plus BlackjackResultDialog to frameless canvas layouts
- Fix Crostini shelf icon matching via exact X11 WM_CLASS and absolute pixmap path
2026-11-17 21:31:02 +00:00
|
|
|
# Einheitlich Old London für die gesamte UI
|
|
|
|
|
FONT_GOTH_TITLE = FONT_FAMILY_PRIMARY
|
|
|
|
|
FONT_GOTH_ALT = FONT_FAMILY_ALTERNATE
|
|
|
|
|
FONT_UI_BODY = FONT_FAMILY_PRIMARY
|
2026-11-14 21:47:38 +00:00
|
|
|
|
2026-11-14 04:25:51 +00:00
|
|
|
# --- Flache Hauptkategorien (niemals Unterkategorien!) ---
|
|
|
|
|
CAT_LUCK = "luck"
|
|
|
|
|
CAT_SOLO = "solo"
|
|
|
|
|
CAT_PARTY_OFFLINE = "party_offline"
|
|
|
|
|
CAT_ONLINE = "online"
|
|
|
|
|
|
|
|
|
|
GAME_CATEGORIES = (
|
|
|
|
|
(CAT_LUCK, "cat_luck", "cat_desc_luck"),
|
|
|
|
|
(CAT_SOLO, "cat_solo", "cat_desc_solo"),
|
|
|
|
|
(CAT_PARTY_OFFLINE, "cat_party_offline", "cat_desc_party_offline"),
|
|
|
|
|
(CAT_ONLINE, "cat_online", "cat_desc_online"),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# --- Dynamischer Game-Loader & Kategorie-Zuordnung ---
|
|
|
|
|
GAME_FOLDERS = (
|
|
|
|
|
"blackjack",
|
|
|
|
|
"poker",
|
|
|
|
|
"solitaire/freecell",
|
|
|
|
|
"solitaire/klondike",
|
|
|
|
|
"solitaire/spider_solitaire",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
FOLDER_CATEGORY_MAP = {
|
|
|
|
|
"blackjack": CAT_LUCK,
|
|
|
|
|
"poker": CAT_LUCK,
|
|
|
|
|
"solitaire/freecell": CAT_SOLO,
|
|
|
|
|
"solitaire/klondike": CAT_SOLO,
|
|
|
|
|
"solitaire/spider_solitaire": CAT_SOLO,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
STAT_GAME_GROUPS = (
|
|
|
|
|
("blackjack", "game_title_blackjack"),
|
|
|
|
|
("poker", "game_title_poker"),
|
|
|
|
|
("solitaire/klondike", "game_title_klondike"),
|
|
|
|
|
("solitaire/freecell", "game_title_freecell"),
|
|
|
|
|
("solitaire/spider_solitaire", "game_title_spider_solitaire"),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# --- Karten-Definitionen ---
|
|
|
|
|
SUITS = ("C", "D", "H", "S")
|
|
|
|
|
RED_SUITS = ("D", "H")
|
|
|
|
|
RANKS = ("2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A")
|
|
|
|
|
FACE_RANKS = ("J", "Q", "K")
|
|
|
|
|
ACE_RANK = "A"
|
|
|
|
|
SEVEN_RANK = "7"
|
|
|
|
|
JOKER_SUIT = "JOKER"
|
|
|
|
|
JOKER_RANKS = ("1", "2")
|
|
|
|
|
|
|
|
|
|
SUIT_SYMBOLS = {
|
|
|
|
|
"C": "♣",
|
|
|
|
|
"D": "♦",
|
|
|
|
|
"H": "♥",
|
|
|
|
|
"S": "♠",
|
|
|
|
|
"JOKER": "★",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CARD_FILE_PATTERN = "{suit}{rank}.png"
|
|
|
|
|
CARD_BACK_PATTERN = "Back_{color}.png"
|
|
|
|
|
JOKER_FILES = {
|
|
|
|
|
"1": "Joker.png",
|
|
|
|
|
"2": "Joker2.png",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# --- Audio & Sound-Zuordnung ---
|
|
|
|
|
MENU_MUSIC_FILE = "Beyond_The_Iron_Gate.mp3"
|
|
|
|
|
INGAME_MUSIC_FILE = "The_Midnight_Hand.mp3"
|
|
|
|
|
DEFAULT_VOL_AMBIANCE = 0.35
|
|
|
|
|
DEFAULT_VOL_MENU = 0.70
|
|
|
|
|
|
|
|
|
|
SOUND_MAP = {
|
|
|
|
|
"click": ("menu", "click.ogg"),
|
|
|
|
|
"deal": ("menu", "roll-for-initiative.mp3"),
|
|
|
|
|
"win": ("menu", "success.mp3"),
|
|
|
|
|
"lose": ("menu", "failure.mp3"),
|
|
|
|
|
"end_battle": ("menu", "end-battle.mp3"),
|
|
|
|
|
"stand": ("ambiance", "owl-city-stand-sfx.mp3"),
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# --- Progression, Divine Punishment & The Devil's Deal ---
|
|
|
|
|
ROMAN_NUMERALS = ("I", "II", "III", "IV", "V")
|
|
|
|
|
XP_BASE_REQ = 100
|
|
|
|
|
XP_GROWTH_EXPONENT = 1.68
|
|
|
|
|
XP_EARN_LEVEL_EXPONENT = 0.55
|
|
|
|
|
|
|
|
|
|
GOLD_MAX_ACCOUNTS = 5
|
|
|
|
|
GOLD_MIN_TABLE_ENTRY = 10
|
|
|
|
|
XP_TO_GOLD_COST = 10000
|
|
|
|
|
XP_TO_GOLD_AMOUNT = 10
|
|
|
|
|
|
|
|
|
|
DIVINE_AVG_GAMES_MULT = 10
|
|
|
|
|
DEVILS_DEAL_MIN_RANK_DE = "Stütze"
|
|
|
|
|
DEVILS_DEAL_GOLD_REWARD = 10
|
|
|
|
|
|
|
|
|
|
STAT_FIELD_KEYS = (
|
|
|
|
|
("played", "stat_played"),
|
|
|
|
|
("won", "stat_won"),
|
|
|
|
|
("lost", "stat_lost"),
|
|
|
|
|
("win_pct", "stat_win_pct"),
|
|
|
|
|
("current_streak", "stat_current_streak"),
|
|
|
|
|
("longest_streak", "stat_longest_streak"),
|
|
|
|
|
("best_time", "stat_best_time"),
|
|
|
|
|
("avg_time", "stat_avg_time"),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# --- Bots (0..5 Offline-Stufen, 6 = Gottheit / Online-Standard!) ---
|
|
|
|
|
BOT_DEITY_LEVEL = 6
|
|
|
|
|
BOT_LEVEL_COUNT = 7
|
2026-11-14 21:47:38 +00:00
|
|
|
|
|
|
|
|
# --- Blackjack ---
|
2026-11-15 23:22:24 +00:00
|
|
|
BJ_MAX_BOTS = 4
|
2026-11-14 04:25:51 +00:00
|
|
|
BJ_STARTING_GOLD = 1000
|
|
|
|
|
BJ_INITIAL_ANTE = 10
|
|
|
|
|
BJ_DEFAULT_BET = 10
|
|
|
|
|
BJ_TARGET_SCORE = 21
|
|
|
|
|
BJ_DEALER_STAND = 17
|
|
|
|
|
BJ_MAX_RAISES_PER_ROUND = 4
|
|
|
|
|
BJ_RESHUFFLE_RATIO = 0.20
|
|
|
|
|
BJ_BOT_TURN_DELAY_MS = 550
|
|
|
|
|
BJ_DEALER_DELAY_MS = 650
|
|
|
|
|
|
|
|
|
|
BJ_VARIANTS = {
|
|
|
|
|
"bj_classic": {
|
|
|
|
|
"decks": 2,
|
|
|
|
|
"min_bet": BJ_INITIAL_ANTE,
|
|
|
|
|
"bet_scale": 1,
|
|
|
|
|
"xp_mult": 1.0,
|
|
|
|
|
"back_color": "Black",
|
|
|
|
|
},
|
|
|
|
|
"bj_highstakes": {
|
|
|
|
|
"decks": 6,
|
|
|
|
|
"min_bet": BJ_INITIAL_ANTE,
|
|
|
|
|
"bet_scale": 2,
|
|
|
|
|
"xp_mult": 1.45,
|
|
|
|
|
"back_color": "Red",
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-14 21:47:38 +00:00
|
|
|
# --- Texas Hold'em Poker (6-Max, autarke Goldbeutel) ---
|
|
|
|
|
PK_MAX_BOTS = 5
|
|
|
|
|
PK_STARTING_GOLD = 1000
|
|
|
|
|
PK_BOT_TURN_DELAY_MS = 600
|
|
|
|
|
PK_STREET_DELAY_MS = 700
|
|
|
|
|
PK_TABLE_IMAGE = "poker_table.jpg"
|
|
|
|
|
|
|
|
|
|
PK_VARIANTS = {
|
|
|
|
|
"poker_holdem": {
|
|
|
|
|
"sb": 5,
|
|
|
|
|
"bb": 10,
|
|
|
|
|
"min_entry": 10,
|
|
|
|
|
"bet_scale": 1,
|
|
|
|
|
"xp_mult": 1.15,
|
|
|
|
|
"back_color": "Black",
|
|
|
|
|
},
|
|
|
|
|
"poker_holdem_high": {
|
|
|
|
|
"sb": 10,
|
|
|
|
|
"bb": 20,
|
|
|
|
|
"min_entry": 20,
|
|
|
|
|
"bet_scale": 2,
|
|
|
|
|
"xp_mult": 1.65,
|
|
|
|
|
"back_color": "Red",
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-15 20:03:27 +00:00
|
|
|
# --- Solitaire & Klondike ---
|
feat(ui): overhaul menus, stats & dialogs to custom canvas-based Gothic UI
- Add ui_typography.py and update game_constants.py for Old London typography and new image assets
- Upgrade AssetManager with downscaled 9-slice box rendering and PIL Old London text engine
- Convert ResizingBG to full-window Canvas with automatic horizontal/vertical background switching
- Add GothEntry and two-part GothDropdown with proportional arrow cap, mousewheel scrolling, and scroll indicators
- Update ImageButton with 3-slice side caps, frame-aware auto-width, and automatic icon stripping
- Refactor GothTopbar, LoginView, MainMenuView (hover zoom), StatisticsView, StatsBoardWidget, BotSetupWidget, and AudioSettingsDialog
- Migrate Blackjack, Poker, FreeCell, Klondike, and Spider menu/stats views plus BlackjackResultDialog to frameless canvas layouts
- Fix Crostini shelf icon matching via exact X11 WM_CLASS and absolute pixmap path
2026-11-17 21:31:02 +00:00
|
|
|
SOLO_FORFEIT_XP_RATIO = 0.40
|
2026-11-15 20:03:27 +00:00
|
|
|
|
|
|
|
|
SOLITAIRE_DIFFICULTIES = {
|
|
|
|
|
0: {"key": "easy", "xp_mult": 0.85, "redeal_limit_d3": None},
|
|
|
|
|
1: {"key": "normal", "xp_mult": 1.00, "redeal_limit_d3": None},
|
|
|
|
|
2: {"key": "hard", "xp_mult": 1.25, "redeal_limit_d3": None},
|
|
|
|
|
3: {"key": "deity", "xp_mult": 1.55, "redeal_limit_d3": 3},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KLONDIKE_VARIANTS = {
|
|
|
|
|
"klondike_1": {
|
|
|
|
|
"draw_count": 1,
|
|
|
|
|
"xp_mult": 1.0,
|
|
|
|
|
"back_color": "Black",
|
|
|
|
|
},
|
|
|
|
|
"klondike_3": {
|
|
|
|
|
"draw_count": 3,
|
|
|
|
|
"xp_mult": 1.35,
|
|
|
|
|
"back_color": "Red",
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-15 22:06:29 +00:00
|
|
|
# --- FreeCell ---
|
2026-11-15 20:03:27 +00:00
|
|
|
FREECELL_VARIANTS = {
|
|
|
|
|
"freecell_std": {
|
|
|
|
|
"xp_mult": 1.15,
|
|
|
|
|
"back_color": "Black",
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-15 22:06:29 +00:00
|
|
|
# --- Spider Solitaire ---
|
|
|
|
|
SPIDER_VARIANTS = {
|
|
|
|
|
"spider_1suit": {
|
|
|
|
|
"num_suits": 1,
|
|
|
|
|
"suits": ("S",),
|
|
|
|
|
"xp_mult": 1.10,
|
|
|
|
|
"back_color": "Black",
|
|
|
|
|
},
|
|
|
|
|
"spider_2suit": {
|
|
|
|
|
"num_suits": 2,
|
|
|
|
|
"suits": ("S", "H"),
|
|
|
|
|
"xp_mult": 1.45,
|
|
|
|
|
"back_color": "Black",
|
|
|
|
|
},
|
|
|
|
|
"spider_4suit": {
|
|
|
|
|
"num_suits": 4,
|
|
|
|
|
"suits": ("C", "D", "H", "S"),
|
|
|
|
|
"xp_mult": 1.95,
|
|
|
|
|
"back_color": "Black",
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
feat(ui): overhaul menus, stats & dialogs to custom canvas-based Gothic UI
- Add ui_typography.py and update game_constants.py for Old London typography and new image assets
- Upgrade AssetManager with downscaled 9-slice box rendering and PIL Old London text engine
- Convert ResizingBG to full-window Canvas with automatic horizontal/vertical background switching
- Add GothEntry and two-part GothDropdown with proportional arrow cap, mousewheel scrolling, and scroll indicators
- Update ImageButton with 3-slice side caps, frame-aware auto-width, and automatic icon stripping
- Refactor GothTopbar, LoginView, MainMenuView (hover zoom), StatisticsView, StatsBoardWidget, BotSetupWidget, and AudioSettingsDialog
- Migrate Blackjack, Poker, FreeCell, Klondike, and Spider menu/stats views plus BlackjackResultDialog to frameless canvas layouts
- Fix Crostini shelf icon matching via exact X11 WM_CLASS and absolute pixmap path
2026-11-17 21:31:02 +00:00
|
|
|
# --- UI Geometrie ---
|
2026-11-14 04:25:51 +00:00
|
|
|
DEFAULT_WINDOW_GEOM = "1150x800"
|
|
|
|
|
MIN_WINDOW_SIZE = (980, 700)
|
|
|
|
|
MENU_CARD_SIZE = (185, 245)
|
|
|
|
|
PLAYING_CARD_SIZE = (102, 148)
|
|
|
|
|
BJ_SPLIT_CARD_SIZE = (84, 122)
|
|
|
|
|
BJ_BOT_CARD_SIZE = (64, 94)
|
2026-11-14 21:47:38 +00:00
|
|
|
PK_BOARD_CARD_SIZE = (88, 128)
|
|
|
|
|
PK_BOT_CARD_SIZE = (54, 80)
|
2026-11-14 04:25:51 +00:00
|
|
|
OUTCOME_GIF_SIZE = (170, 95)
|
|
|
|
|
|
feat(ui): overhaul menus, stats & dialogs to custom canvas-based Gothic UI
- Add ui_typography.py and update game_constants.py for Old London typography and new image assets
- Upgrade AssetManager with downscaled 9-slice box rendering and PIL Old London text engine
- Convert ResizingBG to full-window Canvas with automatic horizontal/vertical background switching
- Add GothEntry and two-part GothDropdown with proportional arrow cap, mousewheel scrolling, and scroll indicators
- Update ImageButton with 3-slice side caps, frame-aware auto-width, and automatic icon stripping
- Refactor GothTopbar, LoginView, MainMenuView (hover zoom), StatisticsView, StatsBoardWidget, BotSetupWidget, and AudioSettingsDialog
- Migrate Blackjack, Poker, FreeCell, Klondike, and Spider menu/stats views plus BlackjackResultDialog to frameless canvas layouts
- Fix Crostini shelf icon matching via exact X11 WM_CLASS and absolute pixmap path
2026-11-17 21:31:02 +00:00
|
|
|
# --- Farb-Aliase auf Basis von ui_typography.py ---
|
|
|
|
|
BG_COLOR = UI_BG_DARK
|
|
|
|
|
PANEL_BG = UI_BG_DARK # Keine grauen Kästen mehr über dem Hintergrund
|
|
|
|
|
CELL_BG = UI_BG_DARK
|
|
|
|
|
TABLE_BG = UI_BG_DARK
|
|
|
|
|
MODAL_BG = "#09070d"
|
|
|
|
|
INPUT_BG = "#120e1a"
|
|
|
|
|
BORDER_COLOR = UI_ACCENT_AMETHYST
|
|
|
|
|
SUBTLE_BORDER = "#2d243b"
|
|
|
|
|
FG_COLOR = FONT_COLOR_BODY_DEFAULT
|
|
|
|
|
MUTED_FG = FONT_COLOR_BODY_MUTED
|
|
|
|
|
SUCCESS_FG = FONT_COLOR_STATUS_WIN
|
|
|
|
|
WARN_FG = FONT_COLOR_STATUS_WARN
|
|
|
|
|
ERROR_FG = FONT_COLOR_STATUS_LOSS
|
|
|
|
|
DISABLED_FG = FONT_COLOR_DISABLED
|
|
|
|
|
ACCENT_GOTH = UI_ACCENT_AMETHYST
|
|
|
|
|
ACCENT_GOLD = UI_ACCENT_GOLD
|
|
|
|
|
TITLE_GOLD_FG = FONT_COLOR_TITLE_MAIN
|