Commit graph

3031 commits

Author SHA1 Message Date
Marcel Admiraal
4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
Marcel Admiraal
7b293eddfb Rename unselect to deselect 2020-12-21 10:26:41 +00:00
bruvzg
784f869f0f
Fix RichTextLabel content height and scrollbar calculations. 2020-12-21 07:49:27 +02:00
bruvzg
1adea98d07
Use integer text position in scroll container, TextEdit and canvas editor, to ensure sharp text rendering.
Use integer font align/advance with any font scaling, to ensure sharp text rendering.
2020-12-21 07:49:27 +02:00
Rémi Verschelde
f7ddcbf446
Merge pull request #44328 from gongpha/tabs-label-incorrect
Refresh TextLine buffer when moving a tab
2020-12-21 00:26:08 +01:00
Rémi Verschelde
153c132a7e
Merge pull request #44300 from KoBeWi/🧹🧹
Move initialization of some classes to headers
2020-12-21 00:24:36 +01:00
Yuri Roubinsky
52e44ed3ef Added GraphEdit properties to control lines thickness and antialiasing 2020-12-18 16:41:45 +03:00
Yuri Sizov
f5bcbd8325 FIx visual issues with GraphEdit minimap 2020-12-17 22:59:04 +03:00
Rémi Verschelde
c83d1b2526
Merge pull request #43416 from pycbouh/graph-minimap
Add a minimap to the GraphEdit
2020-12-17 17:34:36 +01:00
Rémi Verschelde
3d7b01723b
Merge pull request #44412 from DanielZTing/rename
Rename neighbour in Control to neighbor
2020-12-16 14:16:28 +01:00
Sergey Minakov
efeb9e4d08 GUI: use cursor in TextEdit for non selected text. 2020-12-16 05:41:14 +03:00
Daniel Ting
aea7fde241 Rename neighbour in Control to neighbor
This keeps things consistent with the rest of Godot, which uses the
American English spelling of Color.
2020-12-15 16:42:21 -06:00
Rémi Verschelde
7e3424e3ab
Merge pull request #44377 from Calinou/rename-textureprogressbar
Rename the TextureProgress node to TextureProgressBar
2020-12-15 13:34:32 +01:00
Hugo Locurcio
57dcc83152
Rename the TextureProgress node to TextureProgressBar
Advantages:

- When searching for "progressbar", you'll see both nodes in the
  search results.
- More consistent with Button/TextureButton.
2020-12-14 21:35:13 +01:00
Marcel Admiraal
8509c8c8fc Rename AcceptDialog get_ok() to get_ok_button()
Also renames:
- AcceptDialog add_cancel() to add_cancel_button()
- ConfirmationDiaglog get_cancel() to get_cancel_button()
2020-12-14 18:43:52 +00:00
bruvzg
62927383ed
[Complex Text Layouts] Add drop-caps support to TextParagraph and RTL. 2020-12-13 22:20:02 +02:00
kobewi
a3a31591b5 Allow to override drop data in LineEdit 2020-12-13 20:16:56 +01:00
Rémi Verschelde
bbf7bb3838
Merge pull request #42595 from bruvzg/ctl_rich_text
[Complex Text Layouts] Refactor RichTextLabel.
2020-12-13 13:42:00 +01:00
gongpha
0394ff3c99 Refresh TextLine buffer when moving tab 2020-12-13 02:38:53 +07:00
Tomasz Chabora
31cb04fbdd Move initialization of some classes to headers 2020-12-11 18:20:03 +01:00
Yuri Roubinsky
2d4ef1c193 Fixed mouse scrolling in TextEdit's 2020-12-11 12:51:10 +03:00
bruvzg
6b6f101983
[Complex Text Layouts] Refactor RichTextLabel. 2020-12-11 09:48:49 +02:00
Michael Alexsander
bb39088201 Allow to circle back in 'PopupMenu' even if the first/last item is non-selectable 2020-12-10 09:32:02 -03:00
Rémi Verschelde
2a325f3888
Merge pull request #44233 from YeldhamDev/popupmenu_circle_back
Re-add circle back scrolling to 'PopupMenu'
2020-12-10 11:16:38 +01:00
Rémi Verschelde
67259d07db
Merge pull request #44070 from YeldhamDev/popupmenu_separator_font_color
Add "font_color_separator" theme property to 'PopupMenu'
2020-12-10 11:13:07 +01:00
Rémi Verschelde
70c435272a
Merge pull request #44124 from volzhs/tabs-in-front
Add option to draw all tabs in front
2020-12-10 07:55:41 +01:00
volzhs
814f9015f8 Add option to draw all tabs in front 2020-12-10 07:47:10 +09:00
Michael Alexsander
e8e0abc331 Re-add circle back scrolling to 'PopupMenu' 2020-12-09 13:25:00 -03:00
Rémi Verschelde
114f97ff11
Merge pull request #44128 from KoBeWi/🧹
Cleanup unused engine code
2020-12-09 13:01:50 +01:00
Tomasz Chabora
2c048ea164 Cleanup unused engine code 2020-12-09 12:12:36 +01:00
Rémi Verschelde
9a8e123593
Fix connections to CanvasItem and Tabs signals
Follow-up to #44188 and #44189.
2020-12-09 12:04:02 +01:00
bruvzg
644f739660
Static analyzer fixes:
Removes unused code in OS.
Fixes return types.
Fixes few typos.
2020-12-09 10:17:53 +02:00
Marcel Admiraal
a65e609e21 Rename Tabs close and hover signals to tab_closed and tab_hovered 2020-12-08 09:51:06 +00:00
bruvzg
0ef483e9a9
[Complex Text Layouts] Performance optimizations. 2020-12-07 08:53:02 +02:00
bruvzg
a41f1c67e5
[Complex Text Layouts] Fix missing ItemList item text buffer init in add_icon_item. 2020-12-06 20:31:00 +02:00
bruvzg
c3cc9d82b4
[Complex Text Layouts] Align glyph offsets and advances to the pixel grid. 2020-12-06 20:31:00 +02:00
bruvzg
a458e90179
[Complex Text Layouts] Adds missing Font::SPACING_* to the Label, LineEdit, TextEdit, TextLine and TextParagraph.
Fixes oversized editor control height (default editor spacing is negative) and control size changing when text is set.
2020-12-06 20:30:59 +02:00
Rémi Verschelde
1a001ad964
doc: Sync classref with current source
And fixups:
- Add missing bindings in RenderingServer
- Remove duplicate ArrayMesh enum bindings (they're in Mesh already)
- Remove redundant _unhandled_key_input binding in Control (it's in Node
  already)
2020-12-04 22:28:08 +01:00
Michael Alexsander
383e8919e0 Add "font_color_separator" theme property to 'PopupMenu' 2020-12-03 11:36:03 -03:00
volzhs
d89677442b Update page value properly of ScrollContainer 2020-12-01 11:52:37 +09:00
Yuri Sizov
999ce610a2 Add a minimap to the GraphEdit 2020-11-30 16:48:52 +03:00
Rémi Verschelde
72366c1858
Merge pull request #43971 from volzhs/fix-tab-container
Fix TabContainer crashes
2020-11-30 09:41:30 +01:00
FIF15
96fb9eeca4 fix #43695 by revert part of #41576
Note that #42109 already reverted the change of MenuButton,
and actually fixed #43695.
As a result, this commit only reverts the change to LinkButton,
in order to prevent unpredictable consequences.
2020-11-30 12:28:45 +08:00
volzhs
f1eab4afbd Fix TabContainer crashes 2020-11-30 11:05:59 +09:00
Eric M
12ded391f5 Exposed shortcut_context property to scripting and added documentation.
I didn't expose this as a property or add documentation in the original PR #42109.
2020-11-30 00:11:40 +10:00
Yuri Roubinsky
4a3588a51a
Merge pull request #43828 from Chaosus/restore_line_antialiasing
Restored antialiased lines by emulation using triangle strips
2020-11-28 11:32:16 +03:00
Rémi Verschelde
a09846e015
Merge pull request #42109 from EricEzaM/PR/input-and-shortcuts-rework
Shortcuts rework - fixed issues with input propagation and triggering of unwanted shortcuts.
2020-11-28 09:04:25 +01:00
Yuri Roubinsky
3ec972fc95 Restored antialiased lines by emulation using triangle strips 2020-11-27 20:45:59 +03:00
bruvzg
3be31c4960
[Complex Text Layouts] Refactor TextEdit and CodeEdit controls. 2020-11-26 14:25:50 +02:00
bruvzg
d66eb77c9c
[Complex Text Layouts] Refactor Label and LineEdit controls. 2020-11-26 14:25:49 +02:00
bruvzg
99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
Rémi Verschelde
a8c2cc9028
Merge pull request #43807 from Xrayez/aspect-ratio-container
Add `AspectRatioContainer` class
2020-11-26 12:20:15 +01:00
Eric M
4d10524f7f Removed unused property 'pending_resize' from Control 2020-11-26 15:30:13 +10:00
Andrii Doroshenko (Xrayez)
ba68383706 Add AspectRatioContainer class
Co-authored-by: Ugis Brekis <ugis.brekis@productmadness.com>
2020-11-25 15:06:40 +02:00
Rémi Verschelde
8c713fa9bf
Merge pull request #43833 from volzhs/fix-scrollcontainer-bar-max-value
Fix to update scroll bar has correct max value in ScrollContainer
2020-11-25 13:27:36 +01:00
Tomasz Chabora
836b78f329 Update clear button when clicked 2020-11-25 00:42:07 +01:00
volzhs
67c2f2445f Fix to update scroll bar has correct max value in ScrollContainer 2020-11-25 05:30:55 +09:00
Eric M
7941235e06 Add is_valid() check for InputEventKey in CanvasItemEditor. 2020-11-23 21:52:15 +10:00
Eric M
efe5c250d5 Implement new shortcuts system.
unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'.
2020-11-23 21:14:26 +10:00
Eric M
9d7d20a978 Added accept_event() calls for SceneTreeDock and BaseButton 2020-11-23 21:14:25 +10:00
Aaron Franke
02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Danil Alexeev
01d0addf56 Unified named colors in RichTextLabel
Now the BB tag `[color]` uses the color names from the `Color` class.
Also, the use of the `#` symbol in an HTML color code has become optional.
2020-11-17 02:55:36 +03:00
Rémi Verschelde
fc70f986b9
Merge pull request #42008 from Calinou/theme-rename-node-type
Rename the `type` parameter to `node_type` in Theme and Control
2020-11-16 13:20:24 +01:00
Rémi Verschelde
94875f5f48
Merge pull request #41851 from EricEzaM/PR/popup-menu-hysteresis
Added hysteresis for popup sub-menus
2020-11-16 09:34:28 +01:00
Sergey Minakov
8894c64e54 GUI: send cursor data from TextEdit 2020-11-15 16:03:21 +03:00
Rémi Verschelde
acb7d99fce
Merge pull request #43449 from nekomatata/line_edit_window_pos
Expose LineEdit scroll offset to scripts
2020-11-11 13:18:55 +01:00
PouleyKetchoupp
4775db1600 Expose LineEdit scroll offset to scripts 2020-11-11 10:07:31 +01:00
Eric M
c482e8ec85 Added hysteresis for popup sub-menus
This adds a small lag effect when opening submenus which allow the user to move directly to an item on the submenu without worrying about avoiding the autohide regions.
2020-11-08 13:28:23 +10:00
reduz
127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Rémi Verschelde
52c1b5fc41
Merge pull request #43283 from Calinou/color-remove-contrasted
Remove `Color.contrasted()` as its behavior is barely useful
2020-11-06 10:17:12 +01:00
Hugo Locurcio
7adb6b91b3
Remove Color.contrasted() as its behavior is barely useful
Returning the most contrasting color isn't a trivial task, as there
are often many possible choices. It's usually best left for the user
to implement using a script.
2020-11-03 04:46:08 -05:00
Rémi Verschelde
c5d8dafec4
Tooltips: Improve code clarity and docs
The return type for `_make_custom_tooltip` is clarified as Control, and users
should make sure to return a visible node for proper size calculations.

Moreover in the current master branch, a PopupPanel will be added as parent
to the provided tooltip to make it a sub-window.

Clarifies documentation for `Control._make_custom_tooltip`, and shows how to
use the (until now undocumented) "TooltipPanel" and "TooltipLabel" theme types
to style tooltips.

Fixes #39677.
2020-11-03 09:19:03 +01:00
volzhs
8a588343db Fix crash in TabContainer in case of no content at all 2020-10-29 19:52:21 +09:00
Yuri Roubinsky
c3df61a602 Removed redundant line from TextEdit
introduced in https://github.com/godotengine/godot/pull/43026
2020-10-28 12:56:20 +03:00
Rémi Verschelde
60ad64a101
Merge pull request #42766 from volzhs/tab-container
Put unselected tabs back in TabContainer control
2020-10-28 09:51:41 +01:00
Hugo Locurcio
c3b246e6af
Rename the type parameter to node_type in Theme and Control
This makes it clearer that it expects a node type as a string
(such as "Label") instead of a type like "TYPE_ARRAY".
This is backwards-compatible since only the name of the parameter
is changed, not its order.
2020-10-27 14:58:52 +01:00
Devin Curry
b9c35af15d ScriptEditor: Fix line number gutter drag select
Fixes issue #42722
2020-10-25 12:13:54 -07:00
Aaron Franke
961ee3a1d7
Rename button group property to button_group 2020-10-24 01:30:18 -04:00
Yuri Roubinsky
4c65dc975c Shows ColorRect in Color constants autocompletion 2020-10-23 19:03:50 +03:00
Rémi Verschelde
f0f8864c9c
Merge pull request #42907 from Xrayez/add-ref-rect-border-width
Add `border_width` to `ReferenceRect`
2020-10-22 15:58:12 +02:00
Yuri Roubinsky
f2b98b4106 Remove printing of windowpos/screenpos in MenuButton 2020-10-21 09:58:37 +03:00
Andrii Doroshenko (Xrayez)
aef00021a9 Add border_width to ReferenceRect
Exposes a hidden parameter behind `CanvasItem.draw_rect()`.
2020-10-20 13:58:50 +03:00
Yuri Roubinsky
4f4287243c Removed underscore from GraphEdit begin/end_node_move signals 2020-10-20 09:22:40 +03:00
Rémi Verschelde
970d0d433b
Merge pull request #42891 from gvaneyck/graph-begin-node-move-timing
Fix emit_signal timing for GraphEdit's begin/end node move
2020-10-20 07:48:06 +02:00
Gabriel Van Eyck
fbc095dc78 Fix emit_signal timing for GraphEdit's begin/end node move 2020-10-19 18:25:07 -07:00
Rémi Verschelde
ff48a6a3bc
Merge pull request #42874 from dreamsComeTrue/text-edit-bounds-fix
TextEdit - fix valid bounds in 'set_line'.
2020-10-19 22:37:41 +02:00
Andrii Doroshenko (Xrayez)
9c3a33a4e8 Fixup ColorRect and TextureRect renames 2020-10-19 19:34:35 +03:00
reduz
ee06a70ea6 Refactor MethodBind to use variadic templates
Removed make_binders and the old style generated binders.
2020-10-18 12:28:44 +02:00
Dominik 'dreamsComeTrue' Jasiński
99c8a07919 TextEdit - fix valid bounds in 'set_line'. Fixes #41967 2020-10-17 17:59:15 +02:00
Paulb23
0d0a856ad5 Fixed main gutter not drawing on item toggle 2020-10-13 18:01:59 +01:00
volzhs
9eaa5ffab5 Put unselected tabs back in TabContainer control 2020-10-13 22:05:26 +09:00
FIF15
0e7e25d488 Remove redundant property "enabled_focus_mode"
Fixes #41529.
2020-10-13 10:04:37 +02:00
volzhs
cac4fedb2a Respect Tree.set_icon_max_width size for drawing selection box 2020-10-13 10:38:32 +09:00
Duroxxigar
4834e14493 Updated getters and setters names for toplevel 2020-10-02 19:09:01 -04:00
Rémi Verschelde
19f72beebb
Merge pull request #42451 from Duroxxigar/rename-toplevel
Renamed toplevel to be top_level
2020-10-02 10:57:23 +02:00
Rémi Verschelde
12091b39d2
Merge pull request #38743 from arrowinaknee/node-config-warnings
Update all get_configuration_warning() to retrieve warnings from the parent
2020-10-01 14:03:29 +02:00
Duroxxigar
b687ace7f9 Renamed toplevel to be top_level 2020-10-01 03:17:33 -04:00
Rémi Verschelde
c217498aa6
Merge pull request #41895 from 11thPenguin/master
Fix minor typo, gui_hid -> gui_hide
2020-09-29 10:35:12 +02:00
Rémi Verschelde
77ca3c20d8
Merge pull request #42092 from DashCell/dropping_file_on_parrent_directory_fix
Dropping file on parent directory fixed
2020-09-28 10:36:47 +02:00
Rémi Verschelde
915ac7360a
Merge pull request #42066 from dalexeev/output_copy
Improvement for the Copy button in the Output Log
2020-09-24 15:18:59 +02:00
PouleyKetchoupp
54eaaf456f Fix popup menu item selected when opening the menu
In order to allow selecting items by either holding left click, or click
to open and click again to select, mouse button release was invalidated
based on the amount of mouse motion.

This was causing issues in some scenarios where an item could be
selected while opening the menu if the mouse moved enough between button
press and release.

This case could happen in the language selection of the project manager,
especially on linux, because of the order and timing of the mouse
events on x11.

This change invalidates mouse release based on a timing condition rather
than moved distance to handle any case from the display server properly.
2020-09-18 20:45:59 +02:00
Dashcell
1ac936f035 Dropping file on parrent dirrectory fixed 2020-09-16 14:53:22 -03:00
Rémi Verschelde
6f0fa8519f
Merge pull request #41776 from EricEzaM/PR/tooltip-bugfixes
Tooltip flickering and targeting fixes.
2020-09-15 10:24:17 +02:00
Eric M
07cb95bbda Tooltip flickering and targeting fixes. 2020-09-15 17:34:29 +10:00
Danil Alexeev
fb6eb21afc Improvement for the Copy button in the Output Log
Now if no text is selected, pressing the Copy button copies the entire text.
2020-09-14 21:57:54 +03:00
Rémi Verschelde
463879db56
Merge pull request #41995 from Rubonnek/disconnect-item-rect-changed
Disconnect item_rect_changed removing a child of GraphEdit
2020-09-12 15:26:46 +02:00
Wilson E. Alvarez
d370ae9e1f
Disconnect item_rect_changed when removing a child of GraphEdit 2020-09-11 17:37:20 -04:00
Marcel Admiraal
1bb65b2618 Remove bit fields and use fixed width integers instead. 2020-09-11 11:02:00 +01:00
Rémi Verschelde
9d9ee2d4c2
Merge pull request #41971 from nekomatata/richtextlabel-align-pointer
Fix RichTextLabel alignment for clickable regions
2020-09-11 09:39:48 +02:00
PouleyKetchoupp
b783fa1416 Fix RichTextLabel alignment for clickable regions
Fixes #41006 (regression from #39164).

The original alignment fix was limited to PROCESS_DRAW mode, which
caused some discrepancies with PROCESS_POINTER mode.
Now only PROCESS_CACHE is excluded with a condition a few lines above.
2020-09-11 08:14:26 +02:00
Paulb23
33ab9cd621 Move safe line color into editor 2020-09-10 20:35:28 +01:00
Paulb23
d18a90b8f0 Move ConnectionGutter to editor code_editor 2020-09-10 20:35:28 +01:00
Paulb23
7829fdc1d0 Add folding gutter to code_edit 2020-09-10 20:35:28 +01:00
Paulb23
4d7df24d46 Add main_gutter (breakpoints, bookmarks, execution lines) to code_edit 2020-09-10 20:35:28 +01:00
Paulb23
907f9f2a84 Changed line_edited_from(from) to lines_edit_from(from, to) 2020-09-10 20:35:28 +01:00
Paulb23
1353ed5e44 Added Line numbers to CodeEdit 2020-09-10 20:35:28 +01:00
Paulb23
c13d9eb6e5 Added gutter system to TextEdit 2020-09-10 20:35:28 +01:00
Paulb23
a0b409cb14 Add and convert editor to use CodeEdit 2020-09-10 20:35:27 +01:00
Rémi Verschelde
1d70912080
Merge pull request #41890 from YeldhamDev/tabs_previous
Add 'get_previous_tab()' to 'Tabs'
2020-09-10 11:20:11 +02:00
Rémi Verschelde
0942af841c
Merge pull request #41920 from Chaosus/fix_colorpicker
Fix ColorPickerButton to apply changes after picker popup closed
2020-09-10 10:02:14 +02:00
Hugo Locurcio
3e0226515e
Rename ShortCut to Shortcut which is more grammatically correct
See https://github.com/godotengine/godot/issues/16863#issuecomment-685236980.
2020-09-09 21:54:54 +02:00
Yuri Roubinsky
993ae871c7 Fix ColorPickerButton to apply changes after picker popup closed 2020-09-09 21:38:29 +03:00
Jonah Stich
f6b14238c7 Fixed minor typo, gui_hid -> gui_hide. 2020-09-08 18:08:21 -07:00
Michael Alexsander
2b319889cb Add 'get_previous_tab()' to 'Tabs' 2020-09-08 17:35:49 -03:00
Marcel Admiraal
79802b31a9 Check if old mouse column is still available. 2020-09-08 10:24:57 +01:00
Rémi Verschelde
0a8c5845e3
Merge pull request #41870 from nekomatata/fix-line-edit-enter-regression
Fix LineEdit not consuming enter events
2020-09-08 11:14:33 +02:00
PouleyKetchoupp
5c63dec36e Fix LineEdit not consuming enter events
LineEdit should not return early when processing KEY_ENTER, so it can
consume the event properly.

Regression introduced by mistake while fixing enter events for Android
(PR #40487 - c0b394572f)
2020-09-08 10:22:37 +02:00
Marcel Admiraal
f515e72348 Use != 0 instead of > 0 when checking bit mask. 2020-09-07 10:36:22 +01:00
Eric M
13fd60572b Fixed get_usable_parent_rect() errors when initialising popup menus. 2020-09-06 13:59:40 +10:00
Rémi Verschelde
ff9195a905
Merge pull request #40649 from themvl/master
Fix bug where leading and trailing spaces werent taken into account with center and right allignment
2020-09-05 12:38:26 +02:00
Rémi Verschelde
21da779aee
Merge pull request #41689 from nathanfranke/fix-popupmenu-unresponsive
Fix PopupMenu unresponsive on right side of menu
2020-09-04 13:53:37 +02:00
bruvzg
80b8eff6aa
[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
Rémi Verschelde
2a8531cc56
Merge pull request #41456 from nekomatata/x11-fix-popups
Popup fixes for X11 display server
2020-09-03 00:09:19 +02:00
Nathan Franke
034e123c1d
Fix PopupMenu unresponsive on right side of menu 2020-09-02 01:24:10 -05:00
Rémi Verschelde
7844775a76
Revert "Updated LineEdit to address #41278"
This reverts commit 71febfd6e2.
2020-09-01 14:04:37 +02:00
EricEzaM
73c7fb2118 PopupMenu rework and enhancements
Many scrolling behaviour improvements and the ability to limit popup size.
2020-09-01 17:56:38 +10:00
mvl
4318ad94ac Fix bug where leading and trailing spaces werent taken into account with center and right allignment. 2020-08-31 20:09:28 +02:00
Tony-Goat
71febfd6e2 Updated LineEdit to address #41278
Updated set_max_length() function to actually pull a substring of the current text so it's not all thrown away when the new max length is shorter than the current length.
2020-08-26 11:19:24 -06:00
PouleyKetchoupp
6d1ef8efac Fix popup closed when an ancestor window is focused
Previously, only the direct parent were taken into account.

Popups like contextual menus could stay open if an ancestor which is
not a direct parent was focused.

Reproduction steps (any platform):
- Select a node in the scene tree
- Left click the node to start renaming
- Right click to open the copy/paste contextual menu
- Left click in the scene tree to deselect the node

Also closing popup when focusing out of the application, without waiting
for the parent to get focus to do so.
2020-08-22 18:42:42 +02:00
Cheeseness
1f159306ed Skip indentation of empty lines when indenting a selection. 2020-08-14 23:53:34 +10:00
Rémi Verschelde
044b3d0ed3
Merge pull request #37769 from HellonLegs/master
solved ctrl + alt + special character Issue #6851
2020-08-14 13:03:07 +02:00
Rémi Verschelde
fac2bb99ac
Merge pull request #38223 from EricEzaM/spinbox-update-lineedit-after-bad-input
Fixed bug where spinbox would not update to it's actual value after non-numeric input
2020-08-14 12:16:32 +02:00
Umang Kalra
cec21ab82c Fix RichTextLabel center alignment bug
Fixes #40207.
2020-08-11 12:11:38 +02:00
PouleyKetchoupp
095331fae4 Add option to disable virtual keyboard for TextEdit
Adding support for disabling virtual keyboard on mobile platforms, in
order to make it consistent with LineEdit.

It allows implementing a custom virtual keyboard.
2020-08-09 11:06:36 +02:00
Paulb23
51dd4792d7 Fix TextEdit line width cache not being updated 2020-07-29 21:42:38 +01:00
Aaron Franke
56e2c6c704
Make all String float conversion methods be 64-bit 2020-07-27 18:38:53 -04:00
PouleyKetchoupp
8c05dadcff Fix Return key events in LineEdit & TextEdit on Android
Depending on the device implementation, editor actions could be
received with different action ids or not at all for multi-line.

Added a parameter to virtual keyboards to properly handle single-line
and multi-line cases in all situations.

Single-line:
Input type set to text without multiline to make sure actions are sent.
IME options are set to DONE action to force action id consistency.

Multi-line:
Input type set to text and multiline to make sure enter triggers new lines.
Actions are disabled by the multiline flag, so '\n' characters are
handled in text changed callbacks.
2020-07-26 20:06:07 +02:00
Sergey Minakov
6e550e90bf GUI ScrollBar: possible fix for scrolling
Use of unmodified value returned by 'screen_is_touchscreen' to be used in determening if scroll bar should be scrolled
2020-07-25 21:54:56 +02:00
Rémi Verschelde
27d1209282
Merge pull request #38088 from YeldhamDev/name_tooltips_tweaks
Small naming and tooltip tweaks
2020-07-24 13:57:13 +02:00
Rémi Verschelde
513b39882a
Merge pull request #40436 from DanielZTing/master
Evenly distribute stretched Nodes in BoxContainer
2020-07-24 13:47:18 +02:00
Michael Alexsander
5643d2e3fe Small naming and tooltip tweaks 2020-07-23 20:17:43 -03:00
Rémi Verschelde
a30bac94cc
Merge pull request #39737 from Cevantime/add_force_caret_displayed_to_line_edit
add force caret display to line edit
2020-07-23 18:02:51 +02:00
Rémi Verschelde
1ab0644532
Merge pull request #40217 from theoway/visible_line_count_fix
Fixes the get_visible_line_count() of rich text label
2020-07-22 09:50:26 +02:00
Rémi Verschelde
d8c3fba1d4
Merge pull request #40588 from nekomatata/virtual-keyboard-disable
Add option to disable virtual keyboard for LineEdit
2020-07-22 09:33:47 +02:00
PouleyKetchoupp
0aa56e3ab8 Add option to disable virtual keyboard for LineEdit
Co-authored-by: Alexander Holland <alexander.holland@live.de>
2020-07-22 08:19:05 +02:00
Rémi Verschelde
a5fb445121
Merge pull request #40450 from asmaloney/spelling
Fix spelling & grammar in comments, docs, and messages
2020-07-21 22:14:04 +02:00
Andy Maloney
4dda62f591 Fix spelling & grammar in comments, docs, and messages 2020-07-21 15:17:23 -04:00
Tomasz Chabora
c0479496fa Prevent infinite loop in Tree incremental search 2020-07-20 13:22:00 +02:00
Daniel Ting
04ea6ec88d Evenly distribute stretched Nodes in BoxContainer
Add any leftover fractional pixels to an error accumulator. When the
accumulator is greater or equal to one, add one pixel to the current
Node's size and subtract one from the accumulator.

Closes #36522
2020-07-16 12:24:57 -05:00
Cevantime
dc46bc8857 add force caret display to line edit 2020-07-15 13:00:25 +02:00
Rémi Verschelde
6497a3fb50
Merge pull request #40291 from hinlopen/dialog-size
Resize various dialogs
2020-07-15 12:13:33 +02:00
Rémi Verschelde
c8523038cc
Merge pull request #40268 from DanielZTing/master
Fix cancel/OK button order on macOS
2020-07-15 09:21:04 +02:00
Emmanuel Leblond
1f02ff8a76
Correct RichTextLabel.custom_effects property type metadata 2020-07-14 17:33:50 +02:00
Stijn Hinlopen
526e060b73 Resize dialogs (FileDialog, EditorFileDialog, Reparent, SceneTreeDialog and resource depency dialogs). 2020-07-14 14:35:22 +02:00
Paulb23
bc4cee4458 Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighter
- Extacted all syntax highlighting code from text edit
- Removed enable syntax highlighting from text edit
- Added line_edited_from signal to text_edit
- Renamed get/set_syntax_highlighting to get/set_syntax_highlighter
- Added EditorSyntaxHighligher
2020-07-11 17:09:58 +01:00
Paulb23
2f1080be9b Convert syntax highlighters into a resource 2020-07-11 15:26:58 +01:00
Daniel Ting
9605fc54c7 Fix cancel/OK button order on macOS
The macOS platform convention regarding button order is cancel on left,
OK on right.
2020-07-10 15:10:11 -05:00
Marcel Admiraal
26fcf2b04c Add override keywords. 2020-07-10 13:56:54 +01:00
Maganty Rushyendra
c1d5c7727c Emit signals for GraphEdit multi-node selection and unselection
Emit `node_selected` and `node_deselected` signals where appropriate
when selecting or unselecting multiple GraphEdit nodes at once.
2020-07-09 19:15:27 +08:00
Umang Kalra
bd32c273ff Fixes the get_visible_line_count() of rich text label 2020-07-09 01:32:11 +05:30
Yuri Roubinsky
d131bbaf15 Fix GraphEdit reconnecting to disconnected port 2020-07-05 09:47:58 +03:00
Yuri Roubinsky
de1117f5ad Prevents incorrect connection attempt on port clicking in GraphEdit
Prevents incorrect connection attempt on port clicking in GraphEdit
2020-07-04 08:05:37 +03:00
Rémi Verschelde
c020eea184
Merge pull request #40092 from hinlopen/remove-find-last
Remove String::find_last (same as rfind)
2020-07-04 01:38:01 +02:00
Stijn Hinlopen
929b98d24b Remove String::find_last (same as rfind) 2020-07-03 15:26:22 +02:00
Rémi Verschelde
a6f1714612
Merge pull request #37218 from lrgilbert/graphnode-port-separation
Fixed GraphNode port separation.
2020-07-03 12:46:11 +02:00
Rémi Verschelde
9a82c3d6a5
Merge pull request #40081 from nekomatata/richtextlabel-fill-regression
Fix RichTextLabel fill alignment regression
2020-07-03 12:43:20 +02:00
Rémi Verschelde
ad04cf0bfa
Merge pull request #32907 from georgikoemdzhiev/FixPressedIssue
Uncheck 'Pressed' if toggle_mode is unchecked
2020-07-03 12:01:34 +02:00
lrgilbert
47c929c972 Fixed separation of ports on GraphNode
Fixes #32474.
2020-07-03 11:28:08 +02:00
PouleyKetchoupp
44f88999c7 Fix RichTextLabel fill alignment regression
Fixes #40068 (regression from #39164) by not applying the line offset
change in the case of fill alignment mode.
2020-07-03 10:30:24 +02:00
Juan Linietsky
ac7e9479ce Fix content scale mode, closes #37941 2020-07-02 17:16:13 -03:00
georgikoemdzhiev
8674e5c0bd Uncheck 'Pressed' if toggle_mode is unchecked 2020-07-02 19:14:10 +01:00
Haoyu Qiu
45d0799b5b Prevent dragging from SceneTree buttons 2020-07-02 15:27:59 +08:00
Rémi Verschelde
0636e2a877
Merge pull request #40020 from reduz/fix-tree-edit-focus
Fix doubleclick on tree item, restore input focus on previous windows.
2020-07-02 07:26:13 +02:00
Rémi Verschelde
b11da7b703
Merge pull request #40028 from reduz/fix-popups1
Fix some popup menus missing screen transform.
2020-07-02 07:21:24 +02:00
Rémi Verschelde
1ae40793c7
Merge pull request #40022 from reduz/fix-subwindow-clamp
Add ability to clamp embedded subwindows to parent
2020-07-02 07:20:45 +02:00
Juan Linietsky
f0e320decf Fix some popups menu missing screen transform.
Closes #38591
2020-07-01 14:44:19 -03:00
Pawel Lampe
c36be14e3c ItemList's add_(icon_)item method returns id of added item
- docs updated
2020-07-01 19:23:51 +02:00
Rémi Verschelde
0a8dbe7f75
Merge pull request #32516 from nekomatata/texture-button-flip
Added flip_h and flip_v properties in TextureButton
2020-07-01 19:07:59 +02:00
Juan Linietsky
39a77735bd Add ability to clamp embedded subwindows to parent, fixes #37792 2020-07-01 12:49:35 -03:00
Juan Linietsky
058166fb6c Fix doubleclick on tree item, restore input focus on previous windows.
Closes #37335
2020-07-01 12:46:39 -03:00
Rémi Verschelde
372136fe75 Environment: Refactor code for readability + more
- Makes all boolean setters/getters consistent.
- Fixes bug where `glow_hdr_bleed_scale` was not used.
- Split CameraEffects to their own source file.
- Reorder all Environment method and properties declarations,
  definitions and bindings to be consistent with each other
  and with the order of property bindings.
- Bind missing enum values added with SDFGI.
- Remove unused SDFGI enhance_ssr boolean.
- Sync doc changes after SDFGI merge and other misc changes.
2020-07-01 14:44:45 +02:00
PouleyKetchoupp
5f1d94bb7d Added flip_h and flip_v properties in TextureButton 2020-07-01 11:31:27 +02:00
Rémi Verschelde
719609522a
Merge pull request #40003 from YeldhamDev/tree_scroll_fix
Fix Tree's 'scroll_to_item()' not working correctly on some cases
2020-07-01 08:52:08 +02:00
Michael Alexsander
144a4cc39f Fix Tree's 'scroll_to_item()' not working correctly on some cases 2020-06-30 18:22:26 -03:00
Juan Linietsky
b19ab945ac Make dialogs exclusive by default, fixes #37732
Also fix on set_visible, not creating exclusive children as it should.
2020-06-30 14:02:37 -03:00
Juan Linietsky
438c380458 Add a separate application focus/in notification out from Window focus notification. 2020-06-30 10:40:06 -03:00
Mark Kuo
e435d57758 VideoPlayer: fix possible race condition
In set_stream() we write to 'playback' while accessing the same object
in _mix_audio() in audio thread. Protect the 'write' part in
set_stream() to avoid possible crash in _mix_audio() function.
2020-06-29 13:01:54 +10:00
Pedro J. Estébanez
b5e44a123c Handle gone TabContainer popup nicely 2020-06-24 19:34:32 +02:00
Stijn Hinlopen
5f7499beac No longer scroll vertically when scrollbars are unavailable 2020-06-20 20:56:17 +02:00
Hugo Locurcio
31b7f02a29
Remove ToolButton in favor of Button
ToolButton has no redeeming differences with Button;
it's just a Button with the Flat property enabled by default.
Removing it avoids some confusion when creating GUIs.

Existing ToolButtons will be converted to Buttons, but the Flat
property won't be enabled automatically.

This closes https://github.com/godotengine/godot-proposals/issues/1081.
2020-06-19 20:49:49 +02:00
Rémi Verschelde
1cd8e835be
Merge pull request #39659 from asmaloney/macos-command-backspace
[macOS] Command-backspace in line edit
2020-06-19 13:19:39 +02:00
Rémi Verschelde
a8132b2fab
Merge pull request #33235 from nekomatata/rich-text-label-fit-height
Option in RichTextLabel for height to fit content
2020-06-19 12:52:25 +02:00
Andy Maloney
7433c9d40c [macOS] Command-backspace in line edit
Make command-backspace in line edit work like other macOS applications.

If there is a selection, command-backspace deletes the selection.

If there isn't a selection, command-backspace deletes from the cursor to the beginning of the line edit.

This addresses part of godotengine/godot#23548
2020-06-18 17:45:40 -04:00
Rémi Verschelde
c6f48f5bfc
Merge pull request #39485 from theoway/append_bbcode_animation_bug
Fixes the stopping of animation effects in bbcode text after appending
2020-06-15 11:03:46 +02:00
Rémi Verschelde
2ffc570417
Merge pull request #39522 from noidexe/fix-tabcontainer-tabselected-misfire
Fix TabContainer emitting spurious tab_selected signals when a theme …
2020-06-15 10:57:32 +02:00
Tomasz Chabora
46fd51056a Re-enable scroll follow on RichTextLabel clear 2020-06-14 01:23:32 +02:00
Lisandro Lorea
5123006f06 Fix TabContainer emitting spurious tab_selected signals when a theme is changed
- The repaint code was moved outside of set_current_tab() and to a "_repaint()" private function
- _on_theme_changed() will now only call _repaint() and update()
This means _on_theme_changed() will do only what it needs (repainting the TabContainer to account for the new theme)

fixes #39498
2020-06-13 20:06:19 -03:00
Umang Kalra
88b30a29bf Fixes the stopping of animation effects in bbcode after appending 2020-06-13 00:20:52 +05:30
Rémi Verschelde
fcf14da8d0
Merge pull request #39337 from Cevantime/add-text-deletion-methods-to-line-edit
Make text deletion methods public for LineEdit
2020-06-11 09:33:27 +02:00
Thibault Truffert
2bb44ea5bd Make text deletion methods public for LineEdit 2020-06-10 22:16:48 +02:00
Rémi Verschelde
8b79f2aad4
Merge pull request #39350 from giulianob/improve-tree-redraw
Tree: Calling update in _gui_input less frequently
2020-06-10 10:49:54 +02:00
Michael Alexsander
637927f803 Add generic file icon and its modulation to the 'FileDialog' 2020-06-08 10:31:45 -03:00
Giuliano Barberi
d443a13244 Tree: Calling update in _gui_input less frequently 2020-06-06 17:02:22 -04:00
Rémi Verschelde
7c3dc855ca
Merge pull request #39164 from theoway/richlabeltext_align_bug
Fixes the right and center alignment bug of rich text label
2020-06-03 22:46:13 +02:00
Dominik 'dreamsComeTrue' Jasiński
8f11a91917 Allow scroll_to_line when scroll_active is 'false'
Fix #36134
2020-06-03 19:55:27 +02:00
Umang Kalra
b2a32d007d Fixes the right and center alignment bug of rich text label 2020-06-03 21:37:48 +05:30
Rémi Verschelde
901832e21c
Merge pull request #39113 from nekomatata/bbcode-image-color
Add color option for img bbcode tag in RichTextLabel to tint images
2020-06-03 13:16:13 +02:00
PouleyKetchoupp
7b7d4ef079 Add color option for img bbcode tag in RichTextLabel to tint images 2020-05-30 19:13:16 +02:00
Rémi Verschelde
1620669f4e
Merge pull request #39051 from Xrayez/geometry-split
Split `Geometry` singleton into `Geometry2D` and `Geometry3D`
2020-05-29 12:10:37 +02:00
Andrii Doroshenko (Xrayez)
69d5de632e Split Geometry singleton into Geometry2D and Geometry3D
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-27 14:28:34 +03:00
Thakee Nathees
9d224ac429 colorpicker margin bug fixed 2020-05-26 08:50:29 +05:30
Rémi Verschelde
57d21ebeda
Merge pull request #38396 from nekomatata/unexpose-sort-children
Fix Container sorting not working when overriding _sort_children in gdscript
2020-05-23 20:22:44 +02:00
PouleyKetchoupp
ad8081216c Option in RichTextLabel for height to fit content 2020-05-22 09:20:49 +02:00
Dominik 'dreamsComeTrue' Jasiński
08377b3f04 Clarifies 'icon_separation' in TabContainer (instead of 'hseparation')
Fixes: #38911
2020-05-21 21:53:17 +02:00
Eric M
707cf278a5 Fixed issues with slider focus and scroll input 2020-05-21 21:29:03 +10:00
Rémi Verschelde
d3612d04c7
Merge pull request #38794 from nekomatata/text-edit-search-result
TextEdit search returns Dictionary instead of Vector
2020-05-20 13:28:29 +02:00
Rémi Verschelde
aec07538f4
Merge pull request #38309 from SkyLucilfer/AndroidLineEdit
Fix Android LineEdit editing bugs
2020-05-20 11:45:59 +02:00
Hugo Locurcio
c9abc63108
Allow searching with keyboard input by default in PopupMenu
See discussion in https://github.com/godotengine/godot-proposals/issues/43.
2020-05-17 23:28:24 +02:00
PouleyKetchoupp
242b94af1a TextEdit search returns a dictionary instead of Vector
Easier to use than accessing elements in a Vector using indices given by an enum.
Breaks compatibility on existing scripts using this functionality.
2020-05-16 23:46:14 +02:00
PouleyKetchoupp
3ad694018f Fix Container sorting not working when overriding _sort_children in gdscript
Remove _sort_children from script bindings:
_sort_children is an internal method which shouldn't be exposed to scripts.

Added support for non-bound methods in MessageQueue:
So we can use deferred calls without exposing internal methods to scripts.

Added debug checks in CallableCustomMethodPointer:
Adding method pointer callables to the message queue was causing crashes
in case an object was destroyed and the same memory was allocated for
another one. The new object had a valid object id but the call was erroneous.
Release will be fixed later, along with Variant which has the same problem and
is also fixed for debug only.
2020-05-16 18:13:25 +02:00
SkyJJ
cc473b948f Fix Android LineEdit editing bugs 2020-05-16 17:55:27 +02:00
Marcus Brummer
b048eb05ad Fixed text editor drawing if smooth scrolling is disabled.
Fixes #38778
2020-05-16 16:31:43 +02:00
ArrowInAKnee
9fc2b0fddc Update all get_configuration_warning to retrieve warnings from the parent 2020-05-16 16:07:42 +03:00
smartin015
00457c68bc Remove get_local_mouse_position() hack in GraphEdit 2020-05-16 13:22:52 +02:00
Rémi Verschelde
0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde
07bc4e2f96 Style: Enforce separation line between function definitions
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-14 16:54:55 +02:00
Rémi Verschelde
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
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-14 16:54:55 +02:00
Rémi Verschelde
1a8167867b Modernize remaining uses of 0/NULL instead of nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2020-05-14 13:45:01 +02:00
Rémi Verschelde
1f6f364a56 Port member initialization from constructor to declaration (C++11)
Using `clang-tidy`'s `modernize-use-default-member-init` check and
manual review of the changes, and some extra manual changes that
`clang-tidy` failed to do.

Also went manually through all of `core` to find occurrences that
`clang-tidy` couldn't handle, especially all initializations done
in a constructor without using initializer lists.
2020-05-14 10:01:56 +02:00
Rémi Verschelde
6dfea347b0
Merge pull request #38655 from ice-blaze/minimap-shifted-selection-by-one-line#38532
Fix minimap selection offset
2020-05-12 18:02:21 +02:00
Eduardo Nunes Pereira
d8f8a3c606 Using the common behaviour when use command+shift on text line for osx
* On press left+command+shift or right+command+shift it should behave like shift+home or shift+end and select the text
* Using home and end events as reference
2020-05-11 10:25:07 +02:00
etienne.frank
72ab355945 Fix minimap selection offset
The minimap selection was shifted of 1 line too late.
2020-05-11 10:02:16 +02:00
Rémi Verschelde
69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00
Rémi Verschelde
e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
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-10 13:12:16 +02:00
Rémi Verschelde
03b13e0c69 Style: Add missing copyright headers 2020-05-10 13:12:16 +02:00
Rémi Verschelde
d7b85fbaa1
Merge pull request #31086 from volzhs/underline
Use underline position and thickness value in font file
2020-05-07 21:18:41 +02:00
Rémi Verschelde
b62218bbac
Merge pull request #38385 from ThakeeNathees/method-bind-text_edit-set_line
method bind TextEdit::set_line() added
2020-05-07 13:43:34 +02:00
nobuyuki_nyuu
35f30086de PopupMenu.get_current_index() bound to ClassDB 2020-05-06 15:27:35 -05:00
Rémi Verschelde
aca9cfa76c
Merge pull request #38495 from DarkMessiah/tree-bind-suffix
Bind set_suffix and get_suffix in Tree
2020-05-06 13:58:34 +02:00
Rémi Verschelde
ca289f4d6f
Merge pull request #38488 from EricEzaM/adjust-stretch-ratio-value-range-and-documentation
Updated editor spin slider to have better behaviour and adjusted control's size_flags_stretch_ratio value range
2020-05-06 10:06:53 +02:00