mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
Update utils.py
This commit is contained in:
@@ -234,6 +234,7 @@ class GlobalData:
|
|||||||
config: dict = field(default_factory=lambda: dict())
|
config: dict = field(default_factory=lambda: dict())
|
||||||
|
|
||||||
global_data = GlobalData()
|
global_data = GlobalData()
|
||||||
|
shader = ray.load_shader('', 'shader/outline.fs')
|
||||||
|
|
||||||
class OutlinedText:
|
class OutlinedText:
|
||||||
def __init__(self, text: str, font_size: int, color: ray.Color, outline_color: ray.Color, outline_thickness=5.0, vertical=False):
|
def __init__(self, text: str, font_size: int, color: ray.Color, outline_color: ray.Color, outline_thickness=5.0, vertical=False):
|
||||||
@@ -259,7 +260,7 @@ class OutlinedText:
|
|||||||
])
|
])
|
||||||
texture_size = ray.ffi.new("float[2]", [self.texture.width, self.texture.height])
|
texture_size = ray.ffi.new("float[2]", [self.texture.width, self.texture.height])
|
||||||
|
|
||||||
self.shader = ray.load_shader('', 'shader/outline.fs')
|
self.shader = shader
|
||||||
outline_size_loc = ray.get_shader_location(self.shader, "outlineSize")
|
outline_size_loc = ray.get_shader_location(self.shader, "outlineSize")
|
||||||
outline_color_loc = ray.get_shader_location(self.shader, "outlineColor")
|
outline_color_loc = ray.get_shader_location(self.shader, "outlineColor")
|
||||||
texture_size_loc = ray.get_shader_location(self.shader, "textureSize")
|
texture_size_loc = ray.get_shader_location(self.shader, "textureSize")
|
||||||
|
|||||||
Reference in New Issue
Block a user