Scaling only game scene. Not user interface.

39 views
Skip to first unread message

Emin Fedar

unread,
Aug 15, 2015, 9:50:01 AM8/15/15
to HaxeFlixel

How can i do this ?


SruloArt

unread,
Aug 15, 2015, 1:30:32 PM8/15/15
to HaxeFlixel
* Easy, you go to flixel-ui and use the relevant classes to create and place your menu/s :) (you need an Anchor) it also supports localization (with another library called FireTonuge) and editing / creating using .XMLs.

Emin Fedar

unread,
Aug 15, 2015, 3:57:59 PM8/15/15
to HaxeFlixel
Well, i tried something but i can't manage. I must use FlxG.switchState to add user interface. And it's not fixed user interface.

15 Ağustos 2015 Cumartesi 20:30:32 UTC+3 tarihinde SruloArt yazdı:

SruloArt

unread,
Aug 16, 2015, 8:35:37 AM8/16/15
to HaxeFlixel
* The scaleModes scale the entire game. There's no pre-made way to scale/relatively position individual objects to fit specific pixels without using the flixel-ui classes.

* If you really want to you can re-implement a similar solution yourself, but be warned, it might get tricky.

* If you know what you're doing you can add your UI as another sprite on top of the FlxGame's sprite, and deal from there. Clearly you can't use any of the HaxeFlixel's relevant classes going that path.
Reply all
Reply to author
Forward
0 new messages