Move Movie lua library to client.common, and some refactoring necessary to do so

This commit is contained in:
adelikat 2013-11-01 15:43:15 +00:00
parent fe9d8ed881
commit d391d275ef
5 changed files with 6 additions and 41 deletions

View File

@ -106,6 +106,7 @@
<Compile Include="lua\EmuLuaLibrary.Events.cs" />
<Compile Include="lua\EmuLuaLibrary.MainMemory.cs" />
<Compile Include="lua\EmuLuaLibrary.Memory.cs" />
<Compile Include="lua\EmuLuaLibrary.Movie.cs" />
<Compile Include="lua\LuaDocumentation.cs" />
<Compile Include="lua\LuaFile.cs" />
<Compile Include="lua\LuaFunctionList.cs" />

View File

@ -1,7 +1,6 @@
using LuaInterface;
using BizHawk.Client.Common;
namespace BizHawk.MultiClient
namespace BizHawk.Client.Common
{
public class MovieLuaLibrary : LuaLibraryBase
{
@ -111,14 +110,8 @@ namespace BizHawk.MultiClient
public static void movie_setreadonly(object lua_input)
{
if (lua_input.ToString().ToUpper() == "TRUE" || lua_input.ToString() == "1")
{
GlobalWinF.MainForm.SetReadOnly(true);
}
else
{
GlobalWinF.MainForm.SetReadOnly(false);
}
Global.ReadOnly = (lua_input.ToString().ToUpper() == "TRUE"
|| lua_input.ToString() == "1");
}
public static void movie_setrerecordcounting(object lua_input)

View File

@ -450,7 +450,6 @@
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Gui.cs" />
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Input.cs" />
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Joypad.cs" />
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Movie.cs" />
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.NES.cs" />
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Savestate.cs" />
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.SNES.cs" />

View File

@ -3471,19 +3471,6 @@ namespace BizHawk.MultiClient
}
public void SetReadOnly(bool read_only)
{
Global.ReadOnly = read_only;
if (Global.ReadOnly)
{
GlobalWinF.OSD.AddMessage("Movie read-only mode");
}
else
{
GlobalWinF.OSD.AddMessage("Movie read+write mode");
}
}
public void LoadTAStudio()
{
if (!TAStudio1.IsHandleCreated || TAStudio1.IsDisposed)

View File

@ -82,21 +82,6 @@ namespace BizHawk.MultiClient
}
}
//public string GetMnemonic()
//{
// StringBuilder str = new StringBuilder("|"); //TODO: Control Command virtual pad
// //TODO: remove this hack with a nes controls pad
// if (Global.Emulator.SystemId == "NES")
// {
// str.Append("0|");
// }
// for (int x = 0; x < Pads.Count; x++)
// str.Append(Pads[x].GetMnemonic());
// return str.ToString();
//}
private void TASView_QueryItemBkColor(int index, int column, ref Color color)
{
if (index == 0 && Global.MovieSession.Movie.StateFirstIndex == 0)
@ -288,7 +273,7 @@ namespace BizHawk.MultiClient
{
if (ReadOnlyCheckBox.Checked)
{
GlobalWinF.MainForm.SetReadOnly(true);
Global.ReadOnly = true;
ReadOnlyCheckBox.BackColor = SystemColors.Control;
if (Global.MovieSession.Movie.IsActive)
@ -299,7 +284,7 @@ namespace BizHawk.MultiClient
}
else
{
GlobalWinF.MainForm.SetReadOnly(false);
Global.ReadOnly = false;
ReadOnlyCheckBox.BackColor = Color.LightCoral;
if (Global.MovieSession.Movie.IsActive)
{