nerv
This commit is contained in:
10
src/gui_2.py
10
src/gui_2.py
@@ -298,6 +298,7 @@ class App:
|
||||
imgui.end_menu()
|
||||
|
||||
def _gui_func(self) -> None:
|
||||
pushed_prior_tint = False
|
||||
# Render background shader
|
||||
bg = bg_shader.get_bg()
|
||||
if bg.enabled:
|
||||
@@ -2895,6 +2896,7 @@ def hello():
|
||||
ch_ct, ctrans = imgui.slider_float("##ctrans", theme.get_child_transparency(), 0.1, 1.0, "%.2f")
|
||||
if ch_ct:
|
||||
theme.set_child_transparency(ctrans)
|
||||
bg = bg_shader.get_bg()
|
||||
ch_bg, bg.enabled = imgui.checkbox("Animated Background Shader", bg.enabled)
|
||||
if ch_bg:
|
||||
gui_cfg = self.config.setdefault("gui", {})
|
||||
@@ -2927,6 +2929,14 @@ def hello():
|
||||
font_path, font_size = theme.get_font_loading_params()
|
||||
|
||||
if font_path:
|
||||
p = Path(font_path)
|
||||
if p.is_absolute():
|
||||
try:
|
||||
if p.is_relative_to(assets_dir):
|
||||
font_path = str(p.relative_to(assets_dir)).replace("\\", "/")
|
||||
except (ValueError, AttributeError):
|
||||
pass # Fallback to original font_path if relative_to fails or on old Python
|
||||
|
||||
# Just try loading it directly; hello_imgui will look in the assets folder
|
||||
try:
|
||||
self.main_font = hello_imgui.load_font_ttf_with_font_awesome_icons(font_path, font_size, config)
|
||||
|
||||
Reference in New Issue
Block a user