Skip to content

Add: give map label text the ability to have an outline#7598

Merged
vadi2 merged 11 commits intoMudlet:developmentfrom
ZookaOnGit:qpainter-2861
Dec 27, 2024
Merged

Add: give map label text the ability to have an outline#7598
vadi2 merged 11 commits intoMudlet:developmentfrom
ZookaOnGit:qpainter-2861

Conversation

@ZookaOnGit
Copy link
Copy Markdown
Contributor

@ZookaOnGit ZookaOnGit commented Dec 26, 2024

Brief overview of PR changes/additions

Add an outline colour chooser to map label creation window in mapper. Update createMapLabel Lua function to reflect this as well. Adds three optional arguments to the end of createMapLabel( ..., outlineRed, outlineGreen, outlineBlue), default to the same colour as foreground if not specified.

Also, chosen colours weren't being saved from one dialog to the next forcing unnecessary typing to replicate a colour scheme when creating multiple labels, so fix this and allow chosen colours to also save across Mudlet restarts as well.

Motivation for adding to Mudlet

Better user experience, more map design options, prettier maps.

Other info (issues closed, discussion etc)

  • The outline width is only 1 pixel, but as fonts get smaller this starts to become increasingly larger compared to the width of the small font. Zoomed in fonts (or larger than 16 on my display) typically look better.
  • Based on this work I think it would be fairly trivial to add drop shadows, mirroring and other text effects.

image

Zoomed in;
image

closes #2861
/claim #2861

@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Dec 26, 2024

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can make some really nice labels with the right font! This is great:

Screenshot from 2024-12-26 18-55-58

The text is now left-aligned in a label instead center aligned, do you get this?

Screenshot from 2024-12-26 18-56-08

@ZookaOnGit
Copy link
Copy Markdown
Contributor Author

The text is now left-aligned in a label instead center aligned, do you get this?

Fixed this.

@vadi2 vadi2 merged commit a22d9c9 into Mudlet:development Dec 27, 2024
@vadi2 vadi2 added the needs documentation This pull request changes things the players would use/see and thus needs an update in the manual label Dec 27, 2024
@ZookaOnGit ZookaOnGit removed the needs documentation This pull request changes things the players would use/see and thus needs an update in the manual label Dec 27, 2024
@ZookaOnGit ZookaOnGit deleted the qpainter-2861 branch December 27, 2024 08:40
@vadi2 vadi2 added the needs documentation This pull request changes things the players would use/see and thus needs an update in the manual label Dec 31, 2024
@vadi2 vadi2 added this to the 4.20.0 milestone Dec 31, 2024
@vadi2 vadi2 removed the needs documentation This pull request changes things the players would use/see and thus needs an update in the manual label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow map label text to have a shaped outline

2 participants