Skip to content

Add minimap icons support #1

@victorpopkov

Description

@victorpopkov

Verify

  • I understand that if I ignore these instructions, my issue may be closed without review.
  • I have made sure that there are no similar opened issues.
  • I have made sure that the SDK version matches the latest release.

Is your feature request related to a problem? Please describe.

I'm always frustrated when it comes to minimap icons. Need to reinvent the wheel every time I need those in my mods. Either use the solution provided by Klei, or add your map overlay. The first one is limited and needs some workarounds to make them work properly. The 2nd one needs more work, but you'll get more control. The more or less good solution would be to use both methods and have everything from both worlds.

It's better to have this kind of functionality bundled within SDK to reuse.

Describe the solution you'd like

Something like that:

local icon = SDK.MiniMap.AddIcon({
    id = "your_id",
    image = "wilson",
    is_over_fog_of_war = false,
    is_proxy = false,
    name = "wilson",
    position = Vector3(-183.70, 0.00, -206.50),
    title = "Indicator",
})

SDK.MiniMap.UpdateIcon(icon, { image = "wendy" }) -- by reference
SDK.MiniMap.UpdateIcon("your_id", { is_over_fog_of_war = true }) -- by ID

Describe alternatives you've considered

If applicable, add a clear and concise description of any alternative solutions or features you've considered.

Additional context

If applicable, add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions