Show held item next to cursor (option). (#4658)
* Show held item next to cursor (option). * UI scale Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
committed by
GitHub
parent
7b7562f75b
commit
3d19a991d8
@@ -19,6 +19,7 @@
|
||||
<Control MinSize="4 0" />
|
||||
<OptionButton Name="HudThemeOption" />
|
||||
</BoxContainer>
|
||||
<CheckBox Name="ShowHeldItemCheckBox" Text="{Loc 'ui-options-show-held-item'}" />
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<CheckBox Name="ViewportStretchCheckBox" Text="{Loc 'ui-options-vp-stretch'}" />
|
||||
<BoxContainer Name="ViewportScaleBox" Orientation="Horizontal">
|
||||
|
||||
@@ -73,6 +73,7 @@ namespace Content.Client.EscapeMenu.UI.Tabs
|
||||
UpdateViewportScale();
|
||||
};
|
||||
|
||||
ShowHeldItemCheckBox.OnToggled += OnCheckBoxToggled;
|
||||
IntegerScalingCheckBox.OnToggled += OnCheckBoxToggled;
|
||||
ViewportLowResCheckBox.OnToggled += OnCheckBoxToggled;
|
||||
ApplyButton.OnPressed += OnApplyButtonPressed;
|
||||
@@ -85,6 +86,7 @@ namespace Content.Client.EscapeMenu.UI.Tabs
|
||||
ViewportStretchCheckBox.Pressed = _cfg.GetCVar(CCVars.ViewportStretch);
|
||||
IntegerScalingCheckBox.Pressed = _cfg.GetCVar(CCVars.ViewportSnapToleranceMargin) != 0;
|
||||
ViewportLowResCheckBox.Pressed = !_cfg.GetCVar(CCVars.ViewportScaleRender);
|
||||
ShowHeldItemCheckBox.Pressed = _cfg.GetCVar(CCVars.HudHeldItemShow);
|
||||
|
||||
UpdateViewportScale();
|
||||
UpdateApplyButton();
|
||||
@@ -119,6 +121,7 @@ namespace Content.Client.EscapeMenu.UI.Tabs
|
||||
_cfg.SetCVar(CCVars.ViewportSnapToleranceMargin,
|
||||
IntegerScalingCheckBox.Pressed ? CCVars.ViewportSnapToleranceMargin.DefaultValue : 0);
|
||||
_cfg.SetCVar(CCVars.ViewportScaleRender, !ViewportLowResCheckBox.Pressed);
|
||||
_cfg.SetCVar(CCVars.HudHeldItemShow, ShowHeldItemCheckBox.Pressed);
|
||||
_cfg.SaveToFile();
|
||||
UpdateApplyButton();
|
||||
}
|
||||
@@ -145,6 +148,7 @@ namespace Content.Client.EscapeMenu.UI.Tabs
|
||||
var isVPScaleSame = (int) ViewportScaleSlider.Value == _cfg.GetCVar(CCVars.ViewportFixedScaleFactor);
|
||||
var isIntegerScalingSame = IntegerScalingCheckBox.Pressed == (_cfg.GetCVar(CCVars.ViewportSnapToleranceMargin) != 0);
|
||||
var isVPResSame = ViewportLowResCheckBox.Pressed == !_cfg.GetCVar(CCVars.ViewportScaleRender);
|
||||
var isShowHeldItemSame = ShowHeldItemCheckBox.Pressed == _cfg.GetCVar(CCVars.HudHeldItemShow);
|
||||
|
||||
ApplyButton.Disabled = isVSyncSame &&
|
||||
isFullscreenSame &&
|
||||
@@ -154,7 +158,8 @@ namespace Content.Client.EscapeMenu.UI.Tabs
|
||||
isVPScaleSame &&
|
||||
isIntegerScalingSame &&
|
||||
isVPResSame &&
|
||||
isHudThemeSame;
|
||||
isHudThemeSame &&
|
||||
isShowHeldItemSame;
|
||||
}
|
||||
|
||||
private bool ConfigIsFullscreen =>
|
||||
|
||||
Reference in New Issue
Block a user