Beispiel #1
0
        public override string GetCursor(int2 pos)
        {
            if (world == null || !hasRadar)
            {
                return(null);
            }

            var loc = MinimapPixelToCell(pos);

            var mi = new MouseInput
            {
                Location  = loc,
                Button    = MouseButton.Right,
                Modifiers = Game.GetModifierKeys()
            };

            var cursor = world.OrderGenerator.GetCursor(world, loc, mi);

            if (cursor == null)
            {
                return("default");
            }

            return(CursorProvider.HasCursorSequence(cursor + "-minimap") ? cursor + "-minimap" : cursor);
        }
Beispiel #2
0
        public override string GetCursor(int2 pos)
        {
            if (world == null || !hasRadar)
            {
                return(null);
            }

            var cell     = MinimapPixelToCell(pos);
            var location = worldRenderer.Viewport.WorldToViewPx(worldRenderer.ScreenPxPosition(cell.CenterPosition));

            var mi = new MouseInput
            {
                Location  = location,
                Button    = MouseButton.Right,
                Modifiers = Game.GetModifierKeys()
            };

            var cursor = world.OrderGenerator.GetCursor(world, cell, mi);

            if (cursor == null)
            {
                return("default");
            }

            return(CursorProvider.HasCursorSequence(cursor + "-minimap") ? cursor + "-minimap" : cursor);
        }