Hello,
For context:
I have set Zoom like this:
import { RpgSceneMapHooks, RpgSceneMap } from '@rpgjs/client'
const sceneMap: RpgSceneMapHooks = {
onAfterLoading(scene: RpgSceneMap) {
scene.viewport?.setZoom(1.4);
}
}
export default sceneMap;
Issue 1
and now I wanted to implement a plugin for information about being hit like popping numbers about damage dealt, healed, etc.
but I struggle with centering the tooltip over the player.
I took an example from here: https://docs.rpgjs.dev/gui/tooltip.html#the-full-gui
and for zoom = 1 it works nicely: https://imgur.com/Fseb2kn
but when I change zoom the tooltip is not centered well like this:
I changed the margins in the CSS to be centered, but when the window size is changed it's not centered anymore and I can't get it working.
check here: https://imgur.com/nNv0w3D
If anyone had idea how to deal with it I would appreciate help 😀
Issue 2
Also, I am not sure if the attached GUI is the proper way to information about being hit that will be displayed max 2 seconds and a lot of these may be displayed at the same time, so maybe there is alternative way to draw such numbers near the player visible for every other player on the map? 🤔
Issue 3
Is that possible to display multiple the same GUIs? If multiple enemies attack me then I would want to display multiple popping numbers around in the same time: https://imgur.com/BkIAGzF