mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 22:01:45 +00:00
Changed, Visual mode: "Help" panel is now updated only if it is the active tab.
Internal: added General.Interface.ActiveDockerTabName property.
This commit is contained in:
parent
7a9e01c098
commit
91152ee69e
5 changed files with 30 additions and 14 deletions
|
@ -64,7 +64,8 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
#region ================== Properties
|
||||
|
||||
public bool IsCollpased { get { return iscollapsed; } }
|
||||
|
||||
public string SelectedTabName { get { return (tabs.SelectedTab == null ? "None" : tabs.SelectedTab.Text); } } //mxd
|
||||
|
||||
// This returns true when the focus is here, but not in some special cases
|
||||
public bool IsFocused
|
||||
{
|
||||
|
|
|
@ -39,6 +39,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
bool MouseExclusive { get; }
|
||||
MouseButtons MouseButtons { get; }
|
||||
bool IsActiveWindow { get; }
|
||||
string ActiveDockerTabName { get; } //mxd
|
||||
RenderTargetControl Display { get; }
|
||||
|
||||
//mxd. Events
|
||||
|
|
|
@ -193,6 +193,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
public bool MouseExclusive { get { return mouseexclusive; } }
|
||||
new public IntPtr Handle { get { return windowptr; } }
|
||||
public bool IsInfoPanelExpanded { get { return (panelinfo.Height == heightpanel1.Height); } }
|
||||
public string ActiveDockerTabName { get { return dockerspanel.IsCollpased ? "None" : dockerspanel.SelectedTabName; } }
|
||||
public bool IsActiveWindow { get { return windowactive; } }
|
||||
public StatusInfo Status { get { return status; } }
|
||||
|
||||
|
@ -3553,7 +3554,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Processor event
|
||||
private void processor_Tick(object sender, EventArgs e)
|
||||
{
|
||||
Vector2D deltamouse;
|
||||
float curtime = Clock.CurrentTime;
|
||||
float deltatime = curtime - lastupdatetime;
|
||||
lastupdatetime = curtime;
|
||||
|
@ -3562,7 +3562,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
if(mouseinput != null)
|
||||
{
|
||||
// Process mouse input
|
||||
deltamouse = mouseinput.Process();
|
||||
Vector2D deltamouse = mouseinput.Process();
|
||||
if((General.Map != null) && (General.Editing.Mode != null))
|
||||
{
|
||||
General.Plugins.OnEditMouseInput(deltamouse);
|
||||
|
|
|
@ -161,6 +161,7 @@ class DragGeometryMode
|
|||
group general
|
||||
"Hold <b>Shift</b> to toggle grid snapping"
|
||||
"Hold <b>Ctrl</b> to toggle snapping to nearest vertex"
|
||||
"Hold <b>Alt</b> to toggle snapping by grid increment"
|
||||
|
||||
|
||||
class DragThingsMode
|
||||
|
|
|
@ -1274,17 +1274,30 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
o.OnMouseMove(e);
|
||||
|
||||
//mxd. Show hints!
|
||||
if (o.GetType() != lasthighlighttype) {
|
||||
if (o is BaseVisualGeometrySidedef) {
|
||||
General.Hints.ShowHints(this.GetType(), "sidedefs");
|
||||
} else if (o is BaseVisualGeometrySector) {
|
||||
General.Hints.ShowHints(this.GetType(), "sectors");
|
||||
} else if (o is BaseVisualThing) {
|
||||
General.Hints.ShowHints(this.GetType(), "things");
|
||||
} else if (o is BaseVisualVertex) {
|
||||
General.Hints.ShowHints(this.GetType(), "vertices");
|
||||
} else {
|
||||
General.Hints.ShowHints(this.GetType(), HintsManager.GENERAL);
|
||||
if(o.GetType() != lasthighlighttype)
|
||||
{
|
||||
if(General.Interface.ActiveDockerTabName == "Help")
|
||||
{
|
||||
if (o is BaseVisualGeometrySidedef)
|
||||
{
|
||||
General.Hints.ShowHints(this.GetType(), "sidedefs");
|
||||
}
|
||||
else if (o is BaseVisualGeometrySector)
|
||||
{
|
||||
General.Hints.ShowHints(this.GetType(), "sectors");
|
||||
}
|
||||
else if (o is BaseVisualThing)
|
||||
{
|
||||
General.Hints.ShowHints(this.GetType(), "things");
|
||||
}
|
||||
else if (o is BaseVisualVertex)
|
||||
{
|
||||
General.Hints.ShowHints(this.GetType(), "vertices");
|
||||
}
|
||||
else
|
||||
{
|
||||
General.Hints.ShowHints(this.GetType(), HintsManager.GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
lasthighlighttype = o.GetType();
|
||||
|
|
Loading…
Reference in a new issue