summaryrefslogtreecommitdiff
path: root/scene/gui/rich_text_label.cpp
AgeCommit message (Collapse)Author
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-10Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde
Part of #33027.
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
2020-05-07Merge pull request #31086 from volzhs/underlineRémi Verschelde
Use underline position and thickness value in font file
2020-04-30Fixed bbcode parsing for built-in RichTextEffects in RichTextLabelDarenn
RichTextEffect can now have a bbcode string starting like one of the built-in. It was impossible before as the built-in would take precedence over the custom effect that has the same bbcode start. Example : [fade] would take precedence over [fade_in]
2020-04-29Use underline position and thickness value in font filevolzhs
2020-04-13Fixed 0 width issue of rich text labeljanglee
Fixes #37746
2020-04-07Fixed underlines and striketrough not respecting visible characterjanglee
2020-04-06Calculate strike-through position correctlyDominik 'dreamsComeTrue' Jasiński
Fixes: #37637
2020-04-05Merge pull request #37397 from Eoin-ONeill-Yokai/Bug37081Rémi Verschelde
Correction to RichTextLabel Tabulation (Bug 37081)
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-29Correction to RichTextLabel TabulationEoin O'Neill
Correct backtrack assignment to prevent excessive tabulation. Worth noting that tabulation is treated differently in RichTextLabel because of custom user-asignable tab variable which creates problems with dynamic fonts specifically.
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-26Reworked tooltips to use the popup system.Juan Linietsky
2020-03-26Popups are now windows also (broken!)Juan Linietsky
2020-03-26Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky
2020-03-24Make search in RichTextLabel case-insensitiveTomasz Chabora
2020-03-01Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodesRémi Verschelde
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-25Rename `scancode` to `keycode`.bruvzg
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap. Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-17Merge pull request #36229 from dreamsComeTrue/rich-text-label-key-eventsRémi Verschelde
RichTextLabel: proper handling of internal key events
2020-02-15Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr.Juan Linietsky
2020-02-14RichTextLabel: proper handling of internal key eventsDominik 'dreamsComeTrue' Jasiński
Fixes #36211
2020-02-11Texture refactorJuan Linietsky
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
2020-02-09Merge pull request #35768 from Eoin-ONeill-Yokai/hiddenRichTextRémi Verschelde
Fix to RichTextEffect `visibility` - Label Now Accounts for Skipped Characters.
2020-02-07Use modules_enabled.gen.h to improve inter dependency checksRémi Verschelde
- Fix build with gdscript module disabled. Fixes #31011. - Remove unused `gdscript` compile option. - Fix build with regex module disabled. - Fix ImageLoaderSVG to forward declare thirdparty structs.
2020-01-30Fix RichTextEffect `visibility` to Account for Skipped Characters.Eoin O'Neill
A picture is easier to describe this issue than words. Basically, rich text effects allowed for character visibility changes. While doing so would work properly, the rich text label would render the next `word` in an offset accounting for the hidden characters (leaving a huge space.) This patch fixes this issue by keeping track of the amount of `backtrack` necessary per line.
2020-01-08Emits meta_hover_ended when mouse exit RichTextLabelHaoyu Qiu
2020-01-08Fixes RichTextLabel click issue when cell text wrapsHaoyu Qiu
2020-01-07Check if cursor is inside meta when getting cursor shapeKanabenki
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-12Fixes crash after remove_line in RichTextLabelHaoyu Qiu
`ItemFrame` always have a line.
2019-10-25Merge pull request #32870 from bergmannf/27850_rtl_bold_italicRémi Verschelde
Add push_* methods for fonts in rich_text_label
2019-10-22Shadows Now Properly Translate by RichTextEffect offset.Eoin O'Neill
Bugfix 32981.
2019-10-22Merge pull request #32965 from volzhs/richtextlabel-scroll-activeRémi Verschelde
Fix scrolling RichTextLabel with scroll_active=false
2019-10-22Fix scrolling RichTextLabel with scroll_active=falsevolzhs
2019-10-16Add push_* methods for fonts in rich_text_labelFlorian Bergmann
Provides method to push different font styles. If no fonts are set nothing will happen, when the methods are used. Fixes #27850
2019-10-16Support for resized images in RichTextLabelPouleyKetchoupp
BBCode Tag: [img=<width>x<height>]{path}[/img]
2019-10-05Fix crash in Control functionsqarmin
2019-09-26Implement #32347 - RichTextLabel's Item and Item* structs should not inherit ↵Relintai
Object, it's too expensive
2019-09-11Fix Sanitization BugEoin O'Neill
From issue #32089 -- I messed up the property hints by putting them in the wrong location. Should be working as intended now.
2019-09-03Update RichTextLabel to support real time effects and custom BBCodes.Eoin O'Neill
Added a new ItemFX type to RichTextLabel which supports dynamic text effects. RichTextEffect Resource Type was added which can be extended for more real time text effects.
2019-08-30Merge pull request #30927 from mahubu/console-multi-selection-cursorRémi Verschelde
Change cursor to multi-selection cursor when selecting text in RichTextLabel
2019-08-01Same method when redrawing as when theme changedCameron Reikes
2019-07-29Change cursor to multi-selection cursor when selecting text in RichTextLabel.Teto
Fix for #27545 : returns 'CURSOR_IBEAM' shape when selection is clicked.
2019-07-08Use base `Color()` constructors instead of `Color::html()`Hugo Locurcio
This results in slightly smaller binaries (-17 KB for an editor binary) as no strings need to be allocated.