Move Movie lua library to client.common, and some refactoring necessary to do so
This commit is contained in:
parent
fe9d8ed881
commit
d391d275ef
|
@ -106,6 +106,7 @@
|
||||||
<Compile Include="lua\EmuLuaLibrary.Events.cs" />
|
<Compile Include="lua\EmuLuaLibrary.Events.cs" />
|
||||||
<Compile Include="lua\EmuLuaLibrary.MainMemory.cs" />
|
<Compile Include="lua\EmuLuaLibrary.MainMemory.cs" />
|
||||||
<Compile Include="lua\EmuLuaLibrary.Memory.cs" />
|
<Compile Include="lua\EmuLuaLibrary.Memory.cs" />
|
||||||
|
<Compile Include="lua\EmuLuaLibrary.Movie.cs" />
|
||||||
<Compile Include="lua\LuaDocumentation.cs" />
|
<Compile Include="lua\LuaDocumentation.cs" />
|
||||||
<Compile Include="lua\LuaFile.cs" />
|
<Compile Include="lua\LuaFile.cs" />
|
||||||
<Compile Include="lua\LuaFunctionList.cs" />
|
<Compile Include="lua\LuaFunctionList.cs" />
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using LuaInterface;
|
using LuaInterface;
|
||||||
using BizHawk.Client.Common;
|
|
||||||
|
|
||||||
namespace BizHawk.MultiClient
|
namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
public class MovieLuaLibrary : LuaLibraryBase
|
public class MovieLuaLibrary : LuaLibraryBase
|
||||||
{
|
{
|
||||||
|
@ -111,14 +110,8 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
public static void movie_setreadonly(object lua_input)
|
public static void movie_setreadonly(object lua_input)
|
||||||
{
|
{
|
||||||
if (lua_input.ToString().ToUpper() == "TRUE" || lua_input.ToString() == "1")
|
Global.ReadOnly = (lua_input.ToString().ToUpper() == "TRUE"
|
||||||
{
|
|| lua_input.ToString() == "1");
|
||||||
GlobalWinF.MainForm.SetReadOnly(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GlobalWinF.MainForm.SetReadOnly(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void movie_setrerecordcounting(object lua_input)
|
public static void movie_setrerecordcounting(object lua_input)
|
|
@ -450,7 +450,6 @@
|
||||||
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Gui.cs" />
|
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Gui.cs" />
|
||||||
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Input.cs" />
|
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Input.cs" />
|
||||||
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Joypad.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.NES.cs" />
|
||||||
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Savestate.cs" />
|
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Savestate.cs" />
|
||||||
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.SNES.cs" />
|
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.SNES.cs" />
|
||||||
|
|
|
@ -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()
|
public void LoadTAStudio()
|
||||||
{
|
{
|
||||||
if (!TAStudio1.IsHandleCreated || TAStudio1.IsDisposed)
|
if (!TAStudio1.IsHandleCreated || TAStudio1.IsDisposed)
|
||||||
|
|
|
@ -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)
|
private void TASView_QueryItemBkColor(int index, int column, ref Color color)
|
||||||
{
|
{
|
||||||
if (index == 0 && Global.MovieSession.Movie.StateFirstIndex == 0)
|
if (index == 0 && Global.MovieSession.Movie.StateFirstIndex == 0)
|
||||||
|
@ -288,7 +273,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
if (ReadOnlyCheckBox.Checked)
|
if (ReadOnlyCheckBox.Checked)
|
||||||
{
|
{
|
||||||
GlobalWinF.MainForm.SetReadOnly(true);
|
Global.ReadOnly = true;
|
||||||
ReadOnlyCheckBox.BackColor = SystemColors.Control;
|
ReadOnlyCheckBox.BackColor = SystemColors.Control;
|
||||||
|
|
||||||
if (Global.MovieSession.Movie.IsActive)
|
if (Global.MovieSession.Movie.IsActive)
|
||||||
|
@ -299,7 +284,7 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GlobalWinF.MainForm.SetReadOnly(false);
|
Global.ReadOnly = false;
|
||||||
ReadOnlyCheckBox.BackColor = Color.LightCoral;
|
ReadOnlyCheckBox.BackColor = Color.LightCoral;
|
||||||
if (Global.MovieSession.Movie.IsActive)
|
if (Global.MovieSession.Movie.IsActive)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue