Commit Graph

133 Commits

Author SHA1 Message Date
Aaron Record 900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
reduz 746dddc067 Replace most uses of Map by HashMap
* 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-16 10:37:48 +02:00
Vitika9 aef3b5681d Changed signals of ItemList 2022-05-06 13:09:04 +05:30
Rémi Verschelde c273ddc3ee Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
kobewi 142d0e7d75 Change Place Random Tiles to an icon 2022-05-01 22:13:30 +02:00
Rémi Verschelde 8dfa12cae7
Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
FireForge 3073b85de9 Rename theme properties to include underscores
- 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-04-23 11:16:18 -05:00
bruvzg de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
bruvzg f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
Rémi Verschelde f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Michael Alexsander deb1342036 Make `TabBar/Container` default their alignments to the left instead of center 2022-03-17 18:12:23 -03:00
kobewi 42078dec9f Allow negative indexes in ItemList and PopupMenu 2022-03-12 01:14:03 +01:00
Igor Kordiukiewicz ed0da06958 Added property hint to id property in tile set atlas source editor 2022-03-02 20:33:03 +01:00
bruvzg 74ff5921d6 Improve popup window handling.
Add window FLAG_POPUP and a platform specific routines to control popup auto-hiding and event forwarding.
2022-02-25 09:33:27 +02:00
kobewi b727b81468 Fix source picking with sort 2022-02-24 01:20:21 +01:00
Rémi Verschelde 009254d87c
Merge pull request #58187 from jakobbouchard/notification-switch-chunk-c
Convert _notification methods to switch - Chunk C
2022-02-16 20:58:55 +01:00
Jakob Bouchard 6553f5c242
Convert _notification methods to switch - Chunk C 2022-02-16 13:03:05 -05:00
kobewi 547786650f Automatically select source of the picked tile 2022-02-16 00:39:00 +01:00
Rémi Verschelde 11572c6e30
Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
Rémi Verschelde 6d708dfd6a
Merge pull request #57329 from Ev01/tileset-editor-minimum-zoom 2022-02-15 14:20:22 +01:00
trollodel 05b56f316d Remove most EditorNode constructor parameters and fields 2022-02-14 14:16:24 +01:00
Hendrik Brucker b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Rémi Verschelde fc076ece3d
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a0.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
2022-02-08 10:17:25 +01:00
jmb462 a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
jmb462 1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
Rémi Verschelde 3db1d689ce
Merge pull request #57631 from groud/terrain_fix_with_empty_cells 2022-02-04 19:03:44 +01:00
Gilles Roudière 64e53cdc55 Fixes terrain painting on TileMaps when using empty terrain bits 2022-02-04 18:10:12 +01:00
bruvzg 244db37508
Cleanup and move char functions to the `char_utils.h` header. 2022-02-04 11:35:01 +02:00
Markus Sauermann 51b5b51653 Fix TileMap Display Grid fadeout 2022-02-01 18:58:27 +01:00
Ev01 c66ab56544 Set a minimum zoom of 1% and a maximum zoom of 10,000% on the tileset editor
Fixes issue #57292 where zooming out too much stops
you from being able to zoom back in
2022-01-30 13:45:14 +11:00
Rémi Verschelde e22a162003
Merge pull request #57365 from pycbouh/editor-icons-uniformity 2022-01-28 23:53:23 +01:00
Yuri Sizov 876345191f Fix theme application in various curve editors 2022-01-29 01:03:43 +03:00
Rémi Verschelde b8b33df178
TileSetAtlasSource: Make `get_tile_data` return `TileData *`
This is now possible thanks to `Variant` changes.

Also unbind some `_` prefixed methods which don't need to be exposed.
2022-01-28 14:27:12 +01:00
Igor Kordiukiewicz a6b20c1816 Fixes TileMap editor not disappearing 2022-01-27 02:49:29 +01:00
kobewi e793331cd7 Allow sorting tileset sources 2022-01-26 13:58:32 +01:00
kobewi 98692d68c3 Minor tweaks and fixes to panning 2022-01-23 13:49:53 +01:00
kobewi 74bfe88267 Add ViewPanner to 2D editor 2022-01-21 18:35:06 +01:00
Rémi Verschelde 472b5b1167
Merge pull request #56249 from PucklaMotzer09/physics_layer_tooltip 2022-01-14 21:04:28 +01:00
luz paz 858bcd5058 Fix various typos
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,inh,inout,leapyear,lod,nd,numer,ois,ony,paket,ro,seeked,sinc,switchs,te,uint,varn,vew`
2022-01-13 23:20:01 -05:00
PucklaMotzer09 56b47b673e Add tooltips to all tile data editor properties 2022-01-13 16:04:54 +01:00
Rémi Verschelde 52c41e6cc0
Merge pull request #56253 from PucklaMotzer09/tile_editor_select 2022-01-13 11:45:15 +01:00
kobewi ba7ed05792 Unify panning in sub-editors and make it configurable 2022-01-11 13:57:19 +01:00
kobewi 562fc4cc0d Rename TextureRect.expand to ignore_texture_size 2022-01-07 20:21:17 +01:00
Rémi Verschelde 6994602e4f
Merge pull request #56429 from PucklaMotzer09/tile_set_editor_hide 2022-01-04 10:22:47 +01:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
PucklaMotzer09 65881a9734 Correctly show and hide tile set editor panel 2022-01-02 15:22:51 +01:00
PucklaMotzer09 d45cab99ec Correctly deselect properties of TileDataCollisionEditor 2021-12-26 16:26:58 +01:00
Rémi Verschelde 4129c1d140
Merge pull request #55299 from nathanfranke/renames 2021-12-09 10:22:24 +01:00
Nathan Franke 41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
kobewi 3f4728fe54 Fix some containers disabling wrong scrollbars 2021-12-09 00:25:17 +01:00