diff --git a/assets/ui/SO008A.BMP b/assets/ui/SO008A.BMP new file mode 100644 index 0000000..a935ad3 Binary files /dev/null and b/assets/ui/SO008A.BMP differ diff --git a/assets/ui/SO008A.BMP.import b/assets/ui/SO008A.BMP.import new file mode 100644 index 0000000..711ec81 --- /dev/null +++ b/assets/ui/SO008A.BMP.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cau61m1755dkn" +path="res://.godot/imported/SO008A.BMP-dedc5f46caf0f66b50eed190cef6a3a9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/SO008A.BMP" +dest_files=["res://.godot/imported/SO008A.BMP-dedc5f46caf0f66b50eed190cef6a3a9.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 diff --git a/docs/todo.txt b/docs/todo.txt index b5b9e21..5dbdb38 100644 --- a/docs/todo.txt +++ b/docs/todo.txt @@ -1,9 +1,7 @@ -* Reogranize files * Singletons named 'XXXServer' * Dialogue scene command system (ShowText, ShowSprite, MoveSprite, PlaySound, ChangeBackground, etc) * Need to figure out more complicated systems like choices, script eval, conditionals, jumping, etc. Probably end up wanting a DialogueEditor or just making them gdscripts and being done with it * Finish Dialogue Scene (fast forward, auto, history functionality, etc) -* Units have an AppearanceInfo component that has a dictionary of str, UnitAppearance. UnitAppearance stores idle sprite, walking sprite, back, front, portrait, etc. AppearanceInfo specifies the current UnitAppearance and has methods for getting that data * Finish main menu * Game Start screen * Load Data Screen @@ -12,6 +10,5 @@ * Battle View * Fog of war * Basic map editor (test map data will be harder to craft the more we add) - * Walking animations * Start plugging in the Himegari UI * Dialog boxes \ No newline at end of file diff --git a/prefabs/combat_ui.tscn b/prefabs/combat_ui.tscn index 52c9be0..3f79791 100644 --- a/prefabs/combat_ui.tscn +++ b/prefabs/combat_ui.tscn @@ -2,47 +2,62 @@ [ext_resource type="Theme" uid="uid://dx26d6py3n8xi" path="res://resources/main_ui_theme.tres" id="1_2ro41"] [ext_resource type="Script" uid="uid://w2wh6gtv3u2l" path="res://scripts/battle/combat_ui.gd" id="2_ui_script"] +[ext_resource type="Texture2D" uid="uid://cau61m1755dkn" path="res://assets/ui/SO008A.BMP" id="3_tfn3h"] -[node name="CombatUI" type="CanvasLayer" unique_id=1093388037] +[sub_resource type="AtlasTexture" id="AtlasTexture_hadma"] +atlas = ExtResource("3_tfn3h") +region = Rect2(0, 0, 800, 600) + +[node name="BattleViewUI" type="CanvasLayer" unique_id=1093388037] script = ExtResource("2_ui_script") -[node name="UnitPanel" type="PanelContainer" parent="." unique_id=2000000001] +[node name="UIBase" type="Control" parent="." unique_id=7839209] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 1 + +[node name="UnitPanel" type="PanelContainer" parent="UIBase" unique_id=2000000001] unique_name_in_owner = true visible = false +layout_mode = 1 anchors_preset = 2 anchor_top = 1.0 anchor_bottom = 1.0 offset_left = 8.0 -offset_top = -78.0 +offset_top = -70.0 offset_right = 208.0 -offset_bottom = -8.0 grow_vertical = 0 theme = ExtResource("1_2ro41") -[node name="MarginContainer" type="MarginContainer" parent="UnitPanel" unique_id=899996785] +[node name="MarginContainer" type="MarginContainer" parent="UIBase/UnitPanel" unique_id=899996785] layout_mode = 2 theme_override_constants/margin_left = 8 theme_override_constants/margin_top = 8 theme_override_constants/margin_right = 8 theme_override_constants/margin_bottom = 8 -[node name="VBoxContainer" type="VBoxContainer" parent="UnitPanel/MarginContainer" unique_id=333573880] +[node name="VBoxContainer" type="VBoxContainer" parent="UIBase/UnitPanel/MarginContainer" unique_id=333573880] layout_mode = 2 -[node name="NameLabel" type="Label" parent="UnitPanel/MarginContainer/VBoxContainer" unique_id=2000000002] +[node name="NameLabel" type="Label" parent="UIBase/UnitPanel/MarginContainer/VBoxContainer" unique_id=2000000002] unique_name_in_owner = true layout_mode = 2 text = "Unit" -[node name="HPBar" type="ProgressBar" parent="UnitPanel/MarginContainer/VBoxContainer" unique_id=2000000003] +[node name="HPBar" type="ProgressBar" parent="UIBase/UnitPanel/MarginContainer/VBoxContainer" unique_id=2000000003] unique_name_in_owner = true layout_mode = 2 value = 100.0 show_percentage = false -[node name="BackgroundTint" type="ColorRect" parent="." unique_id=253893594] +[node name="BackgroundTint" type="ColorRect" parent="UIBase" unique_id=253893594] unique_name_in_owner = true visible = false +layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -50,121 +65,135 @@ grow_horizontal = 2 grow_vertical = 2 color = Color(0, 0, 0, 0.4) -[node name="CombatProposalPanel" type="PanelContainer" parent="." unique_id=2088533653] +[node name="CombatProposalPanel" type="PanelContainer" parent="UIBase" unique_id=2088533653] unique_name_in_owner = true visible = false +layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 +offset_left = -88.0 +offset_top = -103.5 +offset_right = 88.0 +offset_bottom = 103.5 grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("1_2ro41") -[node name="MarginContainer" type="MarginContainer" parent="CombatProposalPanel" unique_id=924522188] +[node name="MarginContainer" type="MarginContainer" parent="UIBase/CombatProposalPanel" unique_id=924522188] layout_mode = 2 theme_override_constants/margin_left = 12 theme_override_constants/margin_top = 12 theme_override_constants/margin_right = 12 theme_override_constants/margin_bottom = 12 -[node name="VBoxContainer" type="VBoxContainer" parent="CombatProposalPanel/MarginContainer" unique_id=666671196] +[node name="VBoxContainer" type="VBoxContainer" parent="UIBase/CombatProposalPanel/MarginContainer" unique_id=666671196] layout_mode = 2 -[node name="TitleLabel" type="Label" parent="CombatProposalPanel/MarginContainer/VBoxContainer" unique_id=1520669125] +[node name="TitleLabel" type="Label" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer" unique_id=1520669125] layout_mode = 2 text = "COMBAT FORECAST" horizontal_alignment = 1 -[node name="StatsContainer" type="HBoxContainer" parent="CombatProposalPanel/MarginContainer/VBoxContainer" unique_id=1101898616] +[node name="StatsContainer" type="HBoxContainer" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer" unique_id=1101898616] layout_mode = 2 theme_override_constants/separation = 24 -[node name="AttackerStats" type="VBoxContainer" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer" unique_id=1193603706] +[node name="AttackerStats" type="VBoxContainer" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer" unique_id=1193603706] layout_mode = 2 -[node name="AttackerNameLabel" type="Label" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=1574861154] +[node name="AttackerNameLabel" type="Label" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=1574861154] unique_name_in_owner = true layout_mode = 2 text = "Attacker" -[node name="AttackerTacticSelect" type="OptionButton" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=1466363800] +[node name="AttackerTacticSelect" type="OptionButton" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=1466363800] unique_name_in_owner = true layout_mode = 2 -[node name="AttackerHPBar" type="ProgressBar" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=241886156] +[node name="AttackerHPBar" type="ProgressBar" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=241886156] unique_name_in_owner = true layout_mode = 2 show_percentage = false -[node name="AttackerATKLabel" type="Label" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=1656041171] +[node name="AttackerATKLabel" type="Label" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=1656041171] unique_name_in_owner = true layout_mode = 2 text = "ATK: 0" -[node name="AttackerDEFLabel" type="Label" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=2145851939] +[node name="AttackerDEFLabel" type="Label" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=2145851939] unique_name_in_owner = true layout_mode = 2 text = "DEF: 0" -[node name="AttackerHITLabel" type="Label" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=1234331828] +[node name="AttackerHITLabel" type="Label" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=1234331828] unique_name_in_owner = true layout_mode = 2 text = "HIT: 0%" -[node name="AttackerSPDLabel" type="Label" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=1461624142] +[node name="AttackerSPDLabel" type="Label" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/AttackerStats" unique_id=1461624142] unique_name_in_owner = true layout_mode = 2 text = "SPD: 0" -[node name="DefenderStats" type="VBoxContainer" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer" unique_id=1747482540] +[node name="DefenderStats" type="VBoxContainer" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer" unique_id=1747482540] layout_mode = 2 -[node name="DefenderNameLabel" type="Label" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=365769500] +[node name="DefenderNameLabel" type="Label" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=365769500] unique_name_in_owner = true layout_mode = 2 text = "Defender" -[node name="DefenderTacticSelect" type="OptionButton" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=1226652499] +[node name="DefenderTacticSelect" type="OptionButton" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=1226652499] unique_name_in_owner = true layout_mode = 2 -[node name="DefenderHPBar" type="ProgressBar" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=1878516243] +[node name="DefenderHPBar" type="ProgressBar" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=1878516243] unique_name_in_owner = true layout_mode = 2 show_percentage = false -[node name="DefenderATKLabel" type="Label" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=1571527922] +[node name="DefenderATKLabel" type="Label" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=1571527922] unique_name_in_owner = true layout_mode = 2 text = "ATK: 0" -[node name="DefenderDEFLabel" type="Label" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=1755454849] +[node name="DefenderDEFLabel" type="Label" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=1755454849] unique_name_in_owner = true layout_mode = 2 text = "DEF: 0" -[node name="DefenderHITLabel" type="Label" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=717216786] +[node name="DefenderHITLabel" type="Label" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=717216786] unique_name_in_owner = true layout_mode = 2 text = "HIT: 0%" -[node name="DefenderSPDLabel" type="Label" parent="CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=132072292] +[node name="DefenderSPDLabel" type="Label" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/StatsContainer/DefenderStats" unique_id=132072292] unique_name_in_owner = true layout_mode = 2 text = "SPD: 0" -[node name="ButtonContainer" type="HBoxContainer" parent="CombatProposalPanel/MarginContainer/VBoxContainer" unique_id=2145647565] +[node name="ButtonContainer" type="HBoxContainer" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer" unique_id=2145647565] layout_mode = 2 alignment = 1 -[node name="FightButton" type="Button" parent="CombatProposalPanel/MarginContainer/VBoxContainer/ButtonContainer" unique_id=2109262268] +[node name="FightButton" type="Button" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/ButtonContainer" unique_id=2109262268] unique_name_in_owner = true layout_mode = 2 text = "Fight" -[node name="CancelButton" type="Button" parent="CombatProposalPanel/MarginContainer/VBoxContainer/ButtonContainer" unique_id=238295206] +[node name="CancelButton" type="Button" parent="UIBase/CombatProposalPanel/MarginContainer/VBoxContainer/ButtonContainer" unique_id=238295206] unique_name_in_owner = true layout_mode = 2 text = "Cancel" + +[node name="TextureRect" type="TextureRect" parent="UIBase" unique_id=1726665864] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = SubResource("AtlasTexture_hadma") diff --git a/prefabs/unit.tscn b/prefabs/unit.tscn index 0addf09..90f12f0 100644 --- a/prefabs/unit.tscn +++ b/prefabs/unit.tscn @@ -25,7 +25,7 @@ func _on_unit_unit_allegiance_changed(_unit: Unit, allegiance: UnitAllegiance) - [sub_resource type="ShaderMaterial" id="ShaderMaterial_fhs1y"] shader = ExtResource("3_fhs1y") shader_parameter/key_color = Color(0, 1, 0, 1) -shader_parameter/threshold = 0.01 +shader_parameter/threshold = 0.750000035625 [sub_resource type="AtlasTexture" id="AtlasTexture_fhs1y"] atlas = ExtResource("3_on614") diff --git a/project.godot b/project.godot index 588d496..b4547f9 100644 --- a/project.godot +++ b/project.godot @@ -38,6 +38,5 @@ debug_toggle={ [rendering] -textures/canvas_textures/default_texture_filter=0 rendering_device/driver.windows="d3d12" renderer/rendering_method="mobile"