Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add highlight option for Labels #5514

Closed
wants to merge 1 commit into from
Closed

Add highlight option for Labels #5514

wants to merge 1 commit into from

Conversation

timoschwarzer
Copy link
Contributor

This commit adds a new highlight option to Label to provide simple word highlighting as seen in many games.
To highlight a word, just put & in front of it. The highlight color can be selected
and this feature is disabled by default for backwards compability. (So you can enable it by changing the Label's highlight_enabled property)

(This time without unrelated commits 😅)

Test project:
gd-hint-label-test.tar.gz

This commit adds a new highlight option to Label to provide simple word highlighting as seen in many games.
To highlight a word, just put & in front of it. The highlight color can be selected
and this feature is disabled by default for backwards compability. (So you can enable it by changing the Label's highlight_enabled property)
@vnen
Copy link
Member

vnen commented Jul 1, 2016

Isn't just easier to use a RichTexLabel or am I missing something?

@timoschwarzer
Copy link
Contributor Author

I tried a RichTextLabel, but I found these two issues:

  • Distance Field font is being rendered blurry
  • I can't H and V Align the t.

And I think this is a basic feature for which a RichTextLabel would be overkill.

@vnen
Copy link
Member

vnen commented Jul 1, 2016

Distance Field font is being rendered blurry

This sounds like a bug which deserve its own issue.

I can't H and V Align the t.

You can H-align with BBCode. V-align is not possible, but maybe it can be implemented. Also you can work around that with containers.

My concern is that adding "just a simple feature" every time will eventually make it too complex.

@timoschwarzer
Copy link
Contributor Author

timoschwarzer commented Jul 1, 2016

Yes, the DF blur is definitely an own issue, I just hadn't the time to submit it.

I just implemented this, because I needed it for my game.
This PR doesn't have to be merged, just if it's useful. ;-)

Timo Schwarzer https://timoschwarzer.com On Fri, Jul 01, 2016 at 5:43 PM, George Marques < [email protected] [[email protected]] > wrote:
Distance Field font is being rendered blurry

This sounds like a bug which deserve its own issue.

I can't H and V Align the t.

You can H-align with BBCode. V-align is not possible, but maybe it can be implemented. Also you can work around that with containers.

My concern is that adding "just a simple feature" every time will eventually make it too complex.

@reduz
Copy link
Member

reduz commented Jul 1, 2016

Let's fix RichTextLabel instead

On Fri, Jul 1, 2016 at 12:48 PM, Timo Schwarzer [email protected]
wrote:

Yes, the DF blur is definitely an own issue, I just hadn't the time to
submit it.

I just implemented this, because I needed it for my game.
This PR doesn't have to be merged, just if it's useful. ;-)

Timo Schwarzer https://timoschwarzer.com On Fri, Jul 01, 2016 at 5:43 PM,
George Marques < [email protected] [[email protected]] >
wrote:
Distance Field font is being rendered blurry

This sounds like a bug which deserve its own issue.

I can't H and V Align the t.

You can H-align with BBCode. V-align is not possible, but maybe it can be
implemented. Also you can work around that with containers.

My concern is that adding "just a simple feature" every time will
eventually make it too complex.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [
https://github.com//pull/5514#issuecomment-229979921] ,
or mute the thread [
https://github.com/notifications/unsubscribe/AIcIkliOGqyeJ0zsqU5epHubu12vbTVzks5qRTWNgaJpZM4JDFy8]
.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#5514 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AF-Z26_NcwHCbEOARvsCNi0OwhdseWInks5qRTbmgaJpZM4JDFy8
.

@timoschwarzer
Copy link
Contributor Author

timoschwarzer commented Jul 1, 2016

👍
And an option to v-align, if possible

@akien-mga
Copy link
Member

Do we have an issue about fixing RichTextLabel? If so this PR could be closed, as it won't be merged I suppose.

@timoschwarzer
Copy link
Contributor Author

I'll create one.

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.

5 participants