Ragna.roBrowser icon indicating copy to clipboard operation
Ragna.roBrowser copied to clipboard

Entity name should be removed while mouse it's over chatbox, vended shop or UI elements

Open kontownik opened this issue 10 months ago • 2 comments

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.

kontownik avatar Apr 13 '24 11:04 kontownik

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?

kontownik avatar Apr 14 '24 15:04 kontownik

"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

MrAntares avatar Apr 15 '24 07:04 MrAntares

need something like: if (mouse over UI && UI has MouseMode == UIComponent.MouseMode.STOP) entityover = null;

alisonrag avatar Jun 24 '24 19:06 alisonrag