Fixes and minor enhancements for sub editor
- Zoom now works relative to the mouse's position rather than the center of the screen, much like Valve's Hammer Editor (or pulsegun's map editor shameless plug ;) ) - Rectangles now have line widths dependent on the camera zoom, not perfect but it's better than having lines disappear - Fixed background resizing - Fixed editor being completely broken because of no vsync, might still have a few bugs here and there - Fixed selection rectangle not rendering at all when dragging from bottom right to top left - Newline change in Item.cs
This commit is contained in:
@@ -189,7 +189,7 @@ namespace Barotrauma
|
||||
Color clr = (open == 0.0f) ? Color.Red : Color.Cyan;
|
||||
if (isHighlighted) clr = Color.Gold;
|
||||
|
||||
GUI.DrawRectangle(sb, new Rectangle(WorldRect.X, -WorldRect.Y, rect.Width, rect.Height), clr * 0.5f, true);
|
||||
GUI.DrawRectangle(sb, new Rectangle(WorldRect.X, -WorldRect.Y, rect.Width, rect.Height), clr * 0.5f, true,0, (int)Math.Max((1.5f / GameScreen.Selected.Cam.Zoom), 1.0f));
|
||||
|
||||
for (int i = 0; i < linkedTo.Count; i++)
|
||||
{
|
||||
@@ -212,7 +212,10 @@ namespace Barotrauma
|
||||
GUI.DrawRectangle(sb,
|
||||
new Vector2(WorldRect.X - 5, -WorldRect.Y - 5),
|
||||
new Vector2(rect.Width + 10, rect.Height + 10),
|
||||
Color.Red);
|
||||
Color.Red,
|
||||
false,
|
||||
0,
|
||||
(int)Math.Max((1.5f / GameScreen.Selected.Cam.Zoom), 1.0f));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user