From 3b146c5eaa06d9f6827c651802b9fb2a9a1e013d Mon Sep 17 00:00:00 2001 From: eikobear Date: Fri, 28 Jan 2022 17:03:45 -0500 Subject: 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. --- doc/classes/OptionButton.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 7bb67be4c4..02226df46b 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -84,7 +84,7 @@ - Returns the ID of the selected item, or [code]0[/code] if no item is selected. + Returns the ID of the selected item, or [code]-1[/code] if no item is selected. @@ -112,6 +112,7 @@ Selects an item by index and makes it the current item. This will work even if the item is disabled. + Passing [code]-1[/code] as the index deselects any currently selected item. -- cgit v1.2.3