diff --git a/SlaveMatrix/SlaveMatrix/GameClasses/ListView.cs b/SlaveMatrix/SlaveMatrix/GameClasses/ListView.cs index ea7d6bf..bc31635 100644 --- a/SlaveMatrix/SlaveMatrix/GameClasses/ListView.cs +++ b/SlaveMatrix/SlaveMatrix/GameClasses/ListView.cs @@ -5,14 +5,13 @@ using _2DGAMELIB; namespace SlaveMatrix { - //Text Actions - public struct TA + public struct TextAction { public string Text; public Action act; - public TA(string Text, Action act) + public TextAction(string Text, Action act) { this.Text = Text; this.act = act; @@ -35,12 +34,12 @@ namespace SlaveMatrix private Vector2D p; - public IEnumerable Acts + public IEnumerable Acts { set { int num = 0; - foreach (TA item in value) + foreach (TextAction item in value) { pt[num].Text = item.Text; bs[num.ToString()].Action = item.act; @@ -70,7 +69,7 @@ namespace SlaveMatrix } } - public ListView(RenderArea Are, Vector2D Position, double Space, Font Font, double TextSize, Color TextColor, Color ShadColor, Color BackColor, Color FramColor, params TA[] acts) + public ListView(RenderArea Are, Vector2D Position, double Space, Font Font, double TextSize, Color TextColor, Color ShadColor, Color BackColor, Color FramColor, params TextAction[] acts) { this.Are = Are; this.Space = Space; diff --git a/SlaveMatrix/SlaveMatrix/GameClasses/ModuleRegistry.cs b/SlaveMatrix/SlaveMatrix/GameClasses/ModuleRegistry.cs index 1710ec5..0c30fd0 100644 --- a/SlaveMatrix/SlaveMatrix/GameClasses/ModuleRegistry.cs +++ b/SlaveMatrix/SlaveMatrix/GameClasses/ModuleRegistry.cs @@ -96,7 +96,7 @@ namespace SlaveMatrix return new Button(shapePartT, on_click); } - public static ListView Select(RenderArea buffer, Vector2D pos, params TA[] acts) { + public static ListView Select(RenderArea buffer, Vector2D pos, params TextAction[] acts) { return new ListView( buffer, buffer.GetPosition(pos), @@ -231,7 +231,7 @@ namespace SlaveMatrix ColorHelper.Empty, ColorHelper.Black, ColorHelper.Empty, - Enumerable.Repeat(new TA(new string('A', 15), delegate{}), 10).ToArray() + Enumerable.Repeat(new TextAction(new string('A', 15), delegate{}), 10).ToArray() ); SaveData.SetHitColor(Med); @@ -601,7 +601,7 @@ namespace SlaveMatrix SaveData.Acts = sllv(Med); } - private static IEnumerable sllv(ModeEventDispatcher Med) + private static IEnumerable sllv(ModeEventDispatcher Med) { int j = 0; string[] array = GlobalState.SDPaths(); @@ -610,7 +610,7 @@ namespace SlaveMatrix string path = text; int i = j; bool f = path == null; - yield return new TA(f ? (i + ": No data") : Path.GetFileNameWithoutExtension(path).Replace(":", ":").Replace("_", "/"), delegate + yield return new TextAction(f ? (i + ": No data") : Path.GetFileNameWithoutExtension(path).Replace(":", ":").Replace("_", "/"), delegate { //////Sounds.操作.Play(); if (save) @@ -699,7 +699,7 @@ namespace SlaveMatrix SaveData.Acts = jsllv(med); } - private static IEnumerable jsllv(ModeEventDispatcher med) + private static IEnumerable jsllv(ModeEventDispatcher med) { int k = 0; string[] array = GlobalState.JSDPaths(); @@ -708,7 +708,7 @@ namespace SlaveMatrix string path = text; int i = k; bool f = path == null; - yield return new TA(f ? (i + ": No data") : Path.GetFileNameWithoutExtension(path).Replace(":", ":").Replace("_", "/"), delegate + yield return new TextAction(f ? (i + ": No data") : Path.GetFileNameWithoutExtension(path).Replace(":", ":").Replace("_", "/"), delegate { //Sounds.操作.Play(); if (save) @@ -1252,7 +1252,7 @@ namespace SlaveMatrix ListView listView = MyUI.Select( DrawBuffer, new Vector2D(0.45, 0.5), - new TA("Start", delegate + new TextAction("Start", delegate { ////Sounds.操作.Play(); GlobalState.GameData.SetDefault(); @@ -1266,7 +1266,7 @@ namespace SlaveMatrix SetDemandMaximum(); Med.SwitchMode("PlayerInformation", DrawBuffer, PlayerInformationSliders); }), - new TA("Load", delegate + new TextAction("Load", delegate { ////Sounds.操作.Play(); SaveData.bs["0"].Dra = true; @@ -2007,7 +2007,7 @@ namespace SlaveMatrix int f = 0; ListView lv = MyUI.Select(DrawBuffer, new Vector2D(0.01, 0.08), - Enumerable.Repeat(new TA("No Slave".PadLeft(15, ' '), delegate { }), 15).ToArray() + Enumerable.Repeat(new TextAction("No Slave".PadLeft(15, ' '), delegate { }), 15).ToArray() ); Color lv初期縁色 = ColorHelper.Black; @@ -2066,9 +2066,9 @@ namespace SlaveMatrix Action set = delegate(int n) { i = 0; - lv.Acts = Enumerable.Repeat(new TA("", delegate + lv.Acts = Enumerable.Repeat(new TextAction("", delegate { - }), 15).Select(delegate(TA e) + }), 15).Select(delegate(TextAction e) { Unit u = GlobalState.GameData.Slaves[n + i]; if (u == null) @@ -5157,49 +5157,49 @@ namespace SlaveMatrix }; - lv = new ListView(DrawBuffer, DrawBuffer.GetPosition(0.01, 0.03), 0.5, new Font("MS Gothic", 1f), 0.07, ColorHelper.White, ColorHelper.Empty, Color.FromArgb(160, ColorHelper.Black), ColorHelper.Black, new TA(GameText.ディルドバイブ + " 35,000,000", delegate(ButtonBase b) + lv = new ListView(DrawBuffer, DrawBuffer.GetPosition(0.01, 0.03), 0.5, new Font("MS Gothic", 1f), 0.07, ColorHelper.White, ColorHelper.Empty, Color.FromArgb(160, ColorHelper.Black), ColorHelper.Black, new TextAction(GameText.ディルドバイブ + " 35,000,000", delegate(ButtonBase b) { buy(b, 0, 35000000uL); - }), new TA(GameText.ノーマルバイブ + " 40,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.ノーマルバイブ + " 40,000,000", delegate(ButtonBase b) { buy(b, 1, 40000000uL); - }), new TA(GameText.ドリルバイブ + " 60,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.ドリルバイブ + " 60,000,000", delegate(ButtonBase b) { buy(b, 2, 60000000uL); - }), new TA(GameText.デンマバイブ + " 50,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.デンマバイブ + " 50,000,000", delegate(ButtonBase b) { buy(b, 3, 50000000uL); - }), new TA(GameText.アナルバイブ + " 45,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.アナルバイブ + " 45,000,000", delegate(ButtonBase b) { buy(b, 4, 45000000uL); - }), new TA(GameText.調教鞭 + " 30,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.調教鞭 + " 30,000,000", delegate(ButtonBase b) { buy(b, 5, 30000000uL); - }), new TA(GameText.羽根箒 + " 20,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.羽根箒 + " 20,000,000", delegate(ButtonBase b) { buy(b, 6, 20000000uL); - }), new TA(GameText.T字剃刀 + " 20,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.T字剃刀 + " 20,000,000", delegate(ButtonBase b) { buy(b, 7, 20000000uL); - }), new TA(GameText.振動キャップ + " 30,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.振動キャップ + " 30,000,000", delegate(ButtonBase b) { buy(b, 8, 30000000uL); - }), new TA(GameText.ピンクロータ + " 20,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.ピンクロータ + " 20,000,000", delegate(ButtonBase b) { buy(b, 9, 20000000uL); - }), new TA(GameText.アナルパール + " 20,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.アナルパール + " 20,000,000", delegate(ButtonBase b) { buy(b, 10, 20000000uL); - }), new TA(GameText.目隠帯 + " 25,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.目隠帯 + " 25,000,000", delegate(ButtonBase b) { buy(b, 11, 25000000uL); - }), new TA(GameText.玉口枷 + " 20,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.玉口枷 + " 20,000,000", delegate(ButtonBase b) { buy(b, 12, 20000000uL); - }), new TA(GameText.カメラ + " 100,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.カメラ + " 100,000,000", delegate(ButtonBase b) { buy(b, 13, 100000000uL); - }), new TA(GameText.フロア増設 + " 300,000,000", delegate(ButtonBase b) + }), new TextAction(GameText.フロア増設 + " 300,000,000", delegate(ButtonBase b) { ulong num = 300000000uL; if (GlobalState.GameData.所持金 >= num)