# Path: PyEngine3D/Render/RenderOptions.py
# class RenderOption:
#     RENDER_LIGHT_PROBE = False
#     RENDER_ONLY_ATMOSPHERE = False
#     RENDER_FONT = True
#     RENDER_STATIC_ACTOR = True
#     RENDER_SKELETON_ACTOR = True
#     RENDER_ATMOSPHERE = True
#     RENDER_OCEAN = True
#     RENDER_EFFECT = True
#     RENDER_COLLISION = True
#     RENDER_DEBUG_LINE = True
#     RENDER_GIZMO = True
#     RENDER_OBJECT_ID = True


import numpy as np
from PyEngine3D.Utilities import *
from .RenderOptions import RenderOption
    def __init__(self):
        self.name = 'FontManager'
        self.core_manager = None
        self.resource_manager = None
        self.ascii = None
        self.show = True

        self.logs = []
        self.text_render_data = None

    def initialize(self, core_manager):
        self.core_manager = core_manager
        self.resource_manager = core_manager.resource_manager
        self.ascii = self.resource_manager.get_default_font_data()
        self.text_render_data = TextRenderData()

    def clear_logs(self):
        self.logs = []
        self.text_render_data.set_text("", self.ascii, font_size=12)

    def toggle(self):
        self.show = not self.show

    def log(self, text):
        if not self.show or not RenderOption.RENDER_FONT:
            return

        self.logs.append(text)

    def render_log(self, canvas_width, canvas_height):

# Path: PyEngine3D/Render/RenderOptions.py
# class RenderOption:
#     RENDER_LIGHT_PROBE = False
#     RENDER_ONLY_ATMOSPHERE = False
#     RENDER_FONT = True
#     RENDER_STATIC_ACTOR = True
#     RENDER_SKELETON_ACTOR = True
#     RENDER_ATMOSPHERE = True
#     RENDER_OCEAN = True
#     RENDER_EFFECT = True
#     RENDER_COLLISION = True
#     RENDER_DEBUG_LINE = True
#     RENDER_GIZMO = True
#     RENDER_OBJECT_ID = True


# Path: PyEngine3D/Render/Font.py
import numpy as np
from PyEngine3D.Utilities import *
from .RenderOptions import RenderOption

    def __init__(self):
        self.name = 'FontManager'
        self.core_manager = None
        self.resource_manager = None
        self.ascii = None
        self.show = True

        self.logs = []
        self.text_render_data = None

    def initialize(self, core_manager):
        self.core_manager = core_manager
        self.resource_manager = core_manager.resource_manager
        self.ascii = self.resource_manager.get_default_font_data()
        self.text_render_data = TextRenderData()

    def clear_logs(self):
        self.logs = []
        self.text_render_data.set_text("", self.ascii, font_size=12)

    def toggle(self):
        self.show = not self.show

    def log(self, text):
        if not self.show or not RenderOption.RENDER_FONT:
            return

        self.logs.append(text)

    def render_log(self, canvas_width, canvas_height):

        if RenderOption.RENDER_FONT and self.show and 0 < len(self.logs):