mirror of
https://github.com/deunix-educ/aventuriers-des-mots.git
synced 2026-10-13 02:11:58 +02:00
Visual overhaul: theme, illustrations, redesigned screens (0.3.0)
Phase "habillage" of the post-0.1.0 plan. Rendering was reviewed on real screenshots (new tools/screenshot.gd, `make screenshot`), which also caught and fixed map markers overlapping and truncated titles. - Global Godot theme (Atkinson Hyperlegible font, cream/green/gold palette, raised buttons, rounded cards, thick keyboard focus). - Original vector art: forest/marsh backdrops, Plume the owl, stars, exercise-type icons, correct/try-again icons, 10 collection items. - Redesigned world map (markers as cards with icon, title and stars, responsive layout), profile screens, mission intro, exercise host, rule/feedback panels, reward screen and collection grid. - Motion helper (pop-in, fade) honouring an animations setting. - Settings: animations flag; base window 1152x648 with canvas_items. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
extends Button
|
||||
## Un lieu de la carte : pictogramme du type d'exercice, titre, etoiles
|
||||
## gagnees (pleines/vides : la forme porte l'information, pas la couleur) et
|
||||
## etat de la competence. Scene autonome : la carte la configure et ecoute
|
||||
## `pressed`.
|
||||
|
||||
const STAR_FULL := preload("res://assets/interface/star_full.svg")
|
||||
const STAR_EMPTY := preload("res://assets/interface/star_empty.svg")
|
||||
const TYPE_ICONS := {
|
||||
"multiple_choice": "res://assets/interface/icon_multiple_choice.svg",
|
||||
"sentence_correction": "res://assets/interface/icon_sentence_correction.svg",
|
||||
"dictation": "res://assets/interface/icon_dictation.svg",
|
||||
}
|
||||
const STAR_SIZE := 24.0
|
||||
|
||||
@onready var _type_icon: TextureRect = %TypeIcon
|
||||
@onready var _title_label: Label = %TitleLabel
|
||||
@onready var _stars_row: HBoxContainer = %StarsRow
|
||||
@onready var _status_label: Label = %StatusLabel
|
||||
|
||||
|
||||
func setup(mission: Dictionary, stars: int, max_stars: int, status_text: String) -> void:
|
||||
_title_label.text = mission["title"]
|
||||
_status_label.text = status_text
|
||||
_status_label.visible = not status_text.is_empty()
|
||||
_type_icon.texture = load(TYPE_ICONS.get(mission["exercise_type"], TYPE_ICONS["multiple_choice"]))
|
||||
|
||||
for child in _stars_row.get_children():
|
||||
child.queue_free()
|
||||
for i in max_stars:
|
||||
var star := TextureRect.new()
|
||||
star.texture = STAR_FULL if i < stars else STAR_EMPTY
|
||||
star.custom_minimum_size = Vector2(STAR_SIZE, STAR_SIZE)
|
||||
star.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
|
||||
star.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
|
||||
star.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
_stars_row.add_child(star)
|
||||
Reference in New Issue
Block a user