Commit graph

1676 commits

Author SHA1 Message Date
Guilherme Felipe d1f5deabd8 Opens the menu with the same parent on mouse focus 2018-07-24 19:59:40 -03:00
Juan Linietsky 2e67fc57e6
Merge pull request #18867 from fire/better_vx_us_rebase_02
Improve VisualScript UX
2018-07-24 18:02:10 -03:00
K. S. Ernest (iFire) Lee 85670726fd Improve VisualScript UX
* Prototype faster function call ux.
* Work on general search ux.
* Able to create nodes from search.
* Show class for variables but not methods.
* Get actions search working.
* Descriptions now show for both methods and properties.
* Enable zooming on mouse wheel up and down.
* Make the drag trigger on right mouse button.
* Search now shows for action visual script nodes.
* Able to search visual node names.
* Search works better.
* Change zooming scale to hide artifacts better.
* Remove zoom changes
* Select from base should check properties too like the other functions.
* Seq_connect flag is needed to set sequence lines correctly.
* Remove comment
* Code cleanup with function names and arguments.
* Use brief description for search descriptions.
* Clean and fix bug with input nodes connecting with sequence lines.
* Add a warning and fix some edge conditions with sequence into data lines and vice versa.
* Don't search functions when pulling from a sequence node.
* Don't show actions when pulling from a data line.
* Set set and get properties.
* Convert visual script operators to the correct type
* Create a function preset finds only functions.
* Singletons can now find functions.
* Add shift-a for generic search.
* Add brief descriptions for Visual Script nodes.
* Search boxes can now filter names.
* Add bigger hit zones to node connect.
* For the drop zones, make all the rect2 areas the same size.
* Function names in visual script node should be lower case so that search works better.
* Use the convention of capitalize() for set, set, visual script nodes and methods.
* Make search more general. Ignore "_" and make case-insensitive. Also made the search window smaller and remove extra info from search
* Make type_cast use the connecting node's type and remove use of found variable.
* Fix case where you call an instance's call function where it becomes an invalid call.
* Make get_visual_node_names use a set of filters, move action creations and fix bug with sequence node connections.
* Make the window bigger.
* Make connect_data and connect_seq more robust.
* Add icons to search items.
* Add vs constructors in shift-a menu.
* Operators, builtins and constructors show type name. Fix several problems with port connections.
* In shift-a mode search everything.
* Code cleanup
* Work on autocompleting the type.
  * Use type guess in action creation.
  * Check if type hint string exists in object variables when generating the visual script search.
  * Add the hint to SceneTree.
  * Add original type detection.
  * Make type casting great again. This puts the type casted base type as the data output type string hint.
  * Pass the type in a VisualScriptFunctionCall too.
  * Set the base type correctly in VisualScriptFunctionGet and VisualScriptFunctionSet using hint string.
  * Make sure the instance is passed in VisualScriptPropertySet.
  * Restore search on the node's type.
* Remove dependencies from graph_edit.
* Remove dependencies from property_selector and name the class visual_script_property_selector.
* Extract hot zones into a function.
* Move hot_zones constants into default theme.
* Bigger capture zones.
* Clean messy port_grab_distance variables.
* Remove RMB functionality.
* Remove memory leak on showing visual script descriptions.
* Read the port_grab_distance constants on enter tree and theme changed.
2018-07-24 13:59:28 -07:00
Rémi Verschelde fda6b78bae
Merge pull request #18806 from Calinou/bilinear-textureprogress
Add support for bilinear bars in TextureProgress
2018-07-24 22:31:24 +02:00
Wilson E. Alvarez a22e746bc3 Removed unnecessary assignments 2018-07-24 09:51:03 +02:00
George Marques 03746da73f
Add editor highlight for type-safe lines
The line number is hightlighted to indicate that the line contains only
type-safe code.
2018-07-20 21:55:18 -03:00
Juan Linietsky 336db8bcd1 -Fix tooltips in inspector, now they show as rich text. 2018-07-20 18:16:19 -03:00
Rémi Verschelde 13239cd4cc Export: Properly reload preset when opening dialog
Fixes #20119 where newly installed templates were not detected.

