summaryrefslogtreecommitdiff
path: root/scene/gui/code_edit.cpp
AgeCommit message (Collapse)Author
2022-08-29Rename `CanvasItem.update()` to `queue_redraw()`Micky
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde
NOTIFICATION_THEME_CHANGED" This reverts commit 4b817a565cab8af648c88cfc7ab6481e86ee3625. Fixes #64988. Fixes #64997. This caused several regressions (#64988, #64997, https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605) which point at a flaw in the current logic: - `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with `NOTIFCATION_THEME_CHANGED` as introduced in #62845. - Some classes use their `THEME_CHANGED` to cache theme items in member variables (e.g. `style_normal`, etc.), and use those member variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE` notification is now deferred, they end up accessing invalid state and this can lead to not applying theme properly (e.g. for EditorHelp) or crashing (e.g. for EditorLog or CodeEdit). So we need to go back to the drawing board and see if `THEME_CHANGED` can be called earlier so that the previous logic still works? Or can we refactor all engine code to make sure that: - `ENTER_TREE` and similar do not depend on theme properties cached in member variables. - Or `THEME_CHANGE` does trigger a general UI update to make sure that any bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE` does arrive for the first time. But that means having a temporary invalid (and possibly still crashing) state, and doing some computations twice which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-27Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record
2022-08-22Replace Array return types with TypedArraykobewi
2022-07-21Rename OSX to macOS and iPhoneOS to iOS.bruvzg
2022-07-06Refactor Font configuration and import UI, and Font resources.bruvzg
2022-07-03Add the ability to drag the code completion scrollbar using the mouse clickMinusKube
2022-05-19Use range iterators for RBSet in most casesAaron Record
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-13Add ALT NUM+ {hex code} character input support for LineEdit, TextEdit and ↵bruvzg
CodeEdit.
2022-05-12Add a new HashMap implementationreduz
Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
2022-05-03Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio
These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
2022-04-28fix lines ending in comments causing auto indentNathan Franke
2022-04-23Rename theme properties to include underscoresFireForge
- check_vadjust -> check_v_adjust - close_h_ofs -> close_h_offset - close_v_ofs -> close_v_offset - commentfocus -> comment_focus - hseparation -> h_separation - ofs -> offset - selectedframe -> selected_frame - state_machine_selectedframe -> state_machine_selected_frame - table_hseparation -> table_h_separation - table_vseparation -> table_v_separation - vseparation -> v_separation
2022-03-28Fix inspector group name capitalizationFireForge
2022-03-27Add GDExtension support to Scriptreduz
* Ability to create script languages from GDExtension * Some additions to gdnative_extension.h to make this happen * Moved the GDExtension binder to core This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x. Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-02-12Add sub-pixel glyph positioning support.bruvzg
2022-02-04Cleanup and move char functions to the `char_utils.h` header.bruvzg
2022-02-04String: Add contains().Anilforextra
2022-01-30With auto_brace_complete enabled, selected text now gets wrapped by bracesIgor Kordiukiewicz
2022-01-27Merge pull request #57281 from Rubonnek/rename-subsequenceRémi Verschelde
2022-01-26Rename String::is_subsequence_ofi to String::is_subsequence_ofnWilson E. Alvarez
2022-01-23Fix selection being deleted and indentation not being accounted forPreslavb
2022-01-22Rename request_code_completion signalkobewi
2022-01-19Convert TextEdit callbacks to CallablePaulb23
2022-01-14Fix CodeEdit guidelines position.bruvzg
2022-01-06Merge pull request #55851 from Chaosus/better-completion-options-list_rebasedRémi Verschelde
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2022-01-02Fix various typosluz paz
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn` Update editor/import/resource_importer_layered_texture.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update doc/classes/TileSetScenesCollectionSource.xml Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/graph_edit.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/rich_text_label.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Revert previously committed change
2021-12-12Fix highlight for completion options match (rebased)Yuri Roubinsky
Co-authored-by: Gustav Andersson <gvekan@users.noreply.github.com>
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-09align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke
2021-11-25Merge pull request #55227 from ator-dev/fix-code-foldingRémi Verschelde
2021-11-24Fix code folding when end of block is unindented delimiterator-dev
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-11-17Fix TextEdit mouse interactions when the last line is hiddenPaulb23
2021-11-12Use "enum class" for input enumsAaron Franke
2021-10-25Ignore empty Font resources as theme override.bruvzg
Add range hint to font_size properties. Remove excessive `base_size` Font property.
2021-10-18Fix crash when executing CodeEdit._main_gutter_draw_callbackHaoyu Qiu
2021-10-06Merge pull request #53476 from Paulb23/breakpoint-move-up-fixRémi Verschelde
2021-10-06Fix breakpointed_lines out of sync when removing lines abovePaulb23
2021-10-06Fix the "END" key behaving like "PAGE_DOWN" in code completion.Eric M
Before: behaved like page down. After: goes to last item.
2021-10-01Fix deleting selection at the first line do not work with backspaceJean-Michel Bernard
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-30Improved breakpoint gutter for CodeEdit.Eric M
Added preview of breakpoint placement on hover. Added override of icon for the Editor to use an SVG so it is no longer blurry.
2021-09-24Fix incorrect offsets of tooltip content in `CodeEdit`Yuri Roubinsky
Fix incorrect offsets of tooltip content in `CodeEdit`
2021-09-23Construct values only when necessary.Anilforextra
2021-09-20Change completion prefixes to single char and unnecessary ui_cancel accept_eventPaulb23
2021-09-14Merge pull request #52583 from e8newallm/52360Rémi Verschelde
Removed updates that caused unnecessary window updates