Skip to content

Commit

Permalink
fix(code): Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hww committed Oct 9, 2022
1 parent 7e3163a commit 6d65cfc
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 24 deletions.
16 changes: 16 additions & 0 deletions Assets/XiDebugMenu/Fonts/Read Me.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Envy Code R (coding font) preview #7.2
======================================
Envy Code R is a fully-scalable monospaced font designed for programming and command prompts.

There are three variants including in the archive - Regular, Bold and Italic. A large number of additional symbols outside the ASCII range and provided which covers most of the Windows/ISO 1252 codepage, MacOS Roman and a number of other Central European pages.

This archive also contains a folder named 'Visual Studio Italics-as-bold' which contains the Regular and Italic fonts again with an alternate name of 'Envy Code R VS' and with the Italic variant set to identify itself as bold. This allows you to utilise italics within Visual Studio's syntax highlighter by choosing bold everywhere you want italics - great for comments or strings!

If you wish to use Envy Code R as a font for your Windows Command Prompt run the included .reg registry file and reboot, then choose Properties from the Command Prompt to set it.

Please send feedback to damien@envytech.co.uk and be sure to visit http://damieng.com/fonts/envy-code-r for updates and more information.

[)amien
Damien Guard, May 2008.

Copyright � 2006-2008 Envy Technologies Ltd. Free to use but redistribution prohibited.
7 changes: 7 additions & 0 deletions Assets/XiDebugMenu/Fonts/Read Me.txt.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Assets/XiDebugMenu/Scripts/DebugMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public class DebugMenu : DebugMenuItem
public int widthOfValue;

private readonly List<DebugMenuItem> itemsList;
private Action<DebugMenu> onClose;
private Action<DebugMenu> onOpen;
private Action<DebugMenu> onClear;
private Action<DebugMenu> onClose = null
private Action<DebugMenu> onOpen = null;
private Action<DebugMenu> onClear = null;
private bool doRefresh;
private float doRefreshUpTo;

Expand Down
1 change: 0 additions & 1 deletion Assets/XiDebugMenu/Scripts/DebugMenuFloat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
using System;
using UnityEngine;
using XiCore;
using XiUnityTools;

namespace XiDebugMenu
{
Expand Down
28 changes: 14 additions & 14 deletions Assets/XiDebugMenu/Scripts/DebugMenuItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public abstract class DebugMenuItem
public string value; //< at right side of menu item
public string labelColor; //< label color
public string valueColor; //< value color

public enum EvenTag
{
Null, //< Nothing
Expand All @@ -57,7 +57,7 @@ public enum EventResult
Modified,
Called,
}

protected DebugMenuItem(string path, int order)
{
var pathOnly = DebugMenuTools.GetDirectoryName(path);
Expand Down Expand Up @@ -91,20 +91,20 @@ protected int KeyboardModificationSpeed
get => Input.GetKey(KeyCode.LeftShift) ? (Input.GetKey(KeyCode.LeftControl) ? 100 : 10) : 1;
}

// =============================================================================================================
// Syntax sugar (Can be removed)
// =============================================================================================================
// =============================================================================================================
// Syntax sugar (Can be removed)
// =============================================================================================================

/// <summary>
/// Menu will group items with equal or +1 difference to single block
/// </summary>
public DebugMenuItem Order(int order)
/// <summary>
/// Menu will group items with equal or +1 difference to single block
/// </summary>
public DebugMenuItem Order(int order)
{
this.order = order;
parentMenu.Sort();
return this;
}

public DebugMenuItem AddToMenu(DebugMenu menu)
{
parentMenu?.RemoveItem(this);
Expand All @@ -113,23 +113,23 @@ public DebugMenuItem AddToMenu(DebugMenu menu)
return this;
}

public DebugMenuItem Value(string value)
public virtual DebugMenuItem Value(string value)
{
this.value = value;
return this;
}

public DebugMenuItem LabelColor(string value)
{
labelColor = value;
return this;
}

public DebugMenuItem ValueColor(string value)
{
valueColor = value;
return this;
}

}
}
5 changes: 0 additions & 5 deletions Assets/XiDebugMenu/Scripts/DebugMenuString.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,5 @@ private void OnModified()
DebugMenuSystem.FlashText($"<color={labelColor}>{label}</color> <color={valueColor}>{value}</color>");
}

public DebugMenutring Value(string value)
{
this.value = value;
return this;
}
}
}
1 change: 0 additions & 1 deletion Assets/XiDebugMenu/Scripts/MenuTextRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public enum MenuOptions

var lineWidth = debugMenu.widthOfNameAnValue + SUFFIX.Length + PREFIX.Length;

string singleLine = null;
string justLine = new string(CHAR_LIGHT_HORIZONTAL, lineWidth);


Expand Down

0 comments on commit 6d65cfc

Please sign in to comment.