#231 - the abilities were hard to use on a keyboard. "The currently selected weapons" names a real mechanism: MouseCombatController (#80) has number keys that SELECT which weapon a click fires. That is two acts for one shot, and the selection is invisible unless you look at the buttons. Q, E and space now fire the gas bomb, the laser and the dash outright, wherever the mouse already points. It goes through fire_at(), the same public entry the click path uses, so every guard comes with it - no hull ready, cannot afford the shot, a panel over the button. The number keys stay: they are not what this ticket is about, and removing them would take the click path's abilities with them. Q and E were already taken - they pivot the formation - so the pivot pair moved to Z and C, one row under the movement keys and still left-hand. That is a change to a control the ticket did not mention, and the one thing here worth arguing with. test_keyboard_input spelled Q and E out and so reported a broken pivot when the pivot was fine. It reads KEY_PIVOT_CW/CCW off the controller now, and additionally asserts the pair is not bound to an ability key - the failure that would actually matter. #230 - the upkeep menu never added anything up. Two faults, and the second is invisible from the code. There was no TOTAL, so the bill had to be done in the player's head. And the rows were one Label padded with %-16s, which aligns only in a monospace font - the theme's is CarroisGothicSC, which is proportional - with autowrap on top, so a long row folded and the table lost its shape. A real GridContainer now: header, a row per paying berth, and a TOTAL. The headline carries both figures, because they answer different questions - the per-charge bill is what the player watches happen, the per-minute rate is what they plan against. Amounts are listed in the game's resource order rather than the dictionary's. The screenshot showed "2 ore 1 energy" on one row above "2 gas 2 ore" on the next, which defeats the point of a column. The sheet is rebuilt only when the numbers change. BuildController refreshes this menu every frame while it is open, and rebuilding a dozen Labels per frame for figures that move every 25 seconds is what #6 and #10 are about. The test refreshes twice and asserts the same cell objects come back. Every figure still comes from fleet_upkeep_breakdown(), the calculation the charging loop itself runs - the new total sums those same per-berth costs rather than recomputing them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
89 lines
2.2 KiB
Text
89 lines
2.2 KiB
Text
[gd_scene load_steps=3 format=3]
|
|
|
|
[ext_resource type="Script" path="res://ui/IconButton.gd" id="icon"]
|
|
[ext_resource type="Script" path="res://ui/menus/FleetUpkeepMenu.gd" id="menu"]
|
|
|
|
[node name="FleetUpkeepMenu" type="Control" groups=["modal_menus"]]
|
|
visible = false
|
|
mouse_filter = 2
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
script = ExtResource("menu")
|
|
|
|
[node name="Backdrop" type="ColorRect" parent="."]
|
|
mouse_filter = 2
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
color = Color(0.03, 0.03, 0.08, 0.96)
|
|
|
|
[node name="TitleLabel" type="Label" parent="."]
|
|
mouse_filter = 2
|
|
anchor_right = 1.0
|
|
offset_left = 24.0
|
|
offset_top = 24.0
|
|
offset_right = -180.0
|
|
offset_bottom = 100.0
|
|
theme_override_font_sizes/font_size = 40
|
|
text = "FLEET UPKEEP"
|
|
horizontal_alignment = 1
|
|
|
|
[node name="CloseButton" type="Control" parent="."]
|
|
anchor_left = 1.0
|
|
anchor_right = 1.0
|
|
offset_left = -140.0
|
|
offset_top = 24.0
|
|
offset_right = -24.0
|
|
offset_bottom = 140.0
|
|
script = ExtResource("icon")
|
|
icon = 1
|
|
glow_color = Color(0.55, 0.6, 1, 1)
|
|
|
|
[node name="TotalLabel" type="Label" parent="."]
|
|
mouse_filter = 2
|
|
anchor_right = 1.0
|
|
offset_left = 32.0
|
|
offset_top = 150.0
|
|
offset_right = -32.0
|
|
offset_bottom = 220.0
|
|
theme_override_font_sizes/font_size = 32
|
|
theme_override_colors/font_color = Color(1, 0.85, 0.35, 1)
|
|
text = ""
|
|
horizontal_alignment = 1
|
|
|
|
[node name="Sheet" type="GridContainer" parent="."]
|
|
mouse_filter = 2
|
|
anchor_right = 1.0
|
|
offset_left = 32.0
|
|
offset_top = 250.0
|
|
offset_right = -32.0
|
|
offset_bottom = 860.0
|
|
columns = 5
|
|
theme_override_constants/h_separation = 24
|
|
theme_override_constants/v_separation = 10
|
|
|
|
[node name="EmptyLabel" type="Label" parent="."]
|
|
mouse_filter = 2
|
|
anchor_right = 1.0
|
|
offset_left = 32.0
|
|
offset_top = 250.0
|
|
offset_right = -32.0
|
|
offset_bottom = 400.0
|
|
theme_override_font_sizes/font_size = 30
|
|
theme_override_colors/font_color = Color(0.72, 0.88, 0.96, 1)
|
|
text = ""
|
|
horizontal_alignment = 1
|
|
autowrap_mode = 2
|
|
|
|
[node name="FormulaLabel" type="Label" parent="."]
|
|
mouse_filter = 2
|
|
anchor_right = 1.0
|
|
offset_left = 40.0
|
|
offset_top = 880.0
|
|
offset_right = -40.0
|
|
offset_bottom = 1060.0
|
|
theme_override_font_sizes/font_size = 26
|
|
theme_override_colors/font_color = Color(0.55, 0.78, 0.86, 1)
|
|
text = ""
|
|
horizontal_alignment = 1
|
|
vertical_alignment = 1
|
|
autowrap_mode = 2
|