minor optimizations

This commit is contained in:
Anthony Samms
2026-01-15 19:46:53 -05:00
parent 1ba25d6ce6
commit 81d67a7ab3
4 changed files with 27 additions and 9 deletions

View File

@@ -448,10 +448,10 @@ class OutlinedText:
else:
offset = 0
dest_rect = ray.Rectangle(x, y+offset, self.texture.width+x2, self.texture.height+y2)
if self.outline_thickness > 0:
if self.outline_thickness > 0 and self._last_color != ray.BLANK:
ray.begin_shader_mode(self.shader)
ray.draw_texture_pro(self.texture, self.default_src, dest_rect, origin, rotation, final_color)
if self.outline_thickness > 0:
if self.outline_thickness > 0 and self._last_color != ray.BLANK:
ray.end_shader_mode()
def unload(self):