class_name LuneGlyph extends Control ## A LuneGlyphs symbol as a control (icons in cards, badges and rows). Ignores the mouse. var glyph: String = "": set(value): if value != glyph: glyph = value queue_redraw() var color: Color = LuneUiTheme.TEXT: set(value): if value != color: color = value queue_redraw() var accent: Color = Color(0, 0, 0, 0) static func make(name_value: String, tint: Color, edge: float = 18.0, parent: Node = null) -> LuneGlyph: var result := LuneGlyph.new() result.glyph = name_value result.color = tint result.custom_minimum_size = Vector2(edge, edge) result.size_flags_vertical = Control.SIZE_SHRINK_CENTER if parent != null: parent.add_child(result) return result func _init() -> void: mouse_filter = Control.MOUSE_FILTER_IGNORE func _draw() -> void: if not glyph.is_empty(): LuneGlyphs.draw(self, glyph, Rect2(Vector2.ZERO, size), color, accent)