RonenNess/RPGUI

cursors on child elements

titoasty opened this issue · 3 comments

Hi,

I've found that it's quite annoying to set a custom cursor on an element because it's not visible above child elements.
I explain: for example a span tag with class 'rpgui-cursor-point' and containing a big div with a lot of children, it won't be the 'point' cursor above children.

After some searches, I've found the line :

.rpgui-cursor-default,
.rpgui-content *
{
    cursor: url("img/cursor/default.png"), auto;
}

By changing the selector to simply this one :

.rpgui-cursor-default

does the trick, because the default cursor won't be forced on ALL elements.
Hope this will help !

Hi titoasty, thank you for the report.

While your solution did solve your specific problem, I felt like the cursor styling mechanism was a mess and wanted to give it a better fix. so now I fixed it completely (I hope :)) + added a small example with children elements with customized cursor.

please take the latest version from dist/ and let me know if it worked. also notice that I changed the button graphics a bit (the original buttons resolution was noticeably smaller than everything else), so take the images as well (eg the whole dist folder).

I'm waiting to here if it solved your problem and if it does we can close this bug.

Thanks!

problem solved !
thanks :)
(oh and as you saw, I found some more :P but I'm ready to help ! cause I'm actually working with your ui for a web game)

That's great to hear :) I'd love to see it if you want to drop a link (I hope you can still comment after I close this bug, if not there are still the others lol).

I saw the scrollbar thing, I hope its possible to fix since the css options for scrollbars are kinda limited (its not a standard css stuff). I'll look into it but probably won't have time to fix it until next week.

If by any chance you fix it feel free to make a pull request.

cheers!