Hendrik Brucker
b396fd4eef
Improve compilation speed (forward declarations/includes cleanup)
2022-02-12 02:46:22 +01:00
Rémi Verschelde
196801fc64
Merge pull request #57837 from YeldhamDev/that_was_pointless
2022-02-09 09:38:39 +01:00
Michael Alexsander
ef81dc1831
Remove code to update the layout direction of submenus from `PopupMenu`
2022-02-09 01:36:20 -03:00
Markus Sauermann
35806c1511
Adjust id creation in PopupMenu to avoid duplicate ids
2022-02-09 01:17:55 +01:00
Rémi Verschelde
b6ddf4a629
Merge pull request #57692 from YeldhamDev/popping_options
2022-02-08 14:04:28 +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
Rémi Verschelde
b024602660
Merge pull request #57725 from jmb462/missing-sname-theme-setters
2022-02-07 11:46:25 +01:00
Michael Alexsander
8bde86da10
Make popups from `MenuButton`, `OptionButton`, and submenus obey the layout direction
2022-02-06 23:07:08 -03:00
jmb462
a988fad9a0
Add missing SNAME macro optimization to all theme methods call
2022-02-06 23:06:11 +01:00
Michael Alexsander
989caab0ad
Better handle icons and checkboxes with separators in `PopupMenu`
2022-02-06 16:05:45 -03:00
Michael Alexsander
21bf23d966
Enhancements and fixes for `OptionButton` and `PopupMenu`
2022-02-06 16:03:18 -03:00
Rémi Verschelde
5e39a8eded
Merge pull request #56992 from YeldhamDev/smarter_popmenu_focus
2022-02-03 17:15:06 +01:00
eikobear
3b146c5eaa
Make various improvements to OptionButton
...
- Allow OptionButton selection to be set to -1 to signify no selection, both via API and in the editor.
- Reset OptionButton selection to -1 when the selected item has been removed.
- Fully convert PopupMenu to a zero-based ID system, which improves an inconsistency in generated IDs when making new items in the editor.
2022-01-28 17:03:45 -05:00
Michael Alexsander
73c225838f
Make popup menus focus items automatically when not using the mouse
2022-01-25 13:51:56 -03:00
bruvzg
5a97184931
[Windows] Fix pop-up dialogs instantly closing.
2022-01-20 16:51:35 +02:00
Ricardo Buring
4562106cbf
OptionButton::pressed(): give focus to selected
2022-01-15 22:52:12 +01:00
Rémi Verschelde
cb7daddbeb
Merge pull request #54647 from rafallus/fix/popupmenu_ids
...
Fix `PopupMenu` items id range in inspector
2022-01-08 11:39:09 +01:00
rafallus
38d578e24e
Fix `PopupMenu` items id range in inspector
2022-01-07 19:58:09 -06: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
Rémi Verschelde
1032c2c434
Merge pull request #55487 from YeldhamDev/scroll_bikeshedding
2022-01-03 14:10:41 +01:00
Rémi Verschelde
bdf8340e59
Merge pull request #43181 from nathanfranke/string-empty
...
Replace String comparisons with "", String() to is_empty()
2021-12-10 08:56:31 +01:00
FelipeMatoba
29178d3564
Increased time delay on selection when opening a popup
2021-12-09 16:44:56 -03:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
...
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
kobewi
347e50f73b
Improve PopupMenu doc about id and index
2021-12-08 13:02:42 +01:00
Aaron Franke
6eb7179f1c
Rename "items_count" property to "item_count"
2021-12-06 22:02:27 -06:00
jmb462
81efebb3a1
Fix bad popups offset in editor with single window off
...
Co-authored-by: Gil Arasa Verge <gilarasaverge@gmail.com>
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2021-12-06 14:29:48 +01:00
Michael Alexsander
ec4f4c6cda
Rename all methods that return `ScrollBar` nodes to `get_*_scroll_bar()`
2021-11-30 13:46:36 -03:00
Lightning_A
e078f970db
Rename `remove()` to `remove_at()` when removing by index
2021-11-23 18:58:57 -07:00
Aaron Franke
3c0fdcc8ac
Use "enum class" for input enums
2021-11-12 15:37:54 -06:00
Rémi Verschelde
3abb5a9035
Add missing argument names for bindings in GDExtension
2021-11-04 15:27:23 +01:00
rafallus
4554892223
Implement inspector property array for `PopupMenu` and `MenuButton`
2021-11-03 09:32:29 -06:00
Juan Linietsky
72bf79186e
Merge pull request #30391 from KoBeWi/hiding_children
...
Add support for internal nodes
2021-08-29 19:36:30 -03:00
Michael Alexsander
565ba91d28
Merge pull request #51906 from requizm/fix/49077
...
Fix tooltips don't appear for PopupMenus
2021-08-28 15:43:02 +00:00
kobewi
a913ae8d56
Add support for internal nodes
2021-08-28 02:07:23 +02:00
reduz
5cecdfa8af
Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
...
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.
Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
requizm
6f3d8fa228
Fix tooltip message working incorrectly in PopupMenu
...
fix
2021-08-20 23:06:00 +03:00
ThreeRhinosInAnElephantCostume
0aa13ecd30
fixed popup_menu buttons getting triggered by lmb press instead of release.
2021-08-19 15:56:33 +02:00
Aaron Franke
fa3a32a2d6
Use Key enum instead of plain integers
2021-08-10 16:26:55 -05:00
Rémi Verschelde
de2c2be19b
Shortcut: Rename `shortcut` property to `event`
...
Having a property which has the same name as its class leads to confusing
situations (e.g. `BaseButton` has a `shortcut` property of type `Shortcut`
which has a `shortcut` property of type `InputEvent`).
Also renames `is_event` to `matches_event`, and `is_valid` to `has_valid_event`
to better reflect what the methods check.
2021-08-05 13:48:43 +02:00
Michael Alexsander
94a64d557e
Add `auto_translate` toggle for automatic translation
2021-07-29 18:30:34 -03:00
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators
2021-07-25 12:22:25 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations
2021-07-23 17:38:28 -04:00
jfons
944b5ee639
Fix popup submenu in single-window mode
...
The internal processing code only works for OS windows, since it takes
the mouse position relative to the window and not the viewport. Now we
make sure it's not called in single-window mode.
2021-07-23 19:45:30 +02:00
reduz
6631f66c2a
Optimize StringName usage
...
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.
This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
Lightning_A
97fecd1b69
Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods
2021-05-07 14:00:50 -06:00
Rafał Mikrut
504bc5cc67
Fix crashes in *_input functions
2021-04-05 08:52:21 +02:00
Aaron Franke
10d7fccb54
Rename ButtonList enum and members to MouseButton
2021-03-23 07:13:23 -04:00
Michael Alexsander
1bece0da7c
Fix wrong width with PopupMenus on first opening in the editor
2021-03-20 00:37:09 -03:00
Anshul7sp1
91181c2086
Fixes small typos and grammar correction
2021-03-12 19:05:16 +05:30
Michael Alexsander
96fa719026
Fix various small issues with PopupMenu
2021-02-16 01:12:08 -03:00