mirror of
https://github.com/watercolor-games/the-peacenet.git
synced 2025-01-22 11:51:51 -05:00
Fix stuff.
This commit is contained in:
parent
27fe6bab76
commit
46abe3c89e
6 changed files with 16 additions and 42 deletions
|
@ -80,19 +80,19 @@ namespace Peacenet.Applications
|
|||
|
||||
var accent = Theme.GetAccentColor();
|
||||
|
||||
gfx.DrawCircle(Manager.VirtualToScreen(_clockRectangle.Center.ToVector2()), (_clockRectangle.Width / 2) * Manager.GUIScale, Theme.GetFontColor(Plex.Engine.Themes.TextFontStyle.System));
|
||||
gfx.DrawCircle(Manager.VirtualToScreen(_clockRectangle.Center.ToVector2()), ((_clockRectangle.Width / 2) - 4) * Manager.GUIScale, Theme.ControlBG);
|
||||
gfx.DrawCircle(Manager.VirtualToScreen(_clockRectangle.Center.ToVector2()), ((_clockRectangle.Width / 2)/10) * Manager.GUIScale, accent);
|
||||
gfx.DrawCircle(_clockRectangle.Center.ToVector2(), (_clockRectangle.Width / 2), Theme.GetFontColor(Plex.Engine.Themes.TextFontStyle.System));
|
||||
gfx.DrawCircle(_clockRectangle.Center.ToVector2(), ((_clockRectangle.Width / 2) - 4), Theme.ControlBG);
|
||||
gfx.DrawCircle(_clockRectangle.Center.ToVector2(), ((_clockRectangle.Width / 2)/10), accent);
|
||||
|
||||
var secondEnd = getPointOnCircle(_clockRectangle.Center.ToVector2(), (_clockRectangle.Width / 2) - 16, _secondsDegrees-90);
|
||||
var hourEnd = getPointOnCircle(_clockRectangle.Center.ToVector2(), (_clockRectangle.Width / 2) / 4, _hoursDegrees-90);
|
||||
var minuteEnd = getPointOnCircle(_clockRectangle.Center.ToVector2(), (_clockRectangle.Width / 2) - 8, _minutesDegrees-90);
|
||||
|
||||
gfx.DrawLine(Manager.VirtualToScreen(_clockRectangle.Center.ToVector2()), Manager.VirtualToScreen(secondEnd), 1, Theme.GetFontColor(Plex.Engine.Themes.TextFontStyle.System));
|
||||
gfx.DrawLine(Manager.VirtualToScreen(_clockRectangle.Center.ToVector2()), Manager.VirtualToScreen(hourEnd), 2, Theme.GetFontColor(Plex.Engine.Themes.TextFontStyle.System));
|
||||
gfx.DrawLine(Manager.VirtualToScreen(_clockRectangle.Center.ToVector2()), Manager.VirtualToScreen(minuteEnd), 2, accent);
|
||||
gfx.DrawLine(_clockRectangle.Center.ToVector2(), secondEnd, 1, Theme.GetFontColor(Plex.Engine.Themes.TextFontStyle.System));
|
||||
gfx.DrawLine(_clockRectangle.Center.ToVector2(), hourEnd, 2, Theme.GetFontColor(Plex.Engine.Themes.TextFontStyle.System));
|
||||
gfx.DrawLine(_clockRectangle.Center.ToVector2(), minuteEnd, 2, accent);
|
||||
|
||||
gfx.DrawCircle(Manager.VirtualToScreen(_clockRectangle.Center.ToVector2()), ((_clockRectangle.Width / 2) / 10) * Manager.GUIScale, accent);
|
||||
gfx.DrawCircle(_clockRectangle.Center.ToVector2(), ((_clockRectangle.Width / 2) / 10), accent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -491,17 +491,6 @@ namespace Peacenet.Applications
|
|||
_open.Text = (_isSaving) ? "Save" : "Open";
|
||||
_openField.Label = "File name or file path";
|
||||
|
||||
<<<<<<< HEAD
|
||||
float _larger = Math.Max(_open.Height, _openField.Height);
|
||||
float _starty = (Height - _larger) - 12;
|
||||
_open.Y = _starty + ((_larger - _open.Height) / 2)+6;
|
||||
_openField.Y = _starty + ((_larger - _openField.Height) / 2)+6;
|
||||
|
||||
_open.X = (Width - _open.Width) - 6;
|
||||
_openField.X = 6;
|
||||
_openField.Width = (_open.X - _openField.X) - 12;
|
||||
_places.Height = (Height - _places.Y) - (_larger+6);
|
||||
=======
|
||||
int _larger = Math.Max(_open.Height, _openField.Height);
|
||||
int _starty = (Height - _larger) - 6;
|
||||
_open.Y = _starty + ((_larger - _open.Height) / 2)+3;
|
||||
|
@ -511,7 +500,6 @@ namespace Peacenet.Applications
|
|||
_openField.X = 3;
|
||||
_openField.Width = (_open.X - _openField.X) - 6;
|
||||
_places.Height = (Height - _places.Y) - (_larger+3);
|
||||
>>>>>>> parent of b43c1ab... 4k support on its way
|
||||
_open.Enabled = !string.IsNullOrWhiteSpace(_openField.Text);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -626,19 +626,19 @@ namespace Peacenet.Applications
|
|||
}
|
||||
|
||||
|
||||
gfx.DrawRectangle(new Vector2(_charX * _charWidth, _charY * _charHeight) * Manager.GUIScale, new Vector2(_charWidth, _charHeight) * Manager.GUIScale, _background);
|
||||
gfx.DrawRectangle(new Vector2(_charX * _charWidth, _charY * _charHeight), new Vector2(_charWidth, _charHeight), _background);
|
||||
|
||||
continue;
|
||||
case '\n':
|
||||
gfx.DrawRectangle(new Vector2((_charX+1) * _charWidth, _charY * _charHeight) * Manager.GUIScale, new Vector2(Width - ((_charX+1)*_charWidth), _charHeight) * Manager.GUIScale, _background);
|
||||
gfx.DrawRectangle(new Vector2((_charX+1) * _charWidth, _charY * _charHeight), new Vector2(Width - ((_charX+1)*_charWidth), _charHeight), _background);
|
||||
_charX = 0;
|
||||
_charY += 1;
|
||||
break;
|
||||
case (char)0x02:
|
||||
continue;
|
||||
default:
|
||||
gfx.DrawRectangle(new Vector2(_charX * _charWidth, _charY * _charHeight) * Manager.GUIScale, new Vector2(_charWidth, _charHeight) * Manager.GUIScale, _background);
|
||||
gfx.Batch.DrawString(_font, c.ToString(), new Vector2(((_charX * (_charWidth*Manager.GUIScale)) + gfx.X) + gfx.RenderOffsetX, ((_charY * (_charHeight*Manager.GUIScale)) + gfx.Y) + gfx.RenderOffsetY), _foreground, 0, Vector2.Zero, Manager.GUIScale, SpriteEffects.None, 0);
|
||||
gfx.DrawRectangle(new Vector2(_charX * _charWidth, _charY * _charHeight), new Vector2(_charWidth, _charHeight), _background);
|
||||
gfx.Batch.DrawString(_font, c.ToString(), new Vector2(((_charX * (_charWidth)) + gfx.X) + gfx.RenderOffsetX, ((_charY * (_charHeight)) + gfx.Y) + gfx.RenderOffsetY), _foreground, 0, Vector2.Zero, 1, SpriteEffects.None, 0);
|
||||
if ((_charX + 1) * _charWidth >= Width)
|
||||
{
|
||||
_charX = 0;
|
||||
|
@ -652,7 +652,7 @@ namespace Peacenet.Applications
|
|||
}
|
||||
}
|
||||
if(IsFocused && _cursorOn)
|
||||
gfx.DrawRectangle(new Vector2(_charX * _charWidth, _charY * _charHeight) * Manager.GUIScale, new Vector2(_charWidth, _charHeight) * Manager.GUIScale, _foreground);
|
||||
gfx.DrawRectangle(new Vector2(_charX * _charWidth, _charY * _charHeight), new Vector2(_charWidth, _charHeight), _foreground);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
|
|
@ -466,11 +466,7 @@ namespace Peacenet.DesktopUI
|
|||
_name.Alignment = TextAlignment.Center;
|
||||
_name.FontStyle = Plex.Engine.Themes.TextFontStyle.Highlight;
|
||||
|
||||
<<<<<<< HEAD
|
||||
float totalHeight = _icon.Height + 10 + _name.Height;
|
||||
=======
|
||||
int totalHeight = _icon.Height + 5 + _name.Height;
|
||||
>>>>>>> parent of b43c1ab... 4k support on its way
|
||||
|
||||
Height = totalHeight + 32;
|
||||
|
||||
|
@ -596,15 +592,9 @@ namespace Peacenet.DesktopUI
|
|||
_name.AutoSize = true;
|
||||
_description.AutoSize = true;
|
||||
|
||||
<<<<<<< HEAD
|
||||
float widthWithPadding = Width - 16;
|
||||
|
||||
float textWidth = (widthWithPadding - _icon.Width) - 6;
|
||||
=======
|
||||
int widthWithPadding = Width - 8;
|
||||
|
||||
int textWidth = (widthWithPadding - _icon.Width) - 3;
|
||||
>>>>>>> parent of b43c1ab... 4k support on its way
|
||||
|
||||
_name.MaxWidth = textWidth;
|
||||
_description.MaxWidth = textWidth;
|
||||
|
@ -612,11 +602,7 @@ namespace Peacenet.DesktopUI
|
|||
_name.X = _icon.X + _icon.Width + 6;
|
||||
_description.X = _name.X;
|
||||
|
||||
<<<<<<< HEAD
|
||||
float textHeight = _name.Height + 6 + _description.Height;
|
||||
=======
|
||||
int textHeight = _name.Height + 3 + _description.Height;
|
||||
>>>>>>> parent of b43c1ab... 4k support on its way
|
||||
|
||||
if(Math.Max(textHeight, _icon.Height) == textHeight)
|
||||
{
|
||||
|
|
|
@ -690,11 +690,11 @@ namespace Peacenet
|
|||
{
|
||||
if(_topPanel.Visible)
|
||||
{
|
||||
_pn.PanelTheme.DrawPanel(gfx, _topPanel.RenderBounds);
|
||||
_pn.PanelTheme.DrawPanel(gfx, _topPanel.Bounds);
|
||||
}
|
||||
if (_bottomPanel.Visible)
|
||||
{
|
||||
_pn.PanelTheme.DrawPanel(gfx, _bottomPanel.RenderBounds);
|
||||
_pn.PanelTheme.DrawPanel(gfx, _bottomPanel.Bounds);
|
||||
}
|
||||
if(_applauncherHitbox.Visible)
|
||||
{
|
||||
|
@ -709,7 +709,7 @@ namespace Peacenet
|
|||
string rtime = DateTime.Now.ToShortTimeString();
|
||||
var measure = _pn.PanelTheme.StatusTextFont.MeasureString(rtime);
|
||||
|
||||
gfx.DrawString(rtime, new Vector2(_topPanel.RenderBounds.Width - ((measure.X + 5)*Manager.GUIScale), _topPanel.RenderBounds.Y + (((_topPanel.RenderBounds.Height - (measure.Y*Manager.GUIScale)) / 2))), (_hbTime.ContainsMouse) ? _pn.PanelTheme.StatusTextHoverColor :
|
||||
gfx.DrawString(rtime, new Vector2(_topPanel.Bounds.Width - ((measure.X + 5)), _topPanel.Y + (((_topPanel.Height - (measure.Y)) / 2))), (_hbTime.ContainsMouse) ? _pn.PanelTheme.StatusTextHoverColor :
|
||||
_pn.PanelTheme.StatusTextColor, _pn.PanelTheme.StatusTextFont, TextAlignment.Left, int.MaxValue, WrapMode.None);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 33b38b03e305239cdcec3b1dcfafb82da3501cd7
|
||||
Subproject commit cc2ac5a1a464f7ba5a740a4923ef1971bb160aa9
|
Loading…
Reference in a new issue