Commit graph

114 commits

Author SHA1 Message Date
bruvzg
c65a667924
Move global_menu_* methods to a separate NativeMenu class. 2024-03-04 23:41:41 +02:00
Hugo Locurcio
3fe01226b7 Use black for font outlines by default instead of white
This makes font outlines more usable out of the box, as black
is one of the most commonly used colors for font outlines.
2024-02-28 20:25:15 +01:00
kobewi
aeec3c1309 Add methods to add submenus without using names 2024-02-22 15:13:53 +01:00
mrcdk
c9bdccf7f2 Expose PopupMenu get_item_multistate(), get_item_multistate_max() and set_item_multistate_max() 2024-01-22 20:07:19 +01:00
bruvzg
0d44b50520
[macOS] Add default Window and Help menus, allow special menu customization. 2023-12-13 23:20:05 +02:00
jsjtxietian
34c27021e0 Update add_submenu doc to mention that submenu should already exist 2023-11-02 11:02:13 +08:00
Yuri Sizov
596dd726a1 Use bound theme properties for documentation 2023-09-26 18:48:51 +02:00
kobewi
df24882f9a Free submenu children when clearing PopupMenu 2023-09-25 16:45:41 +02:00
PrecisionRender
76fad10978 Expose PopupMenu activate_item_by_event method 2023-09-15 10:27:49 -05:00
Tomasz Chabora
3dd881b4e4 Add option to allow echo events in menu shortcuts 2023-08-16 16:59:17 +02:00
Rémi Verschelde
81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde
346f1ab86b
Bump version to 4.2-dev
Keep on waitin'
2023-07-05 22:07:03 +02:00
VolTer
151a4ba6a5 Overhaul the top sections of the class reference (GUI classes) 2023-05-28 14:24:54 +02:00
Ninni Pipping
8cf98dda23 Clarify range of various ID values are 32 bit 2023-05-19 17:22:05 +02:00
the-sink
a85eef4367 Add icon_modulate functionality to PopupMenu 2023-05-08 15:25:00 -07:00
Yuri Sizov
1522762dc9 Make icons of scripted and custom classes fit the editor UI
Also:
- Add an option to limit the icon size in PopupMenu.
This is similar to how this works in Tree and TreeItem.
- Add the same option to TabBar.
- Add a theme constant for Tree, PopupMenu, Button, and
TabBar to apply this limit on the control level.

Co-authored-by: Daylily-Zeleen <daylily-zeleen@foxmail.com>
2023-03-31 21:39:02 +02:00
Haoyu Qiu
03fcac3aa5 Fix various typos in the classref 2023-03-09 14:56:23 +08:00
Rémi Verschelde
1c1524a651
Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
Hugo Locurcio
c3365ace4f
Improve documentation on PopupMenu and DisplayServer accelerators
The name "accelerator" is actually misleading (at least in PopupMenu),
as these are really keyboard shortcuts and not a key you press after
pressing Alt (with the corresponding letter in the option's name
being underlined after pressing Alt).
2023-02-16 20:26:07 +01:00
Hugo Locurcio
fcf54cabba
Document MDSF font outlines may require msdf_pixel_range adjustments 2022-12-19 17:17:45 +01:00
Haoyu Qiu
80ccd46dcd Use capitalized ID in the doc 2022-12-08 09:40:49 +08:00
kobewi
a23f6d0aa6 Fill random docs 2022-11-22 17:59:45 +01:00
Rémi Verschelde
f7c611ab71
Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
Ev1lbl0w
b8aa5ebfeb
Document PopupMenu id behavior 2022-10-19 11:46:28 +01:00
Michael Alexsander
9507e91c07 Rename PopupMenu's set/get_current_index() to set/get_focused_item() 2022-09-06 10:51:14 -03:00
Michael Alexsander
221344b9e2 Fix some corner cases in the Menu/OptionButton item auto-highlight 2022-08-28 01:15:03 -03:00
bruvzg
8c56a7416b
Implement MenuBar control to wrap PopupMenus or native menu, use native menu for editor. 2022-08-18 22:25:44 +03:00
Andy Maloney
1df86ecea5 [doc] Use "param" instead of "code" to refer to parameters (4) 2022-08-11 13:52:19 -04:00
kobewi
e06cd2742f Add missing properties to default theme 2022-08-11 14:15:04 +02:00
Yuri Sizov
c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
bruvzg
344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
Hugo Locurcio
466bd7ce39
Document incremental search support in ItemList, PopupMenu and Tree 2022-06-17 12:54:09 +02:00
FireForge
f85eb4164a Expose PopupMenu set/get_item_horizontal_offset()
- Renames setter from set_item_h_offset()
- Adds getter
2022-06-15 02:08:44 -05: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
Michael Alexsander
bab2f3c021 Add font_separator and related properties to PopupMenu 2022-04-13 23:46:35 -03:00
Michael Alexsander
59c3d4e17f Fix and tweak labeled separator in PopupMenu 2022-04-13 17:13:29 -03:00
kobewi
42078dec9f Allow negative indexes in ItemList and PopupMenu 2022-03-12 01:14:03 +01:00
Hugo Locurcio
b68dd2e189
Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
Markus Sauermann
ba565bec1b Update Popup and PopupMenu descriptions 2022-02-09 18:59:41 +01:00
Michael Alexsander
21bf23d966 Enhancements and fixes for OptionButton and PopupMenu 2022-02-06 16:03:18 -03:00
Michael Alexsander
73c225838f Make popup menus focus items automatically when not using the mouse 2022-01-25 13:51:56 -03:00
Hugo Locurcio
84a69d7429 Improve the default project theme
The new default project theme uses StyleBoxFlat extensively for
a more modern design and better scalability to multiple resolutions.

SVG icons are now used in place of PNG icons. While this does not
allow for true vector-based icon drawing (icons are still rasterized
at load-time), this makes the design work easier for contributors
and opens the door to vector drawing in the future (e.g. with polygons
or SDFs).

Like for editor icons, the SVG header file is now built automatically
when a SVG file is changed. This removing the need for running
`make_header.py` manually (TODO).

The "Use Hidpi" project setting has been removed in favor of a
"Default Theme Scale" project setting, which allows creating the
default theme at a higher/lower scale than the default.
This can be used when designing GUIs with a high base resolution
to ensure crisp visuals.

Co-authored-by: Yuri Sizov <yuris@humnom.net>
2022-01-19 18:46:01 +03: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
Yuri Sizov
397e56964d Sort and group theme properties in docs, improve formatting for theme and enums 2021-12-01 21:02:20 +03:00
Aaron Franke
3c0fdcc8ac
Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
rafallus
4554892223 Implement inspector property array for PopupMenu and MenuButton 2021-11-03 09:32:29 -06:00
Aaron Franke
d54f2ad7ca
Don't generate empty doc sections and reduce code duplication 2021-09-20 20:59:33 -05:00
Yuri Sizov
bf2839ea3e Add theme item descriptions to the online documentation 2021-08-04 22:27:10 +03:00
Rémi Verschelde
7adf4cc9b5
doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00