On Thursday, 11 March 2021 at 14:23:39 UTC, Adam D. Ruppe wrote:
On Thursday, 11 March 2021 at 12:26:07 UTC, Виталий Фадеев wrote:
    _processMouseKey  = &process; // <-- not works
    _processMouseMove = &process; // <-- not works

This *should* actually work. What type are those variables?

struct MouseKeyEvent {}
struct MouseMoveEvent{}
void process( ref MouseKeyEvent event ) { }
void process( ref MouseMoveEvent event ) { }

void main() {
      // this works because the type is given on the left
      // so the compiler knows which overload works
void function(ref MouseMoveEvent) processMouseMove = &process;
}

I was stupid.
It is really simple!

Thank a lot, bro!

Reply via email to