Also fix a bug with preset deletion where it would attempt to
edit an already removed preset. For this I made it so that
ItemList::deselect_all() also resets `current` to -1, as a manual
ItemList::deselect(idx) already does.
2018-07-18 13:49:34 +02:00
volzhs adb179154a Fix Label autowrap clips text 2018-07-18 02:19:05 +09:00
Max Hilbrunner adec9c3168
Merge pull request #20150 from ibrahn/fix-scrollbar-atlas
fix scrollbar icons with atlas texture.
2018-07-17 12:15:22 +02:00
Overblob e6ad5e23b4 * Small hex/float/integer parsing refactoring
* Potential bug fix on hex (cannot be used atm)
* Added optional typing for floats, eg:
"1f" -> "1.0"
"1.f" -> "1.0"
"1.99f" -> "1.99"
"1." -> "1.0"
2018-07-15 14:58:23 +02:00
Juan Linietsky f6ce73f724 Visual Shaders are back. 2018-07-14 18:16:18 -03:00
Ibrahn Sahir e51a94905d fix scrollbar icons with atlas texture.
Draw scrollbar icons through their textures, rather than calling
directly to the server. Allows atlas textures to manipulate the source
rect as required.
2018-07-14 14:02:08 +01:00
Ibrahn Sahir fb32adfcf8 fixed a branch on uninitialised data in gui/tree
I don't think it was really causing any harm, but this makes things a
little more explicit and helps clean up valgrind output.
2018-07-13 14:00:10 +01:00
Max Hilbrunner cc57b62ab3
Merge pull request #20068 from Xrayez/submenu-popup-delay
Add ability to set submenu's popup delay time on mouse hovering
2018-07-12 05:27:49 +02:00
Alexander Holland bf3c81f20b fix ColorPickerButton.get_popup() 2018-07-10 15:06:36 +02:00
Andrii Doroshenko (Xrayez) e3b77b24ac Add ability to set submenu's popup delay time on mouse hovering
This allows to set delay time for the submenu to popup. Setting
this value low can increase responsiveness. If the popup menu is added
as a child of another (acting as a submenu), it will inherit the delay
time of the parent menu item.
2018-07-09 18:37:41 +03:00
Chaosus dbd5afc498 Added scrollable property to Sliders 2018-07-07 13:48:34 +03:00
Max Hilbrunner c488a74e0c
Merge pull request #19498 from guilhermefelipecgs/fix_regression
Fix "find and replace" initializing with wrong size
2018-07-05 04:23:18 +02:00
Max Hilbrunner 16f1a77319
Merge pull request #19735 from Paulb23/text_offset_issue_15688
Fixed text drawing too high in TextEdit, issue 15688
2018-07-05 04:04:39 +02:00
Max Hilbrunner 43748f67be
Merge pull request #19351 from guilhermefelipecgs/fix_reversed_text
Fixes to the new inspector
2018-07-05 03:50:31 +02:00
Max Hilbrunner e3c8ac43c6
Merge pull request #19187 from Zirak/editor-autocomplete-quote
Editor autocomplete won't insert unnecessary quotes
2018-07-05 02:33:33 +02:00
Max Hilbrunner edc63a2f60
Merge pull request #18028 from gabrii/18026
Fix #18026. Expose TextEdit::set_draw_breakpoint_gutter.
2018-07-05 02:30:18 +02:00
Guilherme Felipe 709948aa5a Fixes to the new inspector
- Fix inspector dock not updating tree for main resource;
- Fixes the inspector input text reverted during typing;
- Add method bind for "refresh" used by MultiNodeEdit;
2018-07-04 20:08:45 -03:00
groud 560deda207 Fixes control nodes size not updated when outside the tree 2018-07-04 15:14:42 +02:00
Rémi Verschelde 3724f1562b
Merge pull request #19782 from Calinou/fix-control-pixel-snap-rounding
Fix control pixel snap rounding using floor() instead of round()
2018-07-04 15:11:08 +02:00
Max Hilbrunner fbff1804d2
Merge pull request #17438 from Deluvi/get-word-pos-quote-fix
get_word_at_pos considers simple and double quotes
2018-07-03 18:28:47 +02:00
Max Hilbrunner b21c1f64cd
Merge pull request #18634 from groud/fix_control_child_of_node2d
Fixes the bad calculation of margin & anchors when child of Node2D
2018-07-03 18:06:15 +02:00
Max Hilbrunner 24ce1ace13
Merge pull request #19244 from Chaosus/settingsperformance_and_colordeferred
Increases settings apply speed and added deferred color setting to ColorPicker
2018-07-03 17:01:23 +02:00
Max Hilbrunner 6efc1ba6e0
Merge pull request #19565 from robojumper/fixed_edge_scroll
Re-enable scrolling via selecting code beyond edges in text_edit.cpp
2018-07-03 16:11:19 +02:00
Juan Linietsky 2dc738ce27 -Fixes to how hashing happened, now StringName and NodePath use default hasher, this was leading to some severe slowdown in scenarios
-Fixes to some duplication scenarios for instanced scenes
2018-07-02 15:08:35 -03:00
George Marques d56d7299e4
Merge pull request #19875 from willnationsdev/meta-underlined
Fix underline_meta not working in RichTextLabel
2018-07-01 23:13:46 -03:00
Paulb23 8f390da422 Center text drawing in LineEdit 2018-07-01 15:46:33 +01:00
Guilherme Felipe b2e78e117c Fix performance for godot's interface 2018-07-01 09:48:03 -03:00
Will Nations a9ea06e73a Fix underline_meta not working in RichTextLabel 2018-07-01 00:15:27 -05:00
Juan Linietsky eeab3502d5 Changes to how node paths are selected from property, allowing setting a hint. 2018-06-27 20:50:25 -03:00
Hugo Locurcio 88c23e243f
Fix control pixel snap rounding using floor() instead of round()
This resulted in small leftwards/upwards movement of controls being
faster than it should be.

