more stuf
This commit is contained in:
@@ -92,6 +92,9 @@ namespace Cabrito
|
||||
// Closes the Console
|
||||
public static void Close() => instance.Close();
|
||||
|
||||
// Clears the content of the Console
|
||||
public static void Clear() => instance.Clear();
|
||||
|
||||
public static void Execute(string str) => instance.Execute(str);
|
||||
|
||||
public static string GetVariable(string variableName) => instance.GetVariable(variableName);
|
||||
@@ -299,6 +302,12 @@ namespace Cabrito
|
||||
stopwatch.Restart();
|
||||
}
|
||||
|
||||
// Clears the content of the Console
|
||||
public void Clear()
|
||||
{
|
||||
consoleLines.Clear();
|
||||
}
|
||||
|
||||
public void Execute(string str)
|
||||
{
|
||||
str = str.Trim();
|
||||
|
||||
@@ -7,15 +7,11 @@ namespace Game
|
||||
{
|
||||
public class ConsolePlugin : GamePlugin
|
||||
{
|
||||
public ConsolePlugin()
|
||||
{
|
||||
Console.Init();
|
||||
Console.Print("ConsolePlugin ctor");
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
Console.Init();
|
||||
base.Initialize();
|
||||
|
||||
Console.Print("ConsolePlugin initialize");
|
||||
}
|
||||
|
||||
|
||||
@@ -260,8 +260,6 @@ namespace Cabrito
|
||||
var rootlocation = rootControl.Control.Location;
|
||||
rootlocation.Y = -rootControl.Control.Height;
|
||||
rootControl.Control.Location = rootlocation;
|
||||
|
||||
Console.Print("console open: " + Console.IsOpen.ToString());
|
||||
}
|
||||
|
||||
private void OnSendLog(LogType level, string msg, FlaxEngine.Object obj, string stackTrace)
|
||||
@@ -331,6 +329,7 @@ namespace Cabrito
|
||||
|
||||
public void OnConsoleClose()
|
||||
{
|
||||
Console.Print("closed console");
|
||||
Screen.CursorVisible = false;
|
||||
Screen.CursorLock = CursorLockMode.Locked;
|
||||
|
||||
@@ -345,12 +344,15 @@ namespace Cabrito
|
||||
{
|
||||
base.OnUpdate();
|
||||
|
||||
if (!Console.IsOpen && Input.GetAction("ClearConsole"))
|
||||
Console.Clear();
|
||||
|
||||
float targetY;
|
||||
float conHeight = rootControl.Control.Height /*/ Platform.DpiScale*/;
|
||||
if (!Console.IsOpen)
|
||||
targetY = -conHeight;
|
||||
else
|
||||
targetY = 0.0f;
|
||||
targetY = 0.0f;
|
||||
|
||||
Vector2 location = rootControl.Control.Location;
|
||||
if (location.Y != targetY)
|
||||
|
||||
Reference in New Issue
Block a user