Exemplo n.º 1
0
        public static void ShowOn(IWorldObject worldObject, string message)
        {
            Hide();

            var positionOffset = worldObject.ProtoWorldObject.SharedGetObjectCenterWorldOffset(worldObject)
                                 + (0, 1.28);

            lastControl = new WorldObjectTitleTooltip();
            lastControl.Setup(message);

            lastControl.attachedControl = Api.Client.UI.AttachControl(
                worldObject,
                lastControl,
                positionOffset: positionOffset,
                isFocusable: false);
        }
Exemplo n.º 2
0
        public static void ShowOn(IWorldObject worldObject, string message)
        {
            Hide();

            var staticWorldObject      = worldObject as IStaticWorldObject;
            var protoStaticWorldObject = staticWorldObject?.ProtoStaticWorldObject;

            var positionOffset = protoStaticWorldObject != null
                                     ? protoStaticWorldObject.SharedGetObjectCenterWorldOffset(staticWorldObject)
                                     : (0, 0);

            positionOffset += (0, 1.18);

            lastControl = new WorldObjectTitleTooltip();
            lastControl.Setup(message);

            lastControl.attachedControl = Api.Client.UI.AttachControl(
                worldObject,
                lastControl,
                positionOffset: positionOffset,
                isFocusable: false);
        }