This closes #19763.
2018-06-26 17:55:23 +02:00
Paulb23 8a168637fe Fixed text drawing too high in TextEdit, issue 15688 2018-06-24 10:38:53 +01:00
Juan Linietsky 0a1c1c660f -Added AnimationGraphPlayer (still missing features)
-Added ability to edit resources from built-in inspector (wip, needs testing and feedback)
2018-06-18 22:12:08 -03:00
robojumper 4ba6755324 Re-enable scrolling via selecting code beyond edges in text_edit.cpp 2018-06-14 21:29:39 +02:00
Guilherme Felipe 5bae3693bf Fix "find and replace" initializing with wrong size
Fix the code editor outside the allowed limits.
2018-06-13 14:08:04 -03:00
Saracen 9d0bdf69c4 LineEdit IME position will now ignore placeholder text. 2018-06-13 16:42:36 +01:00
Rémi Verschelde d6d8237a5a
Merge pull request #19509 from SaracenOne/ime
IME context detection.
2018-06-13 15:26:50 +02:00
Guilherme Felipe b904c37a54 Fix TabContainer not showing tabs on left when resizing.
Fix #19510.
2018-06-12 15:59:53 -03:00
Saracen c5bdb5b1d8 IME context detection. 2018-06-11 17:22:11 +01:00
Max Hilbrunner e949230837
Merge pull request #18298 from gabrii/TextEditScaledSelection
TextEdit scaled selection
2018-06-09 19:35:48 +02:00
Juan Linietsky a8dd5750e2
Merge pull request #19334 from guilhermefelipecgs/fix_popup
Fixes popup_centered_* methods, dialogs with wrong sizes and visual script editor
2018-06-08 13:00:53 -03:00
groud 4d78e16bc1 Fixes the bad calculation of margin & anchors when child of Node2D 2018-06-07 21:25:15 +02:00
Juan Linietsky b659fd6d74 Entirely new (and much improved) animation editor. 2018-06-07 12:52:00 -03:00
Guilherme Felipe 7a3882723c Fix #16069, #19292, #19267 and #18940 2018-06-06 13:16:52 -03:00
Alexander Holland e3fcb7b011 expose lineedit 2018-06-06 01:19:27 +02:00
Chaosus cf38270ef7 Increase settings apply speed and added deferred color apply 2018-05-31 11:33:36 +03:00
Gabriel Gavilan b7b63fe034 Improve breakpoints and breakpoint gutter API in TextEdit
Added breakpoint_gutter, is_breakpoint_gutter_enabled, set_breakpoint_gutter_enabled, get_breakpoints, remove_breakpoints.
Fixed breakpoint_toggled signal not fierd when text is edited.
Fixes #18026.
2018-05-30 14:39:44 +02:00
Zirak c329780ea7 Editor autocomplete won't insert unnecessary quotes
When autocompleting a string (e.g. emit_signal or connect), e.g.

    emit_signal('visibility_c')
                            ^

