Ragna.roBrowser
Ragna.roBrowser copied to clipboard
Entity name should be removed while mouse it's over chatbox, vended shop or UI elements
Steps to reproduce
- Open vending shop, put it on auto-trade or whatever
- Put any other player entity near shop chatbox,
- Move your mouse over player entity to display name
- Move your move from player entity to shop chatbox
Actual result Chatbox is "focused" which is good. But player entity name it's kept displayed.
Expected result Entity displayed name should be removed when your mouse is over chatbox or shop.
Browser/device info
- Browser: Chrome
The same happens when mouse over from Entity directly to ShortCut bar or any UI element.
I fixed it locally by adding to EntityManager:
/**
* Clean all displays
*/
function cleanAllDisplays() {
// Remove all display names if mouse over chatroom or vending
this.forEach(function (entity) {
if (entity.display.display) {
entity.display.clean();
}
})
}
and then calling it on mouse over event from EntityRoom.js or ShortCut.js etc. fixing the issue... but... I don't know if it was't dead way as there isaremultiple components (party window, inventory etc.) that I will need to update like this. Additionally I am a bit worried about optimisation here.
this.ui.mouseover(function(){
// Remove all display names if mouse over chatroom or vending
require("Renderer/EntityManager").cleanAllDisplays();
})
Maybe EntityControl.onMouseOut() should be improved instead.
Any ideas?
"Maybe EntityControl.onMouseOut() should be improved instead." I think this is the better way. It is the task of the entity to manage it's own name, not every other UI component's
need something like: if (mouse over UI && UI has MouseMode == UIComponent.MouseMode.STOP) entityover = null;