Refactor Context Menus and make them use XAML & stylesheets (#4768)
* XAML verb menu * fix ghost FOV * spacing * rename missed "ContextMenu"->"EntityMenu" instances * move visibility checks to verb system * update comment * Remove CanSeeContainerCheck * use ScrollContainer measure option * MaxWidth / texxt line wrapping * verb category default Now when you click on a verb category, it should default to running the first member of that category. This makes it much more convenient to eject/insert when there is only a single option * only apply style to first verb category entry * Use new visibility flags * FoV -> Fov * Revert "only apply style to first verb category entry" This reverts commit 9a6a17dba600e3ae0421caed59fcab145c260c99. * make all entity menu visibility checks clientside * Fix empty unbuckle category * fix merge
This commit is contained in:
@@ -25,6 +25,8 @@ namespace Content.Client.Stylesheets
|
||||
|
||||
public const string ButtonCaution = "Caution";
|
||||
|
||||
public const int DefaultGrabberSize = 10;
|
||||
|
||||
public abstract Stylesheet Stylesheet { get; }
|
||||
|
||||
protected StyleRule[] BaseRules { get; }
|
||||
@@ -96,31 +98,31 @@ namespace Content.Client.Stylesheets
|
||||
|
||||
var vScrollBarGrabberNormal = new StyleBoxFlat
|
||||
{
|
||||
BackgroundColor = Color.Gray.WithAlpha(0.35f), ContentMarginLeftOverride = 10,
|
||||
ContentMarginTopOverride = 10
|
||||
BackgroundColor = Color.Gray.WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
|
||||
ContentMarginTopOverride = DefaultGrabberSize
|
||||
};
|
||||
var vScrollBarGrabberHover = new StyleBoxFlat
|
||||
{
|
||||
BackgroundColor = new Color(140, 140, 140).WithAlpha(0.35f), ContentMarginLeftOverride = 10,
|
||||
ContentMarginTopOverride = 10
|
||||
BackgroundColor = new Color(140, 140, 140).WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
|
||||
ContentMarginTopOverride = DefaultGrabberSize
|
||||
};
|
||||
var vScrollBarGrabberGrabbed = new StyleBoxFlat
|
||||
{
|
||||
BackgroundColor = new Color(160, 160, 160).WithAlpha(0.35f), ContentMarginLeftOverride = 10,
|
||||
ContentMarginTopOverride = 10
|
||||
BackgroundColor = new Color(160, 160, 160).WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
|
||||
ContentMarginTopOverride = DefaultGrabberSize
|
||||
};
|
||||
|
||||
var hScrollBarGrabberNormal = new StyleBoxFlat
|
||||
{
|
||||
BackgroundColor = Color.Gray.WithAlpha(0.35f), ContentMarginTopOverride = 10
|
||||
BackgroundColor = Color.Gray.WithAlpha(0.35f), ContentMarginTopOverride = DefaultGrabberSize
|
||||
};
|
||||
var hScrollBarGrabberHover = new StyleBoxFlat
|
||||
{
|
||||
BackgroundColor = new Color(140, 140, 140).WithAlpha(0.35f), ContentMarginTopOverride = 10
|
||||
BackgroundColor = new Color(140, 140, 140).WithAlpha(0.35f), ContentMarginTopOverride = DefaultGrabberSize
|
||||
};
|
||||
var hScrollBarGrabberGrabbed = new StyleBoxFlat
|
||||
{
|
||||
BackgroundColor = new Color(160, 160, 160).WithAlpha(0.35f), ContentMarginTopOverride = 10
|
||||
BackgroundColor = new Color(160, 160, 160).WithAlpha(0.35f), ContentMarginTopOverride = DefaultGrabberSize
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user