Repository navigation
Fix empty settings/level-list windows + off-centre enemy sprites (v1.1.4) - #4
Merged
Merged
Conversation
…windows - enemy.gd: Sprite2D is already centred on the node origin (centered defaults to true); the extra -texture.size*0.5 offset shifted sprites off their node. Removed the offset, set centered=true so sprites and the health bar share one visual centre. - settings_panel.gd: removed super._notification(what) — the parent (Control) defines no _notification in GDScript, so the call was a parse error on Godot 4.7 that left the window empty. - level_select.gd: replaced FlowContainer + nonexistent flow_direction (Godot 4.7.2 FlowContainer has no flow_direction) with HFlowContainer, so the mission/level list renders horizontally instead of rendering empty. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes two bugs reported on the v1.1.3 build:
Settings window AND mission/level-list window render EMPTY.
Two GDScript parse errors prevented their
_build()from running:src/ui/settings_panel.gdcalledsuper._notification(what). The parent(
Control) defines no_notificationin GDScript, so on Godot 4.7 the callis a parse error (documented by the comment at
game_screen.gd:1048), whichaborted building the window. Removed the call.
src/ui/level_select.gdsetrow.flow_direction = FlowContainer.FLOW_DIRECTION_LEFT_TO_RIGHT. Godot 4.7.2FlowContainerhas noflow_directionproperty (verified inscene/gui/flow_container.h), so the line is a parse error. Replaced theflow container with
HFlowContainer.new()(the horizontal flow class).Enemy sprites slightly off-centre from their node (small enemy walks the road
edge, HP bar looks shifted).
Sprite2Dis already centred on the node origin by default (centered = true).The v1.1.3 line
_sprite.offset = -texture.get_size() * 0.5additionallyshifted the sprite half a texture up-left, moving it off the unit. Removed the
offset and set
_sprite.centered = true, so the sprite and the health bar drawnabove the node share one visual centre. Rotation behaviour is unchanged (node
rotationstays 0, the sprite's own rotation follows movement direction).Validation
now builds (68 descendants vs 12/empty), level_select builds (98 vs 0/empty);
sprite
centered=truewith zero offset; sprite rotation ==dir.angle()at everyframe including bends, node rotation stays 0.
tools/test.sh: all checks passed; autoplay VICTORY at all three difficultiesthrough level 6.
gdlint: changed files clean (pre-existing style-only warnings untouched).Release
config/version/version/nameto1.1.4and Androidversion/code3 -> 4(required so the APK can install over v1.1.3).