Commit graph

95 commits

Author SHA1 Message Date
Guilherme Silva
d63cc11bee Change from "search dialog" to "search bar" on help screen 2018-05-08 12:19:32 +00:00
Ruslan Mustakov
5cd12f6649 Perfect FreeType-based outlines for DynamicFonts
- Implement outlines based on FreeType Stroker API. This allows
  artifact-free results, similar to what you will see in Web or any text
  editing tools. Outline is a part of DynamicFont rather than Label,
  because outlines have to be baked into the font's atlas. Font has a
  default outline_color and a Label can specify font_outline_modulator
  that will be multiplied with the Font's color to get the final result.

- draw_char now has to be called twice to fully render a text - first
  with p_outline == true for each character and then with
  p_outline == false for each character.

- Number of draw-calls is reduced from 5 to 2 per outlined character.

- Overall cleanup of DynamicFont code, extracted duplicated code pieces
  into separate methods.

- The change is backward-compatible - Labels still have outline
  properties that work exactly as they worked before.

Closes #16279.
2018-05-08 13:45:24 +07:00
Max Hilbrunner
fb4e9526e8
Merge pull request #18122 from olivergs/wip/rtl-content-height
RichTextLabel, doc: Added new method to get total content height
2018-05-07 14:53:43 +02:00
Max Hilbrunner
fc9fad925b
Merge pull request #18146 from mjtorn/gh-mjtorn-rtl-shadow
Implement font shadows for RichTextLabel
2018-05-05 07:01:04 +02:00
thfrwn
f48ff4dc64 fix clang6 assignment error 2018-04-21 22:26:43 -07:00
Markus Törnqvist
1c6ea572ca Implement font shadows for RichTextLabel 2018-04-12 15:09:48 +03:00
Oliver Gutierrez
63a472aea4 RichTextLabel, doc: Added new method to get total content height 2018-04-11 14:53:13 +01:00
robfram
ef2b7b090c Fix RichTextLabel column size growing beyond its calculated max_width
When `RichTextLabel` calculated the actual width of columns, it let
them grow to sizes greater than its calculated `max_width`. Now this
PR ensures no columns grows beyond `max_width`, and the excess width
is distributed among the columns which can still grow.

It should fix #17731.
2018-03-24 18:09:35 +01:00
robfram
5358befb41 Fix bad rendering of BBCode tables in RichTextLabel
Text overflowed canvas as tables didn't calculate correctly the width
of their columns. They used the whole table width available for each
column. Also, the `cell` parameter was wrongly parsed if used with its
optional argument (expand ratio).

This PR fixs the parsing of `cell` parameter (i.e. `cell=e`) and the
distribution of the full table width between columns, but it overrides
automatically the `expand` flag if the column is smaller than it could
be, to allow a better UX out-of-the-box. It keeps the `expand_ratio`
flag to let the user customize how every column grows in relation to
the rest.

