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:
MaxED 2014-10-13 22:01:17 +00:00
parent 7a9e01c098
commit 91152ee69e
5 changed files with 30 additions and 14 deletions

View file

@ -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
{

View file

@ -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

View file

@ -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);

View file

@ -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

View file

@ -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();