Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlxBitmapText does not permit negative line spacing #1984

Closed
seraku24 opened this issue Oct 25, 2016 · 1 comment
Closed

FlxBitmapText does not permit negative line spacing #1984

seraku24 opened this issue Oct 25, 2016 · 1 comment

Comments

@seraku24
Copy link
Contributor

seraku24 commented Oct 25, 2016

  • Flixel version: 4.2.0
  • OpenFL version: 3.6.1
  • Lime version: 2.9.1
  • Affected targets: flash, and (possibly) all others

Code snippet reproducing the issue:

package;

import flixel.FlxG;
import flixel.FlxState;
import flixel.text.FlxBitmapText;

class PlayState extends FlxState
{
    override public function create():Void {
        var bitmapText = new FlxBitmapText();
        var desiredLineSpacing = -5;
        bitmapText.lineSpacing = desiredLineSpacing;
        if (bitmapText.lineSpacing != desiredLineSpacing) {
            FlxG.log.error("FlxBitmapText.lineSpacing is not desired value.");
        }
    }
}

Observed behavior:
The lineSpacing property becomes a positive value, specifically the absolute value.

Expected behavior:
The lineSpacing property allows a negative value to be set.

NOTE: Near as I can tell, the text layout code in FlxBitmapText is already written properly to support a negative value for lineSpacing which would result in condensed spacing. The issue, then, lies within the property setter enforcing a positive-only value.

@Gama11
Copy link
Member

Gama11 commented Oct 25, 2016

This seems familiar. :) #1603

@Gama11 Gama11 closed this as completed in 84583f0 Oct 25, 2016
Aurel300 pushed a commit to larsiusprime/haxeflixel that referenced this issue Apr 18, 2018
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

No branches or pull requests

2 participants