flixel-ui icon indicating copy to clipboard operation
flixel-ui copied to clipboard

UI editor

Open Gama11 opened this issue 11 years ago • 10 comments

Some sort of UI editor, whether it'd be in-game (preferable IMO) or using an external software would be extremely handy for obvious reasons.

Gama11 avatar Jul 19 '13 16:07 Gama11

I quite agree with you

kevinmw avatar Aug 22 '13 09:08 kevinmw

So, obviously we can use Flixel-UI to make a ui builder for flixel-ui. So the question is what do we want this thing to do? Here's what I'm thinking:

  1. Call up in-game (kind of like the debugger)
  2. Ability to resize/move around so it's not in your way and you can actually use it
  3. Ability to select objects on the screen
  4. Property inspector for selected objects
    • Expose variables as editable widgets (Editable text fields, numeric steppers, etc)
    • Show raw XML
    • Optionally reload interface on change (hopefully fast enough to use in real time)
  5. Save current layout as XML (pick place to save)
  6. Save xml to your assets folder

Anything else?

larsiusprime avatar Aug 31 '13 01:08 larsiusprime

This may also give you ideas for an initial version http://www.bit-101.com/MinimalDesigner/ Expose variables can maybe look like this properties panel, I like the rest of your ideas.

impaler avatar Aug 31 '13 02:08 impaler

Yeah, the real question is whether it should be it's own standalone application, or something you can run from within your app (probably with a compiler flag so the UI-editor bloat doesn't appear in a release version).

If I do it right, presumably both would work.

larsiusprime avatar Aug 31 '13 02:08 larsiusprime

Interesting I have only used ui editors as a separate tool, if you could make quick edits in game that would be pretty cool. If it does this in your game, you could maybe make use the native targets file.io to update the ui's xml file. I remember you added better indentation / readability etc with the parser?

Also feel free to make use of any flixel-tools commands for it. Maybe there could be a flixel ui -n "MainMenu" to create a new template. It could then have an option to launch this ui editor automatically, I would be happy to add this.

Maybe even a different extension to flixel-ui xml would be useful eg main-menu.flxui.

On Sat, Aug 31, 2013 at 12:25 PM, Lars Doucet [email protected]:

Yeah, the real question is whether it should be it's own standalone application, or something you can run from within your app (probably with a compiler flag so the UI-editor bloat doesn't appear in a release version).

If I do it right, presumably both would work.

— Reply to this email directly or view it on GitHubhttps://github.com/HaxeFlixel/flixel-ui/issues/5#issuecomment-23599093 .

impaler avatar Aug 31 '13 02:08 impaler

Not sure about compiler flags for this. I'm definitely all for an in-game editor, that would be amazing.

How about realizing this via a FlxPlugin? The user would then need to create and add it himself to use the editor:

FlxG.plugins.add(new FlxUIEditor());

Gama11 avatar Aug 31 '13 06:08 Gama11

Yeah, that might be the best bet (making it as a plugin). That seems really straightforward and easy.

As for flixel-tools, I'm all for that, I just don't know much about the system. It'll be a while more before I get started on this, but if you guys want to start working on a "wish list" or hammering out some details, I'll come back when we have a clearer picture of what we want to do and start implementing it.

larsiusprime avatar Aug 31 '13 20:08 larsiusprime

Has anything been done on this since Aug 2013? I was trying to just get a live preview going and was having some issues that I am hoping someone else might have solved.

IkonOne avatar Oct 24 '14 17:10 IkonOne

There is not currently any actual UI editor, it's just a "nice to have" feature at this point. That said, there are two ways to enable something like "live preview" in FlxUI:

  1. provide a liveFilePath parameter during FlxUI construction (kinda hacky, and only works on sys targets)
  2. Make changes to your flixel-ui xml while your app is running, open a command line to where your haxe project is and type "lime update windows" (or whatever your target is) to refresh your asset manifest, then in your game press some key you've set up to reload the state.

larsiusprime avatar Oct 24 '14 18:10 larsiusprime

This issue should be closed and added to flixel-editors instead?

larsiusprime avatar Jan 19 '15 18:01 larsiusprime