where "^" is the cursor, hitting <tab> would insert an unnecessary
quote, breaking the string:

    emit_signal('visibility_changed'')

This commit adds a small lookahead, so the end result will be as the
user probably expected:

    emit_signal('visibility_changed')
2018-05-26 21:13:42 +00:00
Anish 5d3108acbb Ensures CMD+left and CMD+right only valid for OSX.
Fix in #18370 is now only valid for OSX and is reverted for other OS.

Fixes #19042
2018-05-24 15:04:22 +05:30
Ibrahn Sahir 2abec59db9 fix for TextEdit::set_text firing signals it shouldn't.
Removing some _changed signals in set_ functions.
Includes revert of commit 384625aa31
2018-05-19 19:38:13 +01:00
Rémi Verschelde d6c15bd96a
Merge pull request #19017 from toger5/fix_no_a_input_script_editor_osx
fixed capital A osx
2018-05-18 20:04:31 +02:00
toger5 6476b708d9 fixed capital A osx 2018-05-18 19:46:40 +02:00
Rémi Verschelde e8dce91481
Revert "Fix color-picker sliders" 2018-05-18 01:49:45 +02:00
Martin Capitanio c58e155580 Fix color-picker sliders 2018-05-17 23:27:29 +02:00
Juan Linietsky 4b5227ff77 -Ability to open resources in the same window
-Plenty of fixes and improvements to new inspector
-Fixes that were needed to make inspector work better
2018-05-17 18:03:05 -03:00
Rémi Verschelde 802ddc6e94
Merge pull request #18862 from endragor/remove-font-width-ceiling
Ceil char width within Label instead of Font
2018-05-17 09:31:22 +02:00
Juan Linietsky dfd1331690 Allow editing of some unbound properties when hinted (or no range hinted) 2018-05-16 09:13:41 -03:00
Juan Linietsky 031a445368 Add note about color picker deferred initialization 2018-05-16 08:04:46 -03:00
volzhs e639db0529 Fix segfault at quiting editor 2018-05-16 16:54:04 +09:00
Rémi Verschelde 69cafb6044
Merge pull request #18910 from PJB3005/18-05-15-fix-textedit-param
Fix missing registration for new param of TextEdit::cursor_set_line.
2018-05-16 02:38:21 +02:00
Rémi Verschelde 6f4a90592f
Merge pull request #18909 from ianb96/getcharwidthfix
fix get_char_width for non-latin characters
2018-05-16 02:32:40 +02:00
Juan Linietsky 005b69cf6e -New inspector.
-Changed UI resizing code, gained huge amount of speed.
-Reorganized timer sync to clean up behavior (sorry forgot commit this before)

-
2018-05-15 17:14:31 -03:00
Pieter-Jan Briers 0f303c9f43 Fix missing registration for new param of TextEdit::cursor_set_line.
This caused Mono glue gen to fail and other bugs to appear
(such as in Visual Script)
2018-05-15 21:53:42 +02:00
ianb96 ce434bca82 fix get_char_width for non-latin characters 2018-05-15 15:32:09 -04:00
Ian e1fff4bc09 TextEdit word wrap 2018-05-14 16:17:48 -04:00
Ruslan Mustakov d5a0b5f35b Ceil char width within Label instead of Font
Some classes use Font::get_char_size directly and not only for
autowrapping. RichTextLabel is one such example. So this commit
reverts aa8561d (PR #17504) and instead ceils character width within
Label. This makes sure Label autowraps correctly while not affecting
other Font clients.

Fixes #18835.
2018-05-14 20:32:14 +07:00
Rémi Verschelde dd2aba021c
Merge pull request #18853 from YeldhamDev/gui_cppcheck_fixes
Fixed some warnings found with Cppcheck
2018-05-14 07:39:54 +02:00
Michael Alexsander Silva Dias 7f72d6476b Fixed some warnings found with Cppcheck. 2018-05-14 02:14:56 -03:00
Hugo Locurcio 814989e106
Add support for bilinear bars in TextureProgress
These bars will extend from the center to the left and right of
the node, or from the center to the top and bottom of the node
depending on the option selected.

The Clockwise and Counter Clockwise mode will expand the progress
bar both ways in a circular fashion.
2018-05-12 10:23:06 +02:00
toger5 d927e972d1 fixed a input not registered in osx script editor 2018-05-11 04:30:05 +02:00
Gabriel Gavilan b0069bb118 Apply viewport scale to selection update methods. Changed to propper fix sugested by reduz 2018-05-09 20:37:50 +02:00
Charly Mourglia b09e0454bb Consider TextEdit paste operation complex.
Not considering a paste operation as a complex one ends up
adding an unneeded extra step when pasting over a selection.

This fixes issue #18325
2018-05-09 14:07:06 +02:00
Deluvi 215150cfbf get_word_at_pos considers simple and double quotes
When using the get_word_at_pos function in TextEdit, the function would
return a full string only if this string is surrounded by double quotes
and not by simple quotes.

With this fix, get_word_at_pos will return the full string, whether be a
string surrounded by simple or double quotes.

Fixes #17437
2018-05-09 08:33:57 +02:00
Guilherme Silva d63cc11bee Change from "search dialog" to "search bar" on help screen 2018-05-08 12:19:32 +00:00
Rémi Verschelde 9dbfe5dc61
Merge pull request #17578 from endragor/ft-outlines
Perfect FreeType-based outlines for DynamicFonts
2018-05-08 15:37:00 +02:00
Juan Linietsky 47db64ac00
Merge pull request #15258 from RyanStein/bugfix-15241
Use exact positioning for the ItemList::get_tooltip method.
2018-05-08 10:36:22 -03:00
Ruslan Mustakov 863dd9aa46 Always emit dynamic font change in update_oversampling
Fixes #15787.

The issue occurred when two (or more) separate DynamicFont instances
used the same DynamicFontAtSize instance due to having equal
properties. The first instance updated its data_at_size and emitted
"changed" signal, but the second did not because it considered the
data_at_size to be up to date, even though it has just been updated.
2018-05-08 19:01:15 +07: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 b808798772
Merge pull request #18700 from GodotExplorer/fix-#18686
Add default paramater value for OptionButton::add_icon_item
2018-05-08 08:15:59 +02:00
Geequlim 9ee8ddcd8d Add default paramater value for OptionButton::add_icon_item 2018-05-08 13:40:52 +08:00
Rémi Verschelde 64cb61619a
Merge pull request #15928 from StateOff/feature_batch_rename
Implements "Batch Rename" editor tool.
2018-05-08 07:36:24 +02:00
Juan Linietsky 7811156c4f
Merge pull request #17451 from Goutte/feat-base-button-mask
Allow configuration of which mouse buttons the BaseButton responds to
2018-05-07 18:24:17 -03:00
Juan Linietsky 2ba8b5b27c
Merge pull request #17828 from bojidar-bg/17779-progressbar-minimum-size
Fix StyleBox ignoring region rect and ProgressBar using center size
2018-05-07 16:33:12 -03:00
Juan Linietsky dff3a2f378
Merge pull request #18003 from sherjilozair/patch_macosx_shortcuts
Add additional macos shortcuts for going to start/end of line
2018-05-07 15:59:22 -03: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
Max Hilbrunner f9733b5cee
Merge pull request #18397 from KidRigger/working_te
Support of CMD+Backspace and CMD+Delete on MacOS.
2018-05-04 11:19:09 +02:00
Unknown 4e26e5e268 Script Editor now displays positional column
This solves #17931 and makes the script editor consistent with other text editors(Sublime, Gedit, Vim) in displaying the position rather than the raw number of characters.
2018-05-03 18:03:20 +01:00
Rémi Verschelde b774156729
Merge pull request #18514 from neikeq/api-hash-fixes
API hash fixes
2018-05-03 14:36:32 +02:00
robfram c17de1f70f Fix placeholders position in LineEdit when editing inside the Editor
Editing the `Text` property through the editor causes a wrong
placement of the placeholder, as it calls `LineEdit::clear_internal`,
which was wrongly reseting the cached placeholder width.

Fix #18184.
2018-05-02 21:15:46 +02:00
Rémi Verschelde b6a7c5693f
Merge pull request #16977 from SASUPERNOVA/master
Created a new function named get_element in GridContainer. This funct…
2018-05-01 16:32:30 +02:00
Rémi Verschelde 204de5e6dc
Merge pull request #18348 from rfht/master
fix clang6 assignment error
2018-05-01 09:31:29 +02:00
Rémi Verschelde 7663d65a10
Merge pull request #18382 from groud/fix_gridcontainer_children_visibility
Fix GridContainer's children visibility breaking the layout
2018-05-01 08:47:41 +02:00
Max Hilbrunner 613a8bee41
Merge pull request #18370 from KidRigger/master
Adds support for CMD+Left and CMD+Right on MacOS
2018-04-30 19:02:20 +02:00