Renamed screens (EditMapScreen -> SubEditorScreen, EditCharacterScreen -> CharacterEditorScreen)
This commit is contained in:
@@ -222,7 +222,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (Screen.Selected == GameMain.EditMapScreen) return;
|
||||
if (Screen.Selected == GameMain.SubEditorScreen) return;
|
||||
|
||||
if (character.IsUnconscious || (character.Oxygen < 80.0f && !character.IsDead))
|
||||
{
|
||||
|
||||
@@ -223,12 +223,12 @@ namespace Barotrauma
|
||||
{
|
||||
Submarine.Load(string.Join(" ", args), true);
|
||||
}
|
||||
GameMain.EditMapScreen.Select();
|
||||
GameMain.SubEditorScreen.Select();
|
||||
}));
|
||||
|
||||
commands.Add(new Command("editcharacter", "", (string[] args) =>
|
||||
{
|
||||
GameMain.EditCharacterScreen.Select();
|
||||
GameMain.CharacterEditorScreen.Select();
|
||||
}));
|
||||
|
||||
commands.Add(new Command("editparticles", "", (string[] args) =>
|
||||
@@ -280,9 +280,9 @@ namespace Barotrauma
|
||||
{
|
||||
if (args.Length < 1) return;
|
||||
|
||||
if (GameMain.EditMapScreen.CharacterMode)
|
||||
if (GameMain.SubEditorScreen.CharacterMode)
|
||||
{
|
||||
GameMain.EditMapScreen.ToggleCharacterMode();
|
||||
GameMain.SubEditorScreen.ToggleCharacterMode();
|
||||
}
|
||||
|
||||
string fileName = string.Join(" ", args);
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace Barotrauma
|
||||
public static NetLobbyScreen NetLobbyScreen;
|
||||
public static ServerListScreen ServerListScreen;
|
||||
|
||||
public static EditMapScreen EditMapScreen;
|
||||
public static EditCharacterScreen EditCharacterScreen;
|
||||
public static SubEditorScreen SubEditorScreen;
|
||||
public static CharacterEditorScreen CharacterEditorScreen;
|
||||
public static ParticleEditorScreen ParticleEditorScreen;
|
||||
|
||||
public static Lights.LightManager LightManager;
|
||||
@@ -285,8 +285,8 @@ namespace Barotrauma
|
||||
|
||||
ServerListScreen = new ServerListScreen();
|
||||
|
||||
EditMapScreen = new EditMapScreen();
|
||||
EditCharacterScreen = new EditCharacterScreen();
|
||||
SubEditorScreen = new SubEditorScreen();
|
||||
CharacterEditorScreen = new CharacterEditorScreen();
|
||||
ParticleEditorScreen = new ParticleEditorScreen();
|
||||
|
||||
yield return CoroutineStatus.Running;
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
infoBox = CreateInfoFrame("Press \"Structure\" at the left side of the screen to start placing some walls.");
|
||||
|
||||
while (GameMain.EditMapScreen.SelectedTab != (int)MapEntityCategory.Structure)
|
||||
while (GameMain.SubEditorScreen.SelectedTab != (int)MapEntityCategory.Structure)
|
||||
{
|
||||
yield return CoroutineStatus.Running;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Barotrauma.Items.Components
|
||||
0.3f);
|
||||
}
|
||||
|
||||
if (!editing || !GameMain.EditMapScreen.WiringMode) return;
|
||||
if (!editing || !GameMain.SubEditorScreen.WiringMode) return;
|
||||
|
||||
for (int i = 0; i < nodes.Count; i++)
|
||||
{
|
||||
@@ -127,7 +127,7 @@ namespace Barotrauma.Items.Components
|
||||
if (draggingWire.connections[0] != null && draggingWire.connections[0].Item.Submarine != null) sub = draggingWire.connections[0].Item.Submarine;
|
||||
if (draggingWire.connections[1] != null && draggingWire.connections[1].Item.Submarine != null) sub = draggingWire.connections[1].Item.Submarine;
|
||||
|
||||
Vector2 nodeWorldPos = GameMain.EditMapScreen.Cam.ScreenToWorld(PlayerInput.MousePosition) - sub.HiddenSubPosition - sub.Position;// Nodes[(int)selectedNodeIndex];
|
||||
Vector2 nodeWorldPos = GameMain.SubEditorScreen.Cam.ScreenToWorld(PlayerInput.MousePosition) - sub.HiddenSubPosition - sub.Position;// Nodes[(int)selectedNodeIndex];
|
||||
|
||||
nodeWorldPos.X = MathUtils.Round(nodeWorldPos.X, Submarine.GridSize.X / 2.0f);
|
||||
nodeWorldPos.Y = MathUtils.Round(nodeWorldPos.Y, Submarine.GridSize.Y / 2.0f);
|
||||
@@ -150,7 +150,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
if (selectedWire != null)
|
||||
{
|
||||
Vector2 mousePos = GameMain.EditMapScreen.Cam.ScreenToWorld(PlayerInput.MousePosition);
|
||||
Vector2 mousePos = GameMain.SubEditorScreen.Cam.ScreenToWorld(PlayerInput.MousePosition);
|
||||
if (selectedWire.item.Submarine != null) mousePos -= (selectedWire.item.Submarine.Position + selectedWire.item.Submarine.HiddenSubPosition);
|
||||
|
||||
//left click while holding ctrl -> check if the cursor is on a wire section,
|
||||
@@ -199,7 +199,7 @@ namespace Barotrauma.Items.Components
|
||||
float closestDist = 0.0f;
|
||||
foreach (Wire w in wires)
|
||||
{
|
||||
Vector2 mousePos = GameMain.EditMapScreen.Cam.ScreenToWorld(PlayerInput.MousePosition);
|
||||
Vector2 mousePos = GameMain.SubEditorScreen.Cam.ScreenToWorld(PlayerInput.MousePosition);
|
||||
if (w.item.Submarine != null) mousePos -= (w.item.Submarine.Position + w.item.Submarine.HiddenSubPosition);
|
||||
|
||||
float dist = 0.0f;
|
||||
|
||||
@@ -118,12 +118,12 @@ namespace Barotrauma
|
||||
{
|
||||
if (editingHUD == null || editingHUD.UserData as Item != this)
|
||||
{
|
||||
editingHUD = CreateEditingHUD(Screen.Selected != GameMain.EditMapScreen);
|
||||
editingHUD = CreateEditingHUD(Screen.Selected != GameMain.SubEditorScreen);
|
||||
}
|
||||
|
||||
editingHUD.Update((float)Timing.Step);
|
||||
|
||||
if (Screen.Selected != GameMain.EditMapScreen) return;
|
||||
if (Screen.Selected != GameMain.SubEditorScreen) return;
|
||||
|
||||
if (!prefab.IsLinkable) return;
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace Barotrauma
|
||||
|
||||
public override void AddToGUIUpdateList()
|
||||
{
|
||||
if (Screen.Selected is EditMapScreen)
|
||||
if (Screen.Selected is SubEditorScreen)
|
||||
{
|
||||
if (editingHUD != null) editingHUD.AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ namespace Barotrauma
|
||||
|
||||
public override void Draw(SpriteBatch spriteBatch, bool editing, bool back = true)
|
||||
{
|
||||
if (back && Screen.Selected != GameMain.EditMapScreen)
|
||||
if (back && Screen.Selected != GameMain.SubEditorScreen)
|
||||
{
|
||||
DrawDecals(spriteBatch);
|
||||
return;
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (editingHUD == null || editingHUD.UserData as Structure != this)
|
||||
{
|
||||
editingHUD = CreateEditingHUD(Screen.Selected != GameMain.EditMapScreen);
|
||||
editingHUD = CreateEditingHUD(Screen.Selected != GameMain.SubEditorScreen);
|
||||
}
|
||||
|
||||
editingHUD.Update((float)Timing.Step);
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace Barotrauma
|
||||
|
||||
msgBox.Buttons[0].OnClicked += (btn, obj) =>
|
||||
{
|
||||
GameMain.EditMapScreen.Cam.Position = e.WorldPosition;
|
||||
GameMain.SubEditorScreen.Cam.Position = e.WorldPosition;
|
||||
return true;
|
||||
};
|
||||
msgBox.Buttons[0].OnClicked += msgBox.Close;
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ using System.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
class EditCharacterScreen : Screen
|
||||
class CharacterEditorScreen : Screen
|
||||
{
|
||||
Camera cam;
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Barotrauma
|
||||
|
||||
button = new GUIButton(new Rectangle(50, y + 260, 200, 30), "Submarine Editor", null, Alignment.TopLeft, Alignment.Left, "", buttonsTab);
|
||||
button.Color = button.Color * 0.8f;
|
||||
button.OnClicked = (GUIButton btn, object userdata) => { GameMain.EditMapScreen.Select(); return true; };
|
||||
button.OnClicked = (GUIButton btn, object userdata) => { GameMain.SubEditorScreen.Select(); return true; };
|
||||
|
||||
button = new GUIButton(new Rectangle(50, y + 320, 200, 30), "Settings", null, Alignment.TopLeft, Alignment.Left, "", buttonsTab);
|
||||
button.Color = button.Color * 0.8f;
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ using System.Reflection;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
class EditMapScreen : Screen
|
||||
class SubEditorScreen : Screen
|
||||
{
|
||||
private Camera cam;
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
|
||||
public EditMapScreen()
|
||||
public SubEditorScreen()
|
||||
{
|
||||
cam = new Camera();
|
||||
//cam.Translate(new Vector2(-10.0f, 50.0f));
|
||||
Reference in New Issue
Block a user