I am getting on average 30(35ms) for draw on the debugger. Here is a screenshot of the game:
Would the size of the images be the cause of high draw time or something else?
You can click the buttons, type in the chat, add friends, block friends, send friend requests. I have several classes doing all these.
You can also hover over buttons to change the alpha.
All images were large originally but were scaled down.
I just have a background with 3 buttons, each of size 45kb. My draw MS goes to around 4.
These are created just using FlxButton.
This is the new function under FlxSpriteGroup, all other functions commented out.
public function new(x:Float, y:Float, width:Int, height:Int, url:String)
this.width = width;
this.height = height;
this.dispatcher = new EventDispatcher(this);
btn = new FlxButton(0, 0, "", pressed);
this.background = new MyRect(0, 0, width, height);
background.alpha = 0;
I also get 1-2ms on an empty state.
EDIT: FlxButton was the problem. Not sure why it created such poor performance! Creating my own button class solved this issue.