HaxeFlixel / HaxeFlixel/flixel-ui

radio_group doesn't apply font to last radio

Open
#220 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haxe
Stars
201
Forks
75
PR merge metrics
No merged PRs in 30d

Description

The xml below produces the attached screenshot. The problem is that the font from the definition is not applied to the last radio in the group. If I change the number of radios it is always the last one that doesn't get the font. Most likely some off-by-one error. Notice that the color which is also defined in the definition does work for all radios.

radio_groups2

<?xml version="1.0" encoding="utf-8" ?>
<data>
    <definition name="def1">
        <text color="red" font="verdana"/>
    </definition>

    <radio_group name="radio1" x="10" y="10" use_def="def1">
        <radio name="one" label="one" />
        <radio name="two" label="two" />
        <radio name="three" label="three" />
    </radio_group>
    
</data>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the XML reproduction in the issue and trace how radio_group applies the definition to each radio, focusing on why the final radio is skipped. Verify the fix by changing the number of radios and confirming every radio receives the Verdana font while the red color continues to apply.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.