mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
@ added some display information for actions
This commit is contained in:
parent
a9af1929cb
commit
7721b0f70b
11 changed files with 87 additions and 6 deletions
|
@ -139,6 +139,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Mouse must be inside window
|
||||
if(!mouseinside) return;
|
||||
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Places Visual Mode camera start thing.");
|
||||
|
||||
// Go for all things
|
||||
List<Thing> things = new List<Thing>(General.Map.Map.Things);
|
||||
foreach(Thing t in things)
|
||||
|
|
|
@ -754,6 +754,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
[BeginAction("gradientbrightness")]
|
||||
public void MakeGradientBrightness()
|
||||
{
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Created gradient brightness over selected sectors.");
|
||||
General.Map.UndoRedo.CreateUndo("Gradient brightness");
|
||||
|
||||
// Need at least 3 selected sectors
|
||||
// The first and last are not modified
|
||||
if(orderedselection.Count > 2)
|
||||
|
@ -774,6 +777,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Update
|
||||
UpdateOverlay();
|
||||
renderer.Present();
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
// This clears the selection
|
||||
|
|
|
@ -391,7 +391,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Make undo for the draw
|
||||
General.Map.UndoRedo.CreateUndo("Line draw");
|
||||
|
||||
|
||||
// Make an analysis and show info
|
||||
string[] adjectives = new string[]
|
||||
{ "beautiful", "lovely", "romantic", "stylish", "cheerful", "comical",
|
||||
"awesome", "accurate", "adorable", "adventurous", "attractive", "cute",
|
||||
"elegant", "glamorous", "gorgeous", "handsome", "magnificent", "unusual",
|
||||
"outstanding", "mysterious", "amusing", "charming", "fantastic", "jolly" };
|
||||
string word = adjectives[points.Count % adjectives.Length];
|
||||
string very = (points.Count > adjectives.Length) ? "very " : "";
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Created a " + very + word + " drawing.");
|
||||
|
||||
// Make the drawing
|
||||
Tools.DrawLines(points);
|
||||
|
||||
|
|
|
@ -550,9 +550,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Make undo
|
||||
if(selected.Count > 1)
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Delete " + selected.Count + " linedefs");
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Deleted " + selected.Count + " linedefs.");
|
||||
}
|
||||
else
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Delete linedef");
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Deleted a linedef.");
|
||||
}
|
||||
|
||||
// Dispose selected linedefs
|
||||
foreach(Linedef ld in selected) ld.Dispose();
|
||||
|
@ -582,9 +588,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Make undo
|
||||
if(selected.Count > 1)
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Split " + selected.Count + " linedefs");
|
||||
General.Interface.DisplayStatus("Split " + selected.Count + " linedefs.");
|
||||
}
|
||||
else
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Split linedef");
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Split a linedef.");
|
||||
}
|
||||
|
||||
// Go for all linedefs to split
|
||||
foreach(Linedef ld in selected)
|
||||
|
@ -665,9 +677,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Make undo
|
||||
if(selected.Count > 1)
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Flip " + selected.Count + " linedefs");
|
||||
General.Interface.DisplayStatus("Flipped " + selected.Count + " linedefs.");
|
||||
}
|
||||
else
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Flip linedef");
|
||||
General.Interface.DisplayStatus("Flipped a linedef.");
|
||||
}
|
||||
|
||||
// Flip all selected linedefs
|
||||
foreach(Linedef l in selected)
|
||||
|
@ -711,9 +729,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Make undo
|
||||
if(selected.Count > 1)
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Flip " + selected.Count + " sidedefs");
|
||||
General.Interface.DisplayStatus("Flipped " + selected.Count + " sidedefs.");
|
||||
}
|
||||
else
|
||||
General.Map.UndoRedo.CreateUndo("Flip sidedef");
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Flip sidedefs");
|
||||
General.Interface.DisplayStatus("Flipped sidedefs.");
|
||||
}
|
||||
|
||||
// Flip sidedefs in all selected linedefs
|
||||
foreach(Linedef l in selected)
|
||||
|
|
|
@ -735,6 +735,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Create undo
|
||||
General.Map.UndoRedo.CreateUndo("Make door (" + doortex + ")");
|
||||
General.Interface.DisplayStatus("Created a " + doortex + " door.");
|
||||
|
||||
// Go for all selected sectors
|
||||
foreach(Sector s in orderedselection)
|
||||
|
@ -828,9 +829,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Make undo
|
||||
if(selected.Count > 1)
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Delete " + selected.Count + " sectors");
|
||||
General.Interface.DisplayStatus("Deleted " + selected.Count + " sectors.");
|
||||
}
|
||||
else
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Delete sector");
|
||||
General.Interface.DisplayStatus("Deleted sector.");
|
||||
}
|
||||
|
||||
// Dispose selected sectors
|
||||
foreach(Sector s in selected)
|
||||
|
@ -886,6 +893,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Make undo
|
||||
General.Map.UndoRedo.CreateUndo("Join " + count + " sectors");
|
||||
General.Interface.DisplayStatus("Joined " + count + " sectors.");
|
||||
|
||||
// Merge
|
||||
JoinMergeSectors(false);
|
||||
|
@ -911,6 +919,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Make undo
|
||||
General.Map.UndoRedo.CreateUndo("Merge " + count + " sectors");
|
||||
General.Interface.DisplayStatus("Merged " + count + " sectors.");
|
||||
|
||||
// Merge
|
||||
JoinMergeSectors(true);
|
||||
|
|
|
@ -533,6 +533,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Interface.ShowEditThings(things);
|
||||
}
|
||||
|
||||
General.Interface.DisplayStatus("Inserted a new thing.");
|
||||
|
||||
// Update things filter
|
||||
General.Map.ThingsFilter.Update();
|
||||
|
||||
|
@ -580,9 +582,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Make undo
|
||||
if(selected.Count > 1)
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Delete " + selected.Count + " things");
|
||||
General.Interface.DisplayStatus("Deleted " + selected.Count + " things.");
|
||||
}
|
||||
else
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Delete thing");
|
||||
General.Interface.DisplayStatus("Deleted thing.");
|
||||
}
|
||||
|
||||
// Dispose selected things
|
||||
foreach(Thing t in selected) t.Dispose();
|
||||
|
|
|
@ -508,7 +508,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
v.SnapToAccuracy();
|
||||
|
||||
// Split the line with this vertex
|
||||
if(snaptonearest && (l != null)) l.Split(v);
|
||||
if(snaptonearest && (l != null))
|
||||
{
|
||||
General.Interface.DisplayStatus("Split a linedef.");
|
||||
l.Split(v);
|
||||
}
|
||||
else
|
||||
{
|
||||
General.Interface.DisplayStatus("Inserted a vertex.");
|
||||
}
|
||||
|
||||
// Update
|
||||
General.Map.Map.Update();
|
||||
|
@ -530,9 +538,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Make undo
|
||||
if(selected.Count > 1)
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Delete " + selected.Count + " vertices");
|
||||
General.Interface.DisplayStatus("Deleted " + selected.Count + " vertices.");
|
||||
}
|
||||
else
|
||||
{
|
||||
General.Map.UndoRedo.CreateUndo("Delete vertex");
|
||||
General.Interface.DisplayStatus("Deleted a vertex.");
|
||||
}
|
||||
|
||||
// Go for all vertices that need to be removed
|
||||
foreach(Vertex v in selected)
|
||||
|
|
|
@ -527,12 +527,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public void ToggleGravity()
|
||||
{
|
||||
BuilderPlug.Me.UseGravity = !BuilderPlug.Me.UseGravity;
|
||||
string onoff = BuilderPlug.Me.UseGravity ? "ON" : "OFF";
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Gravity is now " + onoff + ".");
|
||||
}
|
||||
|
||||
[BeginAction("togglebrightness")]
|
||||
public void ToggleBrightness()
|
||||
{
|
||||
renderer.FullBrightness = !renderer.FullBrightness;
|
||||
string onoff = renderer.FullBrightness ? "ON" : "OFF";
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Brightness levels are now " + onoff + ".");
|
||||
}
|
||||
|
||||
[BeginAction("resettexture")]
|
||||
|
|
|
@ -356,6 +356,7 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
}
|
||||
|
||||
General.WriteLogLine("Performing undo \"" + u.Description + "\", Ticket ID " + u.TicketID + "...");
|
||||
General.Interface.DisplayStatus(StatusType.Action, u.Description + " undone.");
|
||||
|
||||
// Make a snapshot for redo
|
||||
r = new UndoSnapshot(u, General.Map.Map.Serialize());
|
||||
|
@ -431,6 +432,7 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
}
|
||||
|
||||
General.WriteLogLine("Performing redo \"" + r.Description + "\", Ticket ID " + r.TicketID + "...");
|
||||
General.Interface.DisplayStatus(StatusType.Action, r.Description + " redone.");
|
||||
|
||||
// Make a snapshot for undo
|
||||
u = new UndoSnapshot(r, General.Map.Map.Serialize());
|
||||
|
|
|
@ -1116,7 +1116,7 @@ namespace CodeImp.DoomBuilder
|
|||
if(errorlogger.IsErrorAdded)
|
||||
mainwindow.DisplayStatus(StatusType.Warning, "There were errors during saving!");
|
||||
else
|
||||
mainwindow.DisplayReady();
|
||||
mainwindow.DisplayStatus(StatusType.Info, "Map saved in " + map.FileTitle + ".");
|
||||
|
||||
Cursor.Current = Cursors.Default;
|
||||
}
|
||||
|
@ -1168,7 +1168,7 @@ namespace CodeImp.DoomBuilder
|
|||
if(errorlogger.IsErrorAdded)
|
||||
mainwindow.DisplayStatus(StatusType.Warning, "There were errors during saving!");
|
||||
else
|
||||
mainwindow.DisplayReady();
|
||||
mainwindow.DisplayStatus(StatusType.Info, "Map saved in " + map.FileTitle + ".");
|
||||
|
||||
Cursor.Current = Cursors.Default;
|
||||
}
|
||||
|
@ -1220,7 +1220,7 @@ namespace CodeImp.DoomBuilder
|
|||
if(errorlogger.IsErrorAdded)
|
||||
mainwindow.DisplayStatus(StatusType.Warning, "There were errors during saving!");
|
||||
else
|
||||
mainwindow.DisplayReady();
|
||||
mainwindow.DisplayStatus(StatusType.Info, "Map saved into " + map.FileTitle + ".");
|
||||
|
||||
Cursor.Current = Cursors.Default;
|
||||
}
|
||||
|
|
|
@ -1760,6 +1760,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
{
|
||||
buttonsnaptogrid.Checked = !buttonsnaptogrid.Checked;
|
||||
itemsnaptogrid.Checked = buttonsnaptogrid.Checked;
|
||||
string onoff = buttonsnaptogrid.Checked ? "ON" : "OFF";
|
||||
DisplayStatus(StatusType.Action, "Snap to grid is now " + onoff + " by default.");
|
||||
}
|
||||
|
||||
// Action to toggle auto merge
|
||||
|
@ -1768,6 +1770,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
{
|
||||
buttonautomerge.Checked = !buttonautomerge.Checked;
|
||||
itemautomerge.Checked = buttonautomerge.Checked;
|
||||
string onoff = buttonautomerge.Checked ? "ON" : "OFF";
|
||||
DisplayStatus(StatusType.Action, "Snap to geometry is now " + onoff + " by default.");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue