Hauptmenü Vollbild-Hintergrundbild mit Dark Fantasy Artwork

- Background+GameName.png, Background.png, Banner.png hinzugefügt
- main_menu.tscn: TextureRect als Vollbild-Hintergrund (skaliert automatisch),
  Buttons auf semi-transparentem Panel unten links
- main_menu.gd: lädt bevorzugt Background+GameName, Fallback auf Background/Banner

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Andre 2026-03-19 22:54:48 +01:00
parent aa4b998e8a
commit 2096a18cd1
8 changed files with 178 additions and 62 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dfc7vy7n2se3c"
path="res://.godot/imported/Background+GameName.png-5d0c8d248bff8761127b27928efffb70.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Icons/Background+GameName.png"
dest_files=["res://.godot/imported/Background+GameName.png-5d0c8d248bff8761127b27928efffb70.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/Icons/Background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c7gfrjfd33p10"
path="res://.godot/imported/Background.png-384d361f980e77552ff28857a0feceaf.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Icons/Background.png"
dest_files=["res://.godot/imported/Background.png-384d361f980e77552ff28857a0feceaf.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/Icons/Banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cvl64mhemrc5f"
path="res://.godot/imported/Banner.png-a1044e4307a2c9840d3f20ab19f649bb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Icons/Banner.png"
dest_files=["res://.godot/imported/Banner.png-a1044e4307a2c9840d3f20ab19f649bb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -4,13 +4,12 @@ extends CanvasLayer
signal start_game
@onready var background = $Background
@onready var main_panel = $Background/MainPanel
@onready var settings_panel = $Background/SettingsPanel
@onready var play_btn = $Background/MainPanel/VBoxContainer/PlayBtn
@onready var settings_btn = $Background/MainPanel/VBoxContainer/SettingsBtn
@onready var quit_btn = $Background/MainPanel/VBoxContainer/QuitBtn
@onready var banner_image = $Background/MainPanel/BannerImage
@onready var fallback_title = $Background/MainPanel/FallbackTitle
@onready var play_btn = $Background/MainPanel/ButtonPanel/VBoxContainer/PlayBtn
@onready var settings_btn = $Background/MainPanel/ButtonPanel/VBoxContainer/SettingsBtn
@onready var quit_btn = $Background/MainPanel/ButtonPanel/VBoxContainer/QuitBtn
# Settings Controls
@onready var resolution_option = $Background/SettingsPanel/VBoxContainer/ResolutionRow/ResolutionOption
@ -19,6 +18,9 @@ signal start_game
@onready var msaa_option = $Background/SettingsPanel/VBoxContainer/MSAARow/MSAAOption
@onready var back_btn = $Background/SettingsPanel/VBoxContainer/BackBtn
# Bevorzugte Reihenfolge: Hintergrund mit Titel, dann ohne, dann Banner
const BG_WITH_TITLE = "res://assets/Icons/Background+GameName.png"
const BG_PLAIN = "res://assets/Icons/Background.png"
const BANNER_PATH = "res://assets/Icons/Banner.png"
# Auflösungen
@ -38,14 +40,13 @@ func _ready():
main_panel.visible = true
settings_panel.visible = false
# Banner laden wenn vorhanden, sonst Fallback-Titel zeigen
if ResourceLoader.exists(BANNER_PATH):
banner_image.texture = load(BANNER_PATH)
banner_image.visible = true
fallback_title.visible = false
else:
banner_image.visible = false
fallback_title.visible = true
# Hintergrundbild laden: zuerst mit Titel, dann ohne, dann Banner
if ResourceLoader.exists(BG_WITH_TITLE):
background.texture = load(BG_WITH_TITLE)
elif ResourceLoader.exists(BG_PLAIN):
background.texture = load(BG_PLAIN)
elif ResourceLoader.exists(BANNER_PATH):
background.texture = load(BANNER_PATH)
play_btn.pressed.connect(_on_play)
settings_btn.pressed.connect(_on_settings)

View file

@ -2,8 +2,17 @@
[ext_resource type="Script" path="res://main_menu.gd" id="1_menu"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bg"]
bg_color = Color(0.04, 0.04, 0.07, 1.0)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_btn_panel"]
bg_color = Color(0.04, 0.03, 0.07, 0.78)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.25, 0.20, 0.35, 0.6)
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_settings"]
bg_color = Color(0.07, 0.06, 0.11, 0.97)
@ -20,12 +29,13 @@ corner_radius_bottom_left = 10
[node name="MainMenu" type="CanvasLayer"]
script = ExtResource("1_menu")
[node name="Background" type="Panel" parent="."]
[node name="Background" type="TextureRect" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
theme_override_styles/panel = SubResource("StyleBoxFlat_bg")
expand_mode = 1
stretch_mode = 6
[node name="MainPanel" type="Control" parent="Background"]
layout_mode = 1
@ -33,57 +43,42 @@ anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
[node name="BannerImage" type="TextureRect" parent="Background/MainPanel"]
[node name="ButtonPanel" type="Panel" parent="Background/MainPanel"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.0
anchor_top = 0.0
anchor_left = 0.05
anchor_top = 0.62
anchor_right = 0.28
anchor_bottom = 0.92
theme_override_styles/panel = SubResource("StyleBoxFlat_btn_panel")
[node name="VBoxContainer" type="VBoxContainer" parent="Background/MainPanel/ButtonPanel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 0.0
offset_top = 60.0
offset_bottom = 300.0
expand_mode = 1
stretch_mode = 6
anchor_bottom = 1.0
offset_left = 16.0
offset_top = 16.0
offset_right = -16.0
offset_bottom = -16.0
theme_override_constants/separation = 14
[node name="FallbackTitle" type="Label" parent="Background/MainPanel"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 0.0
offset_top = 80.0
offset_bottom = 200.0
theme_override_font_sizes/font_size = 72
text = "DungeonCrawler"
horizontal_alignment = 1
vertical_alignment = 1
[node name="VBoxContainer" type="VBoxContainer" parent="Background/MainPanel"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.35
anchor_top = 0.45
anchor_right = 0.65
anchor_bottom = 0.88
theme_override_constants/separation = 18
[node name="PlayBtn" type="Button" parent="Background/MainPanel/VBoxContainer"]
custom_minimum_size = Vector2(0, 60)
[node name="PlayBtn" type="Button" parent="Background/MainPanel/ButtonPanel/VBoxContainer"]
custom_minimum_size = Vector2(0, 55)
layout_mode = 2
theme_override_font_sizes/font_size = 24
theme_override_font_sizes/font_size = 22
text = "Spielen"
[node name="SettingsBtn" type="Button" parent="Background/MainPanel/VBoxContainer"]
custom_minimum_size = Vector2(0, 60)
[node name="SettingsBtn" type="Button" parent="Background/MainPanel/ButtonPanel/VBoxContainer"]
custom_minimum_size = Vector2(0, 55)
layout_mode = 2
theme_override_font_sizes/font_size = 24
theme_override_font_sizes/font_size = 22
text = "Einstellungen"
[node name="QuitBtn" type="Button" parent="Background/MainPanel/VBoxContainer"]
custom_minimum_size = Vector2(0, 60)
[node name="QuitBtn" type="Button" parent="Background/MainPanel/ButtonPanel/VBoxContainer"]
custom_minimum_size = Vector2(0, 55)
layout_mode = 2
theme_override_font_sizes/font_size = 24
theme_override_font_sizes/font_size = 22
text = "Beenden"
[node name="VersionLabel" type="Label" parent="Background/MainPanel"]
@ -93,13 +88,13 @@ anchor_left = 0.0
anchor_top = 1.0
anchor_right = 0.0
anchor_bottom = 1.0
offset_left = 16.0
offset_top = -28.0
offset_left = 12.0
offset_top = -26.0
offset_right = 200.0
offset_bottom = -8.0
offset_bottom = -6.0
theme_override_font_sizes/font_size = 12
text = "v0.1 Alpha"
modulate = Color(0.5, 0.5, 0.5, 1.0)
modulate = Color(0.6, 0.55, 0.45, 0.8)
[node name="SettingsPanel" type="Panel" parent="Background"]
visible = false