snowkit / mint

A framework/renderer agnostic Minimal UI interface library for Haxe.
http://snowkit.github.io/mint/
MIT License
65 stars 19 forks source link

Mint Luxe Renderer needs font option #25

Closed ImDeity closed 9 years ago

ImDeity commented 9 years ago

It seems the Mint Luxe renderer has no way to specify a custom font (and many other font properties like outline): https://github.com/snowkit/mint/blob/913b62b5ae9029b6c54eb9e05ce2cd2d43393e24/mint/render/luxe/Label.hx#L40-L53

@mrcdk seems to have a workaround that involves going to the Luxe scene and getting the entity to change the font but that's obviously not ideal: https://github.com/mrcdk/ld33/blob/18dfcdec2a325dc7b4b4aa02991a6bab94115913/src/GameState.hx#L153-L155

ruby0x1 commented 9 years ago

The example shows how to grab the text object from the control renderer, and manipulate it directly. It's an expected pattern as mint will never expose every detail of the backed rendering (it can't).

        var _render:mint.render.luxe.Label = cast thelabel.renderer;
              _render.text.stuff = //the actual luxe.Text

(Note this, which will be fixed soon)