mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-10-24 20:29:50 -04:00
[Core] Settings improvements: Grouping w/labels, support for doubles (#137)
* [Core] Settings improvements: Grouping w/labels, support for doubles
Layout improvements:
* Plugins can set `[SettingSuggestedColumnWidth(123)]` on a settings class to adjust the settings view column width to make it wider or narrower to fit things nicely.
* Plugins can set `[SettingNewGroup("label")]` on any setting property to force a "new paragraph", or group, of settings. If "label" is also provided, a grouping header with that text will also be created.
* A double precision up/down numeric control has been added. In support of this, there is now a precision value on the existing `[SettingNumericBounds]` attribute to specify the number of digits of precision the control displays/allows.
Plugins:
* The above have been applied/demonstrated on the Botanist and Explorer plugin settings.
This commit is contained in:
@@ -7,11 +7,12 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Observatory.Botanist
|
||||
{
|
||||
[SettingSuggestedColumnWidth(450)]
|
||||
class BotanistSettings
|
||||
{
|
||||
[SettingDisplayName("Enable Sampler Status Overlay")]
|
||||
public bool OverlayEnabled { get; set; }
|
||||
[SettingDisplayName("Sampler Status Overlay is sticky until sampling complete (if enabled)")]
|
||||
[SettingDisplayName("Status Overlay is sticky until sampling is complete")]
|
||||
public bool OverlayIsSticky { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user