Refactor Godot architecture into AppShell, modular menus and game domains
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
class_name BrassStuds
|
||||
extends Control
|
||||
## Quattro borchie decorative agli angoli del controllo.
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
queue_redraw()
|
||||
|
||||
|
||||
func _draw() -> void:
|
||||
var positions := [Vector2(22, 22), Vector2(size.x - 22, 22), Vector2(22, size.y - 22), Vector2(size.x - 22, size.y - 22)]
|
||||
for position in positions:
|
||||
draw_circle(position + Vector2(1.5, 2.5), 8.0, Color(0.12, 0.05, 0.02, 0.45))
|
||||
draw_circle(position, 8.0, Color("#b17b24"))
|
||||
draw_circle(position - Vector2(2, 2), 4.5, CircusTheme.BRASS_LIGHT)
|
||||
draw_line(position - Vector2(3, 0), position + Vector2(3, 0), Color("#765018"), 1.5, true)
|
||||
@@ -0,0 +1 @@
|
||||
uid://biuj6k801px5u
|
||||
@@ -0,0 +1,36 @@
|
||||
class_name CircusTheme
|
||||
extends RefCounted
|
||||
## Palette e StyleBox comuni agli overlay circensi.
|
||||
|
||||
const FONT := preload("res://shared/assets/fonts/NotoSerifDisplay-CondensedExtraBold.ttf")
|
||||
const WOOD_TEXTURE := preload("res://shared/assets/textures/wood_board_rounded.png")
|
||||
const INK := Color("#482615")
|
||||
const BRASS := Color("#d5a83f")
|
||||
const BRASS_LIGHT := Color("#f6d77a")
|
||||
|
||||
|
||||
static func flat_style(color: Color, border: Color, width: int, radius: int) -> StyleBoxFlat:
|
||||
var style := StyleBoxFlat.new()
|
||||
style.bg_color = color
|
||||
style.border_color = border
|
||||
style.set_border_width_all(width)
|
||||
style.set_corner_radius_all(radius)
|
||||
return style
|
||||
|
||||
|
||||
static func wood_style() -> StyleBoxTexture:
|
||||
var style := StyleBoxTexture.new()
|
||||
style.texture = WOOD_TEXTURE
|
||||
style.texture_margin_left = 35.0
|
||||
style.texture_margin_right = 35.0
|
||||
style.texture_margin_top = 35.0
|
||||
style.texture_margin_bottom = 35.0
|
||||
return style
|
||||
|
||||
|
||||
static func button_style(color: Color, border: Color, width: int, radius: int = 14) -> StyleBoxFlat:
|
||||
var style := flat_style(color, border, width, radius)
|
||||
style.shadow_color = Color(0.14, 0.05, 0.02, 0.48)
|
||||
style.shadow_size = 6
|
||||
style.shadow_offset = Vector2(0, 4)
|
||||
return style
|
||||
@@ -0,0 +1 @@
|
||||
uid://cir4lpc4uim1b
|
||||
@@ -0,0 +1,22 @@
|
||||
class_name CircusTrim
|
||||
extends Control
|
||||
## Filo di bandierine decorativo riutilizzabile.
|
||||
|
||||
@export var flag_count := 11
|
||||
@export var span := 440.0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
queue_redraw()
|
||||
|
||||
|
||||
func _draw() -> void:
|
||||
var colors := [Color("#a9403e"), Color("#d5a83f"), Color("#397b76")]
|
||||
var start_x := (size.x - span) * 0.5
|
||||
draw_line(Vector2(start_x - 10, 8), Vector2(start_x + span + 10, 8), Color("#63361f"), 3.0, true)
|
||||
for index in flag_count:
|
||||
var x := start_x + index * (span / float(flag_count - 1)) - 16.0
|
||||
var points := PackedVector2Array([Vector2(x, 7), Vector2(x + 32, 7), Vector2(x + 16, 31)])
|
||||
draw_colored_polygon(points, colors[index % colors.size()])
|
||||
draw_polyline(PackedVector2Array([points[0], points[1], points[2], points[0]]), Color("#6b341c"), 1.5, true)
|
||||
@@ -0,0 +1 @@
|
||||
uid://cinfcyv6v0h2y
|
||||
Reference in New Issue
Block a user