Partially fix #6289.
2018-03-18 18:06:24 +01:00
Bernhard Liebl
0e1e95c41f Fix more regressions in RichTextLabel from PR 15711 2018-03-02 19:19:46 +01:00
poke1024
89f607604e Fix regression through fa98637aca 2018-03-01 18:03:53 +01:00
Bernhard Liebl
77b1320fb4 Fixes wrong vertical font layout in RichTextLabel 2018-01-14 19:29:04 +01:00
Bojidar Marinov
9b8e8b2220
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde
94bda27659
Merge pull request #15317 from poke1024/fix-rtl-underline
RichTextLabel: don't draw underline character-wise
2018-01-04 13:30:00 +01:00
Bernhard Liebl
e74e2763bd RichTextLabel: don't draw underline on single characters 2018-01-04 12:10:29 +01:00
Bernhard Liebl
c6c016e95a Fix word wrapping in tables in RichTextLabel 2018-01-04 08:22:41 +01:00
Rémi Verschelde
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Bernhard Liebl
b80bc553dd Double-click word selection for RichTextLabel (i.e. docs) 2017-12-28 17:44:22 +01:00
Bernhard Liebl
3b79529cf2 Fix thin lines in editor gui on hidpi (issue 14691) 2017-12-15 18:49:48 +01:00
poke1024
f08768c189 Fix crash (and bug) in RichTextLabel 2017-12-13 20:22:47 +01:00
Bernhard Liebl
658fb0a0a9 Fix crash in RichTextLabel::selection_copy() 2017-12-10 16:08:24 +01:00
Dmitry Koteroff
0a1a5396ec Rich Text Label: fixed deselection issue 2017-12-04 18:46:20 +03:00
Bernhard Liebl
80ad8afc85 Native pan and zoom for macOS 2017-11-21 09:11:39 +01:00
Will Nations
eaea646648 Adding ability for single meta hovering 2017-11-17 09:37:41 -06:00
Bernhard Liebl
a7304b0c54 Fix selection and clicks on text in tables in RichTextLabel 2017-11-05 11:38:14 +01:00
Zher Huei Lee
6ba94cb924 Fixed RichTextLabel::add_newline() #12564 2017-11-02 08:46:28 +08:00
Poommetee Ketson
9cadb9e5f3 Bind unbound enums, rearrange some by value 2017-10-22 01:58:02 +07:00
Rémi Verschelde
0c9d201044 Merge pull request #11407 from toger5/selection_override_color
added option to keep font color on selection + use consistent selection color in help (fixes: #11501)
2017-10-15 20:49:38 +02:00
Ruslan Mustakov
61ddf52983 Add NIL_IS_VARIANT usage to few definitions
The missing usage flag led to GDNative API descriptions containting
arguments with "void" type.
2017-10-05 18:51:22 +07:00
toger5
d58a159e38 keep font color on selection as default 2017-09-28 14:17:14 +02:00
Ferenc Arn
b4417161f5 RichTextLabel: Added get_visible_line_count method.
Also exposed get_line_count to GDScript.
2017-09-21 21:43:33 -04:00
volzhs
8d1792a294 Make clickable properly in editor help
fixes #3671
2017-09-16 02:14:45 +09:00
toger5
07d5911c40 fixed copy on osx + help selection color 2017-09-04 18:57:52 +02:00
toger5
0f62db23ac richTextLable implemented stylebox support
- also fixed issue with total_chars ignoring first line
2017-09-02 18:20:04 +02:00
Rémi Verschelde
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Ignacio Etcheverry
32dd9a9f66 ClassDB: Provide the enum name of integer constants 2017-08-20 22:07:43 +02:00
Gilles Roudiere
0d35d4d53b Replace GUI anchor type by a float between 0 and 1 2017-08-13 21:20:13 +02:00
Ignacio Etcheverry
2f290038d6 Removes type information from method binds 2017-08-10 07:17:50 +02:00
Poommetee Ketson
2777f81d29 Add object type hint for docs 2017-07-23 18:57:03 +07:00
TwistedTwigleg
d649140b9b Added additional functions to RichTextLabel:
* Added set_text function to RichTextLabel
* Added percent_visible attributes and functions to RichTextLabel
This should make switching from Label to RichTextLabel easier.
2017-07-08 14:05:18 -04:00
geequlim
81afb275eb Add statements for script types of RichTextLabel 2017-06-24 14:18:23 +08:00
Rémi Verschelde
897d6377b7 Revert "Fix text warp in color blocks with CJK"
This reverts commit cd778e00dc.

That commit introduced regressions for non-CJK languages are discussed
in #8952. Fixes #9078.
2017-06-07 07:38:53 +02:00
Andreas Haas
9bc5348961
InputEvent: Renamed "pos" property to "position"
Make the naming consistent with other classes.
2017-06-03 11:26:39 +02:00
Geequlim
b93fce1c18 Fix text warp in color blocks with CJK
(cherry picked from commit cd778e00dc)
2017-05-27 11:37:33 +02:00
Juan Linietsky
5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
toger5
304a1f5b5a Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
2017-05-07 14:23:56 +02:00
Rémi Verschelde
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde
debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00
Rémi Verschelde
5dbf1809c6 A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
2017-03-05 16:44:50 +01:00