How to use HaxeUI?

Why can’t I find a HaxeUI framework that can be used in Openfl 8.0, is HaxeUI not supported?:disappointed_relieved:

I believe HaxeUI on GIT supports OpenFL 8, but the updates have not been released to Haxelib yet

What is the common resolution adaptation in Openfl? Zoom? Or set the height and width?

I’ve seen people using a Sprite container for their content, then using width/height to scale

If you want the easiest possible solution, try this. If you want more control and no letterboxing, use a layout library instead.

Thanks, this is a good idea:grinning:

I found that HaxeUI’s ListView does not use a garbage pool and that a large amount of data can cause a stall. HaxeUI related questions, can I ask here?

list = new ListView();
list.width = getStageWidth();
list.height = getStageHeight();

for(i in 0...100)

list.itemRendererClass = app.view.item.GameItem;


If you use this code implementation, even unseen children will be added to addChild. It will also have 100 children, which is not suitable for data lists, or whether other components have not been found?

Unseen children being added is not wrong, OpenFL won’t render unless it knows it’s visible

Emmm, you are right, but HaxeUI’s list is not suitable for storing large amounts of data. I have already implemented a new List that can store 10,000+ pieces of data at a time and run at 60 FPS. Currently HaxeUI can only be abandoned.

How HaxeUI’s List can use the garbage pool, it is estimated that it can easily run 60FPS.

Perhaps you should talk to @IanHarrigan1982 about this, I’m sure he would not be against optimizations

… … Late to the party as usual… … :slight_smile:

What issues are you having with haxeui (except the listview). It should work with openfl8 i believe. Are you getting compiler errors? It should be in haxelib too (i think).

As for ListView, yeah, in the version that is in master branch its not suitable for large data sets. Simply put there is no virtualization at all. This means 1 data point = 1 item renderer, and that item renderer is likely to be composed of many components, meaning that a list of 1000 items can very quickly lead to 1000’s upon 1000’s of components (which for openfl are sprites). Clearly not ideal.

However, there is a new branch (that isnt released yet - “new-component-method”) that has a new listview in it that DOES pool item renders, and so you only get whats on screen, So if you have 1000 items, but can only show 5, then you only have 5 item renders (in practice its actually 6, n+1 - to make it look nicer for smooth scrolling).

Ive used this method with 1,000,000 items and it was fine: (note that last link is the “ugly” version - it works much better now like in the 1st link, ie, virtual, smooth and inertial).

So your options are: dont have 10,000 items and use master, use the branch and understand its in heavy development, or as you say, abandon HaxeUI - choice of course, is yours. :slight_smile:

Also, if you want to ask HaxeUI related stuff you can usually grab me (or others) here: - chances are ill get that quicker as i dont check forums all the time, so unless im pinged i usually wont see it.


Thanks, I need these, Cheers!:smiley:

1 Like