BizHawk/BizHawk.MultiClient/tools/LuaFiles.cs

70 lines
1.2 KiB
C#
Raw Normal View History

2011-05-06 23:08:50 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.MultiClient
{
class LuaFile
{
public string Name;
public string Path;
public bool Enabled;
public bool Paused;
public bool IsSeparator;
public LuaInterface.Lua Thread;
public bool FrameWaiting;
2011-05-06 23:08:50 +00:00
public LuaFile(string path)
{
Name = "";
Path = path;
Enabled = true;
Paused = false;
FrameWaiting = false;
}
2011-05-06 23:08:50 +00:00
public void Stop()
{
Enabled = false;
Thread = null;
}
public LuaFile(string name, string path)
{
Name = name;
Path = path;
IsSeparator = false;
}
2011-05-07 00:07:27 +00:00
public LuaFile(bool isSeparator)
{
IsSeparator = isSeparator;
Name = "";
Path = "";
Enabled = false;
}
2011-05-06 23:08:50 +00:00
public LuaFile(LuaFile l)
{
Name = l.Name;
Path = l.Path;
Enabled = l.Enabled;
Paused = l.Paused;
IsSeparator = l.IsSeparator;
}
2011-05-06 23:08:50 +00:00
public void Toggle()
{
Enabled ^= true;
if (Enabled)
Paused = false;
}
public void TogglePause()
{
Paused ^= true;
}
}
2011-05-06 23:08:50 +00:00
}