ALiwoto / LTW-client

Last Testament Of Wanderers (LTW) Game Client
GNU General Public License v2.0
8 stars 1 forks source link

Mouse events bug when elements are not applied #4

Closed ALiwoto closed 3 years ago

ALiwoto commented 3 years ago

see the code below:

    //test.Apply();
    //test.Show();
    testInput.Apply();
    testInput.Show();
    //events:
    this.InitializeMainEvents();
    //---------------------------------------------
    //addRanges:
    this.ElementManager.AddRange(
        this.FirstFlatElement,
        test,
        testInput);
    //---------------------------------------------

as you can see here, test (which is a sandbox in this case), is not applied nor is it visible. but if I try to trigger one of mouse events on testInput element, it won't be triggered (like MouseEnter effect) it won't, because we have add this to ElementManager and it won't check for testInput anymore.

ALiwoto commented 3 years ago

And I think the best solution is to check their Visible and IsApplied properties.

ALiwoto commented 3 years ago

This is already done I guess. But since it's not merged to master branch, I won't close it right now