Roll over basics

Hi there,

I am just trying some basics here and stumble upon a mystery to my Haxe world

<?xml version="1.0" encoding="utf-8"?>
<vbox id="main">
  <label text="Hello, world!" id="test" />
</vbox>

then

class Main {
    public static function main(){
    Toolkit.init();

    var main:Component = ComponentMacros.buildComponent("assets/ui/main.xml");
    Screen.instance.addComponent(main);   
	var label:Label = main.findComponent("test", null, true);
	label.registerEvent(MouseEvent.MOUSE_OVER, function(e)trace(e)); //nothing on roll over the label
            trace(label.hasEvent(MouseEvent.MOUSE_OVER)); // true
}

Shouldn’t something trace when I hover the label ?

Cheers
Bruno

Hi!

Ok, so this is an issue / oversight on my part, the problem is that Label (and Image) arent interactive components and therefore dont have mouse events, i think this needs to be sorted and its pretty valid to want to do what you are doing (or the same with an image) - ill implement this soon, i just need to make sure im not going to break anything in the process…

Cheers,
Ian

Thanks Ian.
For now I am still at the bottom of grasping the framework’s in and out to propose something clean (code wise)…
But for Testing and documenting, I’d be glad to help,

Best
Bruno

Latest git versions now allow image and label to be interactive (which they probably should have been initially) - im hoping to make a 1.1 release soon, but for now you’ll need git versions of core + whatever backend.

Cheers,
Ian

Nice Ian !

Tested OK

Thank you