Commit ac5bbdf7 authored by Unicorn369's avatar Unicorn369

Save Config

parent b1d1b754
...@@ -739,6 +739,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -739,6 +739,7 @@ public class Ocgcore : ServantWithCardDescription
public void onHome() public void onHome()
{ {
Program.I().SaveConfig();
returnTo(); returnTo();
} }
......
...@@ -1202,8 +1202,7 @@ public class Program : MonoBehaviour ...@@ -1202,8 +1202,7 @@ public class Program : MonoBehaviour
void OnApplicationQuit() void OnApplicationQuit()
{ {
TcpHelper.SaveRecord(); TcpHelper.SaveRecord();
cardDescription.save(); SaveConfig();
setting.saveWhenQuit();
for (int i = 0; i < servants.Count; i++) for (int i = 0; i < servants.Count; i++)
{ {
servants[i].OnQuit(); servants[i].OnQuit();
...@@ -1225,6 +1224,13 @@ public class Program : MonoBehaviour ...@@ -1225,6 +1224,13 @@ public class Program : MonoBehaviour
OnApplicationQuit(); OnApplicationQuit();
} }
public void SaveConfig()
{
cardDescription.save();
setting.save();
setting.saveWhenQuit();
}
#endregion #endregion
//递归创建目录 //递归创建目录
......
...@@ -215,6 +215,7 @@ public class Setting : WindowServant2D ...@@ -215,6 +215,7 @@ public class Setting : WindowServant2D
void onClickExit() void onClickExit()
{ {
Program.I().SaveConfig();
hide(); hide();
} }
......
...@@ -318,6 +318,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -318,6 +318,7 @@ public class DeckManager : ServantWithCardDescription
{ {
returnAction(); returnAction();
} }
Program.I().SaveConfig();
} }
void sort() void sort()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment