Skip to content

Fix empty settings/level-list windows + off-centre enemy sprites (v1.1.4) - #4

Merged
Alex2pankrat merged 2 commits into
mainfrom
arena/158335be-bulwark
Nov 23, 2026
Merged

Alex2pankrat merged 2 commits into
mainfrom
arena/158335be-bulwark

Conversation

@Alex2pankrat

Copy link
Copy Markdown
Owner

What

Fixes two bugs reported on the v1.1.3 build:

  1. Settings window AND mission/level-list window render EMPTY.
    Two GDScript parse errors prevented their _build() from running:

    • src/ui/settings_panel.gd called super._notification(what). The parent
      (Control) defines no _notification in GDScript, so on Godot 4.7 the call
      is a parse error (documented by the comment at game_screen.gd:1048), which
      aborted building the window. Removed the call.
    • src/ui/level_select.gd set
      row.flow_direction = FlowContainer.FLOW_DIRECTION_LEFT_TO_RIGHT. Godot 4.7.2
      FlowContainer has no flow_direction property (verified in
      scene/gui/flow_container.h), so the line is a parse error. Replaced the
      flow container with HFlowContainer.new() (the horizontal flow class).
  2. Enemy sprites slightly off-centre from their node (small enemy walks the road
    edge, HP bar looks shifted).
    Sprite2D is already centred on the node origin by default (centered = true).
    The v1.1.3 line _sprite.offset = -texture.get_size() * 0.5 additionally
    shifted 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 drawn
    above the node share one visual centre. Rotation behaviour is unchanged (node
    rotation stays 0, the sprite's own rotation follows movement direction).

Validation

  • Headless engine diagnostic (both screens + rotation/centering): settings_screen
    now builds (68 descendants vs 12/empty), level_select builds (98 vs 0/empty);
    sprite centered=true with zero offset; sprite rotation == dir.angle() at every
    frame including bends, node rotation stays 0.
  • tools/test.sh: all checks passed; autoplay VICTORY at all three difficulties
    through level 6.
  • gdlint: changed files clean (pre-existing style-only warnings untouched).

Release

  • Bumped config/version / version/name to 1.1.4 and Android version/code
    3 -> 4 (required so the APK can install over v1.1.3).

Alex2pankrat and others added 2 commits November 23, 2026 19:50
…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>
@Alex2pankrat
Alex2pankrat merged commit fe76046 into main Nov 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant