condense switch statement
This commit is contained in:
@@ -239,19 +239,12 @@ namespace FlaxEngine.GUI
|
|||||||
// Padding for text
|
// Padding for text
|
||||||
var textRect = GetClientArea();
|
var textRect = GetClientArea();
|
||||||
|
|
||||||
float textX = 0;
|
float textX = Editor.Instance.Options.Options.Interface.TooltipTextAlignment switch
|
||||||
switch (Editor.Instance.Options.Options.Interface.TooltipTextAlignment)
|
|
||||||
{
|
{
|
||||||
case TextAlignment.Near:
|
TextAlignment.Near => 15,
|
||||||
textX = 15;
|
TextAlignment.Center => 5,
|
||||||
break;
|
TextAlignment.Far => -5,
|
||||||
case TextAlignment.Center:
|
};
|
||||||
textX = 5;
|
|
||||||
break;
|
|
||||||
case TextAlignment.Far:
|
|
||||||
textX = -5;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
textRect.X += textX;
|
textRect.X += textX;
|
||||||
textRect.Width -= 10;
|
textRect.Width -= 10;
|
||||||
|
|||||||
Reference in New Issue
Block a user