ashea-code / BLUI

Rich HTML UI engine for UE4
MIT License
861 stars 259 forks source link

JQuery rendering/positioning issue #43

Closed kitblackheart closed 9 years ago

kitblackheart commented 9 years ago

Hello and goodnight, It seems BLUI has issues with JQuery effects, it seems to be detecting the wrong positions of the HTML elements when I use "mouseenter" or "mouseleave" functions, making it very imprecise, not detecting correctly nor the location or element width/height.

ashea-code commented 9 years ago

Hello, could you give me some more information on the issue? How can I reproduce it and what are the expected results?

kitblackheart commented 9 years ago

i wanted to post evidence too, sadly my recording software kinda expired on me (sorry for that) however, here is my whole HTML folder, to test it, its very simple, you replace the demo folder with this one: https://mega.nz/#!fcoUSDAa!7molOyayn_uOUA_1kIMIm5JxEW-eg0XuYuYCMIJnzhI launch the project, the BLUI logo in the HUD doesnt work as expected, it shoudl change the opacity to 0.5 when the mouse is not touching it, and 1 when its touching it (it somewhat of works, it just detects the picture in the wrong coordinates). I am willing to help testing if needed (EMAIL: kitblackheart@gmail.com)

PS: if you want to know what changes i did, here you go: -added jquery.min.js to the js folder -created test-hud.js to html folder to add my own javascript without making a mess -linked the jquery.min.js and test-hud.js to the test-hud.html head tag -tested it inside unreal and then under chrome

ashea-code commented 9 years ago

All coordinates are relative to the UE4 screen space in the demo by default. So clicking on X100 Y200 on the UE4 window will trigger that exact click coordinate in the browser. If you want it to be releative to the actually rendered page, you must check the x,y position on the UMG widget, not on ue4 screen space

kitblackheart commented 9 years ago

so technically speaking thats an issue with jquery? because the functions i used dont require any coordinate arguments, you just call them on the object itself (in this case the img object (the logo))

ashea-code commented 9 years ago

It's not an issue with jQuery but with how you're translating the x,y from ue4s screenspace to the browser's

ashea-code commented 9 years ago

Closing this for spring cleaning