started abstracting the UI

This commit is contained in:
lewd-alt
2025-09-18 08:43:54 -07:00
parent 459e9d04a6
commit 7f0489b214
23 changed files with 428 additions and 903192 deletions

View File

@@ -7,39 +7,26 @@ namespace _2DGAMELIB
public class Are : Rect public class Are : Rect
{ {
public Bitmap Dis; public Bitmap Dis;
public Bitmap Hit;
protected Graphics gd; protected Graphics gd;
protected Bitmap Hit;
protected Graphics gh; protected Graphics gh;
protected double unit; protected double unit;
protected double disUnit; protected double disUnit;
protected double hitUnit; protected double hitUnit;
protected Size WH = System.Drawing.Size.Empty; protected Size WH = System.Drawing.Size.Empty;
protected Size WHH = System.Drawing.Size.Empty; protected Size WHH = System.Drawing.Size.Empty;
protected Size WHA = System.Drawing.Size.Empty; protected Size WHA = System.Drawing.Size.Empty;
private Color ClearColor = Color.Transparent;
public Vector2D BasePoint = Dat.Vec2DZero; public Vector2D BasePoint = Dat.Vec2DZero;
public Vector2D Position = Dat.Vec2DZero; public Vector2D Position = Dat.Vec2DZero;
protected Vector2D p;
public Graphics GD => gd; public Graphics GD => gd;
public Graphics GH => gh; public Graphics GH => gh;
public double Unit => unit; public double Unit => unit;
public double DisUnit => disUnit; public double DisUnit => disUnit;
public Are() { } public Are() { }
@@ -132,25 +119,9 @@ namespace _2DGAMELIB
} }
} }
public void Draw(Graphics GD)
{
p = GetPosition();
GD.DrawImage(Dis, (int)(p.X * unit), (int)(p.Y * unit), WH.Width, WH.Height);
}
public void Draw(Graphics GD, Graphics GH)
{
p = GetPosition();
GD.DrawImage(Dis, (int)(p.X * unit), (int)(p.Y * unit), WH.Width, WH.Height);
if (gh != null)
{
GH.DrawImage(Hit, (int)(p.X * hitUnit), (int)(p.Y * hitUnit), WHH.Width, WHH.Height);
}
}
public void Draw(Are Are) public void Draw(Are Are)
{ {
p = Are.GetPosition(); Vector2D p = Are.GetPosition();
GD.DrawImage(Are.Dis, (float)(p.X * Are.disUnit), (float)(p.Y * Are.disUnit), Are.WHA.Width, Are.WHA.Height); GD.DrawImage(Are.Dis, (float)(p.X * Are.disUnit), (float)(p.Y * Are.disUnit), Are.WHA.Width, Are.WHA.Height);
if (Are.gh != null && GH != null) if (Are.gh != null && GH != null)
{ {
@@ -161,13 +132,33 @@ namespace _2DGAMELIB
public void DrawTo(Graphics GD)
{
Vector2D p = GetPosition();
GD.DrawImage(Dis, (int)(p.X * unit), (int)(p.Y * unit), WH.Width, WH.Height);
}
public void DrawTo(Graphics GD, Graphics GH)
{
Vector2D p = GetPosition();
GD.DrawImage(Dis, (int)(p.X * unit), (int)(p.Y * unit), WH.Width, WH.Height);
if (gh != null)
{
GH.DrawImage(Hit, (int)(p.X * hitUnit), (int)(p.Y * hitUnit), WHH.Width, WHH.Height);
}
}
public void Clear() public void Clear()
{ {
gd.Clear(ClearColor); gd.Clear(Color.Transparent);
if (gh != null) if (gh != null)
{ {
gh.Clear(ClearColor); gh.Clear(Color.Transparent);
} }
} }
@@ -176,7 +167,7 @@ namespace _2DGAMELIB
gd.Clear(Color); gd.Clear(Color);
if (gh != null) if (gh != null)
{ {
gh.Clear(ClearColor); gh.Clear(Color.Transparent);
} }
} }

View File

@@ -9,69 +9,46 @@ namespace _2DGAMELIB
{ {
public class Med public class Med
{ {
public static object obj;
private GlImage baseControl; private GlImage baseControl;
public double Unit = 1762.4; public double Unit = 1762.4;
public double DisQuality = 1.0;
public double HitAccuracy = 0.5;
private double resMag = 1.0;
private int WidthM;
private int HeightM;
public bool ShowFPS;
public bool Drive = true;
public Rect Base = new Rect(4.0, 3.0, 0.4); public Rect Base = new Rect(4.0, 3.0, 0.4);
public double DisQuality = 1.0; public Bitmap Dis;
public double HitAccuracy = 0.5;
public Bitmap BD;
public Graphics GD; public Graphics GD;
public Bitmap BH; public Bitmap Hit;
public Graphics GH; public Graphics GH;
private Color ClearColor = Color.Transparent; public Sce Sce;
public FPS FPSF = new FPS(60.0);
public bool Drive = true;
private Size BaseSize = Size.Empty; private Size BaseSize = Size.Empty;
private double resMag = 1.0;
private Vector2D resVector = Dat.Vec2DZero; private Vector2D resVector = Dat.Vec2DZero;
private Sce Sce; public string UITitle;
private string mode; private string mode;
public string Modeb; public string Modeb;
private Dictionary<string, Module> Modes; private Dictionary<string, Module> Modes;
private Func<Med, Dictionary<string, Module>> GetModes; private Func<Med, Dictionary<string, Module>> GetModes;
private int WidthM;
private int HeightM;
public static double FPS;
public FPS FPSF = new FPS(FPS);
private bool cur = true;
public HashSet<Color> HitColors = new HashSet<Color> public HashSet<Color> HitColors = new HashSet<Color>
{ {
Color.Transparent, Color.Transparent,
Color.Black Color.Black
}; };
public static double DpiX;
public static double DpiY;
public string UITitle;
public bool ShowFPS;
//public Control BaseControlC => baseControl; //public Control BaseControlC => baseControl;
@@ -92,17 +69,24 @@ namespace _2DGAMELIB
} }
} }
public Vector2D CursorPosition => ToBasePosition(baseControl.GetCursorPoint()); //ToBasePosition(baseControl.PointToClient(System.Windows.Forms.Cursor.Position)); public Vector2D CursorPosition{
get {
return ToBasePosition(baseControl.GetCursorPoint()); //ToBasePosition(baseControl.PointToClient(System.Windows.Forms.Cursor.Position));
}
set {
baseControl.SetCursorPoint(FromBasePosition(value));
}
}
public Med() public Med()
{ {
//Point dpi = GetDpi();
//dpiX = dpi.X;
//dpiY = dpi.Y;
DpiX = 1.0; // 96.0 / dpiX;
DpiY = 1.0; // 96.0 / dpiY;
} }
public void FadeIn(double Rate) public void FadeIn(double Rate)
{ {
Sce.TransformAlpha(GD, Rate); Sce.TransformAlpha(GD, Rate);
@@ -113,20 +97,10 @@ namespace _2DGAMELIB
Sce.TransD(GD, Rate); Sce.TransD(GD, Rate);
} }
public void DrawStart(Are Are)
{
Sce.DrawStart(Are);
}
public void DrawEnd(Are Are)
{
Sce.DrawEnd(Are);
}
public void ClearSta(Color ClearColor)
{
Sce.ClearStart(ref ClearColor);
}
public void InitializeModes(string Mode, Func<Med, Dictionary<string, Module>> GetModes) public void InitializeModes(string Mode, Func<Med, Dictionary<string, Module>> GetModes)
{ {
@@ -138,24 +112,31 @@ namespace _2DGAMELIB
{ {
baseControl = BaseControl; baseControl = BaseControl;
BaseSize = new Size((int)(Base.LocalWidth * Unit), (int)(Base.LocalHeight * Unit)); BaseSize = new Size((int)(Base.LocalWidth * Unit), (int)(Base.LocalHeight * Unit));
BD = new Bitmap(BaseSize.Width, BaseSize.Height); Dis = new Bitmap(BaseSize.Width, BaseSize.Height);
GD = Graphics.FromImage(BD); GD = Graphics.FromImage(Dis);
GD.InterpolationMode = InterpolationMode.HighQualityBilinear; //GD.InterpolationMode = InterpolationMode.HighQualityBilinear;
BH = new Bitmap((int)((double)BaseSize.Width * HitAccuracy), (int)((double)BaseSize.Height * HitAccuracy)); GD.SmoothingMode = SmoothingMode.None;
GH = Graphics.FromImage(BH); GD.PixelOffsetMode = PixelOffsetMode.HighSpeed;
GH.InterpolationMode = InterpolationMode.Bilinear; GD.InterpolationMode = InterpolationMode.NearestNeighbor;
WidthM = BH.Width - 1; //needed for text or smthn
HeightM = BH.Height - 1; GD.CompositingMode = CompositingMode.SourceOver;
Clear();
Hit = new Bitmap((int)((double)BaseSize.Width * HitAccuracy), (int)((double)BaseSize.Height * HitAccuracy));
GH = Graphics.FromImage(Hit);
//GH.InterpolationMode = InterpolationMode.Bilinear;
GH.SmoothingMode = SmoothingMode.None;
GH.PixelOffsetMode = PixelOffsetMode.HighSpeed;
GH.InterpolationMode = InterpolationMode.NearestNeighbor;
GH.CompositingMode = CompositingMode.SourceOver;
WidthM = Hit.Width - 1;
HeightM = Hit.Height - 1;
Sce = new Sce(BaseSize.Width, BaseSize.Height); Sce = new Sce(BaseSize.Width, BaseSize.Height);
Modes = GetModes(this); Modes = GetModes(this);
BaseControl.Click = delegate (IntPtr window, GLFW.MouseButton button, InputState state, GLFW.ModifierKeys modifiers) BaseControl.Click = delegate (IntPtr window, GLFW.MouseButton button, InputState state, GLFW.ModifierKeys modifiers)
{ {
double x, y;
Glfw.GetCursorPosition(GlImage.PtrToWindow(window), out x, out y);
Point Position5 = new Point((int)x, (int)y);
MouseButtons arg2 = MouseButtons.None; MouseButtons arg2 = MouseButtons.None;
switch (button) switch (button)
{ {
@@ -176,14 +157,17 @@ namespace _2DGAMELIB
break; break;
} }
double x, y;
(state == InputState.Press ? Modes[mode].Down : Modes[mode].Up)(arg2, ToBasePosition(Position5), GetHitColor(ref Position5)); Glfw.GetCursorPosition(GlImage.PtrToWindow(window), out x, out y);
Vector2D Position5 = new Vector2D(x, y);
(state == InputState.Press ? Modes[mode].Down : Modes[mode].Up)
(arg2, ToBasePosition(Position5), GetHitColor(Position5));
}; };
BaseControl.Move = delegate (IntPtr window, double x, double y) BaseControl.Move = delegate (IntPtr window, double x, double y)
{ {
Point Position3 = new Point((int)x, (int)y); Vector2D Position3 = new Vector2D(x, y);
Modes[mode].Move(BaseControl.GetMouseButtons(), ToBasePosition(Position3), GetHitColor(ref Position3)); Modes[mode].Move(BaseControl.GetMouseButtons(), ToBasePosition(Position3), GetHitColor(Position3));
}; };
BaseControl.Leave = delegate (IntPtr window, bool entered) BaseControl.Leave = delegate (IntPtr window, bool entered)
@@ -192,8 +176,8 @@ namespace _2DGAMELIB
{ {
double x, y; double x, y;
Glfw.GetCursorPosition(GlImage.PtrToWindow(window), out x, out y); Glfw.GetCursorPosition(GlImage.PtrToWindow(window), out x, out y);
Point Position2 = new Point((int)x, (int)y); Vector2D Position2 = new Vector2D(x, y);
Modes[mode].Leave(BaseControl.GetMouseButtons(), ToBasePosition(Position2), GetHitColor(ref Position2)); Modes[mode].Leave(BaseControl.GetMouseButtons(), ToBasePosition(Position2), GetHitColor(Position2));
} }
}; };
@@ -201,9 +185,9 @@ namespace _2DGAMELIB
{ {
double x, y; double x, y;
Glfw.GetCursorPosition(GlImage.PtrToWindow(window), out x, out y); Glfw.GetCursorPosition(GlImage.PtrToWindow(window), out x, out y);
Point Position = new Point((int)x, (int)y); Vector2D Position = new Vector2D(x, y);
//Note: yo may be inverted //Note: yo may be inverted
Modes[mode].Wheel(BaseControl.GetMouseButtons(), ToBasePosition(Position), (int)yo, GetHitColor(ref Position)); Modes[mode].Wheel(BaseControl.GetMouseButtons(), ToBasePosition(Position), (int)yo, GetHitColor(Position));
}; };
BaseControl.Resize = delegate (IntPtr window, int width, int height) BaseControl.Resize = delegate (IntPtr window, int width, int height)
@@ -246,20 +230,22 @@ namespace _2DGAMELIB
return BaseSize; return BaseSize;
} }
public Vector2D ToBasePosition(Point Position)
public Vector2D ToBasePosition(Vector2D Position)
{ {
return new Vector2D(((double)Position.X - resVector.X) / Unit * resMag, ((double)Position.Y - resVector.Y) / Unit * resMag); return new Vector2D(((double)Position.X - resVector.X) / Unit * resMag, ((double)Position.Y - resVector.Y) / Unit * resMag);
} }
public Point FromBasePosition(Vector2D Position) public Vector2D FromBasePosition(Vector2D Position)
{ {
return new Point((int)(Position.X / resMag * Unit + resVector.X), (int)(Position.Y / resMag * Unit + resVector.Y)); return new Vector2D(Position.X / resMag * Unit + resVector.X, Position.Y / resMag * Unit + resVector.Y);
} }
public Color GetHitColor(Point Position) public Color GetHitColor(Vector2D Position)
{ {
double num = HitAccuracy * resMag; double num = HitAccuracy * resMag;
Point point = ((Position.ToVector2D() - resVector) * num).ToPoint(); Point point = ((Position - resVector) * num).ToPoint();
if (point.X < 0) if (point.X < 0)
{ {
point.X = 0; point.X = 0;
@@ -276,7 +262,7 @@ namespace _2DGAMELIB
{ {
point.Y = HeightM; point.Y = HeightM;
} }
return BH.GetPixel(point.X, point.Y); return Hit.GetPixel(point.X, point.Y);
} }
public Color GetHitColor(ref Point Position) public Color GetHitColor(ref Point Position)
@@ -299,14 +285,18 @@ namespace _2DGAMELIB
{ {
point.Y = HeightM; point.Y = HeightM;
} }
return BH.GetPixel(point.X, point.Y); return Hit.GetPixel(point.X, point.Y);
} }
public void Drawing() public void Drawing()
{ {
baseControl.BitmapSetting(BD); baseControl.BitmapSetting(Dis);
Modes[mode].Setting();
baseControl.SetTitle(UITitle);
Modes[mode].Setting();
Action action = delegate Action action = delegate
{ {
@@ -320,8 +310,9 @@ namespace _2DGAMELIB
} }
} }
GD.DrawImage(BH, new Point(0, 0)); //DEBUG shows the hit lut
baseControl.SetBitmap(BD); //GD.DrawImage(Hit, new Point(0, 0));
baseControl.SetBitmap(Dis);
}; };
@@ -332,44 +323,29 @@ namespace _2DGAMELIB
} }
} }
public void Clear()
{
GD.Clear(ClearColor);
GH.Clear(ClearColor);
}
public void Draw(Are Are) public void Draw(Are Are)
{ {
Are.Draw(GD, GH); //Note: this is terribly slow...
//would be better to not copy the entire frame
Are.DrawTo(GD, GH);
} }
//TODO fix?
public void CursorHide() public void CursorHide()
{
if (cur)
{ {
//TODO fix? //TODO fix?
//System.Windows.Forms.Cursor.Hide();
cur = false;
}
} }
public void CursorShow() public void CursorShow()
{
if (!cur)
{ {
//TODO fix? //TODO fix?
//System.Windows.Forms.Cursor.Show();
cur = true;
}
} }
public void InvokeL(Action a)
{
//TODO this look right?
a();
//baseControl.Invoke(a);
}
//hit color stuff
public Color GetUniqueColor() public Color GetUniqueColor()
{ {
Oth.GetRandomColor(out var ret); Oth.GetRandomColor(out var ret);
@@ -434,10 +410,6 @@ namespace _2DGAMELIB
//return result; //return result;
}*/ }*/
static Med() static Med() {}
{
obj = new object();
FPS = 60.0;
}
} }
} }

View File

@@ -276,7 +276,7 @@ namespace _2DGAMELIB
} }
if (EditF || EditTS) if (EditF || EditTS)
{ {
Font = new Font(font.FontFamily, (float)(us * fontSize * Med.DpiY)); Font = new Font(font.FontFamily, (float)(us * fontSize));
EditF = false; EditF = false;
EditTS = false; EditTS = false;
} }
@@ -303,7 +303,7 @@ namespace _2DGAMELIB
double num = Unit * base.Size; double num = Unit * base.Size;
if (EditF || EditS || EditPS || EditTS) if (EditF || EditS || EditPS || EditTS)
{ {
Font = new Font(font.FontFamily, (float)(num * fontSize * Med.DpiY)); Font = new Font(font.FontFamily, (float)(num * fontSize));
EditF = false; EditF = false;
EditTS = false; EditTS = false;
} }

View File

@@ -8,11 +8,9 @@ namespace _2DGAMELIB
public class Sce public class Sce
{ {
private Bitmap Start; private Bitmap Start;
private Graphics GS; private Graphics GS;
private Bitmap End; private Bitmap End;
private Graphics GE; private Graphics GE;
private int w; private int w;
@@ -54,12 +52,12 @@ namespace _2DGAMELIB
public void DrawStart(Are Are) public void DrawStart(Are Are)
{ {
Are.Draw(GS); Are.DrawTo(GS);
} }
public void DrawEnd(Are Are) public void DrawEnd(Are Are)
{ {
Are.Draw(GE); Are.DrawTo(GE);
} }
public void ClearStart(ref Color ClearColor) public void ClearStart(ref Color ClearColor)

View File

@@ -40,10 +40,14 @@ namespace _2DGAMELIB
public GlImage() { } public GlImage() { }
public System.Drawing.Point GetCursorPoint() { public Vector2D GetCursorPoint() {
double x, y; double x, y;
Glfw.GetCursorPosition(window, out x, out y); Glfw.GetCursorPosition(window, out x, out y);
return new System.Drawing.Point((int)x, (int)y); return new Vector2D(x, y);
}
public void SetCursorPoint(Vector2D pos) {
Glfw.SetCursorPosition(window, pos.X, pos.Y);
} }
public MouseButtons GetMouseButtons() { public MouseButtons GetMouseButtons() {
@@ -228,102 +232,4 @@ void main()
vao = gl.GenVertexArray(); vao = gl.GenVertexArray();
} }
} }
/*
public class WPFImage : ElementHost
{
public GlImage gl_img;
private int ByteSize;
private Rectangle rect1;
private Int32Rect rect2;
private BitmapData data;
public WriteableBitmap wb;
private bool HighQuality;
private string ConfigPath = Directory.GetCurrentDirectory() + "\\Config.ini";
public System.Windows.Controls.Image Image => (System.Windows.Controls.Image)base.Child;
public WPFImage()
{
System.Windows.Controls.Image child = new System.Windows.Controls.Image
{
Stretch = Stretch.Uniform
};
base.Child = child;
gl_img = new GlImage();
}
public void PollEvents() {
gl_img.PollEvents();
}
public void ImageSetting()
{
try
{
if (!File.Exists(ConfigPath))
{
HighQuality = false;
}
else
{
string[] source = ConfigPath.ReadLines();
HighQuality = source.First((string s) => s.StartsWith("AntiAliasing:")).Last() == '1';
}
}
catch
{
HighQuality = false;
}
if (HighQuality)
{
RenderOptions.SetBitmapScalingMode(Image, BitmapScalingMode.LowQuality);
}
else
{
RenderOptions.SetBitmapScalingMode(Image, BitmapScalingMode.NearestNeighbor);
}
RenderOptions.SetEdgeMode(Image, EdgeMode.Aliased);
}
[DllImport("Kernel32.dll")]
public static extern void CopyMemory(IntPtr Destination, IntPtr Source, int ByteSize);
//the guy that gets called to update a frame
public void SetBitmap(Bitmap bmp)
{
data = bmp.LockBits(rect1, ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
wb.Lock();
CopyMemory(wb.BackBuffer, data.Scan0, ByteSize);
wb.AddDirtyRect(rect2);
wb.Unlock();
bmp.UnlockBits(data);
gl_img.SetBitmap(bmp);
}
public void BitmapSetting(Bitmap bmp)
{
int pixelWidth = bmp.Width;
int num = bmp.Height;
rect1 = new Rectangle(0, 0, pixelWidth, num);
rect2 = new Int32Rect(0, 0, pixelWidth, num);
wb = new WriteableBitmap(pixelWidth, num, bmp.HorizontalResolution, bmp.VerticalResolution, PixelFormats.Bgra32, null);
ByteSize = wb.BackBufferStride * num;
Image.Source = wb;
gl_img.BitmapSetting(bmp);
}
}
*/
} }

View File

@@ -6,9 +6,9 @@ namespace SlaveMatrix
{ {
private Med Med; private Med Med;
private hd; private TextBubble hd;
public SlaveText(Med Med, hd) public SlaveText(Med Med, TextBubble hd)
{ {
this.Med = Med; this.Med = Med;
this.hd = hd; this.hd = hd;

View File

@@ -6,7 +6,7 @@ using _2DGAMELIB;
namespace SlaveMatrix namespace SlaveMatrix
{ {
public class public class TextBubble
{ {
public bool = true; public bool = true;
@@ -41,7 +41,7 @@ namespace SlaveMatrix
} }
} }
public (Are Are, bool , Font Font, double TextSize, string Text, Color TextColor, Color ShadColor, Color BackColor, double Speed, bool Dis, Color FeedColor, Action<Tex> Action) public TextBubble(Are Are, bool , Font Font, double TextSize, string Text, Color TextColor, Color ShadColor, Color BackColor, double Speed, bool Dis, Color FeedColor, Action<Tex> Action)
{ {
= new (Are.DisUnit); = new (Are.DisUnit);
.SetHitFalse(); .SetHitFalse();
@@ -101,7 +101,7 @@ namespace SlaveMatrix
} }
} }
public (Are Are, bool , Font Font, double TextSize, string Text, Color TextColor, Color ShadColor, Color BackColor, double Speed, bool Dis) public TextBubble(Are Are, bool , Font Font, double TextSize, string Text, Color TextColor, Color ShadColor, Color BackColor, double Speed, bool Dis)
{ {
= new (Are.DisUnit); = new (Are.DisUnit);
.SetHitFalse(); .SetHitFalse();

View File

@@ -6,9 +6,9 @@ namespace SlaveMatrix
{ {
private Med Med; private Med Med;
private hd; private TextBubble hd;
public ViolaText(Med Med, hd) public ViolaText(Med Med, TextBubble hd)
{ {
this.Med = Med; this.Med = Med;
this.hd = hd; this.hd = hd;

View File

@@ -117,8 +117,10 @@ namespace SlaveMatrix
調UI..C = 0.0; 調UI..C = 0.0;
if (Med.Mode == "Training") if (Med.Mode == "Training")
{ {
//TODO fix? //~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
Med.CursorPosition = Med.FromBasePosition(.Ele.B);
} }
.Start(); .Start();
if (調UI..Xi == 5) if (調UI..Xi == 5)
@@ -165,8 +167,10 @@ namespace SlaveMatrix
調UI..C = 0.0; 調UI..C = 0.0;
if (Med.Mode == "Training") if (Med.Mode == "Training")
{ {
//TODO fix? //~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
Med.CursorPosition = Med.FromBasePosition(.Ele.B);
} }
.Start(); .Start();
if (調UI..Xi == 2) if (調UI..Xi == 2)
@@ -202,8 +206,11 @@ namespace SlaveMatrix
調UI..B = B; 調UI..B = B;
Addvl(ref ); Addvl(ref );
= true; = true;
//TODO fix? //~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
Med.CursorPosition = Med.FromBasePosition(.Ele.B);
si2(); si2();
} }
@@ -216,8 +223,10 @@ namespace SlaveMatrix
Bod..C = Dat.Vec2DZero; Bod..C = Dat.Vec2DZero;
if (Med.Mode == "Training") if (Med.Mode == "Training")
{ {
//TODO fix? //~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
Med.CursorPosition = Med.FromBasePosition(.Ele.B);
} }
} }
@@ -259,8 +268,10 @@ namespace SlaveMatrix
Isくぱぁ = false; Isくぱぁ = false;
if (Med.Mode == "Training") if (Med.Mode == "Training")
{ {
//TODO fix? //~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
Med.CursorPosition = Med.FromBasePosition(.Ele.B);
} }
if (cd.c == ContactType.Crotch) if (cd.c == ContactType.Crotch)
{ {

View File

@@ -591,7 +591,6 @@ namespace SlaveMatrix
X1Y4_血管下CP = new ColorP(X1Y4_血管下, CD, DisUnit, abj: true); X1Y4_血管下CP = new ColorP(X1Y4_血管下, CD, DisUnit, abj: true);
= e.; = e.;
AreM = new AreM(Med.Unit, 3.0, 7.0, 0.07, Med.DisQuality, Med.HitAccuracy, 0.45); AreM = new AreM(Med.Unit, 3.0, 7.0, 0.07, Med.DisQuality, Med.HitAccuracy, 0.45);
AreM.Setting();
AreM.BasePoint = new Vector2D(0.5, 0.1); AreM.BasePoint = new Vector2D(0.5, 0.1);
X0Y0_陰嚢.BasePointBase = X0Y0_陰嚢.ToLocal(X0Y0_陰茎.ToGlobal(X0Y0_陰茎.JP[3].Joint)); X0Y0_陰嚢.BasePointBase = X0Y0_陰嚢.ToLocal(X0Y0_陰茎.ToGlobal(X0Y0_陰茎.JP[3].Joint));
X0Y1_陰嚢.BasePointBase = X0Y1_陰嚢.ToLocal(X0Y1_陰茎.ToGlobal(X0Y1_陰茎.JP[3].Joint)); X0Y1_陰嚢.BasePointBase = X0Y1_陰嚢.ToLocal(X0Y1_陰茎.ToGlobal(X0Y1_陰茎.JP[3].Joint));

View File

@@ -483,8 +483,11 @@ namespace SlaveMatrix
{ {
.End(); .End();
} }
//TODO fix? //~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
Med.CursorPosition = Med.FromBasePosition(.Ele.B);
調UI...Start(); 調UI...Start();
vc = Dat.Vec2DZero; vc = Dat.Vec2DZero;
Bod._人.C = vc; Bod._人.C = vc;

View File

@@ -88,8 +88,10 @@ namespace SlaveMatrix
{ {
if (Is吸付) if (Is吸付)
{ {
//TODO fix? //~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置));
Med.CursorPosition = Med.FromBasePosition(.Ele.);
} }
else if (Is舐め) else if (Is舐め)
{ {

View File

@@ -1234,7 +1234,6 @@ namespace SlaveMatrix
X3Y5_尿道CP = new ColorP(X3Y5_尿道, 尿CD, DisUnit, abj: true); X3Y5_尿道CP = new ColorP(X3Y5_尿道, 尿CD, DisUnit, abj: true);
X3Y5_膣口CP = new ColorP(X3Y5_膣口, CD, DisUnit, abj: true); X3Y5_膣口CP = new ColorP(X3Y5_膣口, CD, DisUnit, abj: true);
AreM = new AreM(Med.Unit, 1.0, 1.0, 0.024, Med.DisQuality, Med.HitAccuracy, 0.1); AreM = new AreM(Med.Unit, 1.0, 1.0, 0.024, Med.DisQuality, Med.HitAccuracy, 0.1);
AreM.Setting();
AreM.BasePoint = new Vector2D(0.5, 0.5); AreM.BasePoint = new Vector2D(0.5, 0.5);
AreMPos = AreM.GetPosition(ref AreM.BasePoint); AreMPos = AreM.GetPosition(ref AreM.BasePoint);
= e.; = e.;

View File

@@ -1234,7 +1234,6 @@ namespace SlaveMatrix
X3Y5_尿道CP = new ColorP(X3Y5_尿道, 尿CD, DisUnit, abj: true); X3Y5_尿道CP = new ColorP(X3Y5_尿道, 尿CD, DisUnit, abj: true);
X3Y5_膣口CP = new ColorP(X3Y5_膣口, CD, DisUnit, abj: true); X3Y5_膣口CP = new ColorP(X3Y5_膣口, CD, DisUnit, abj: true);
AreM = new AreM(Med.Unit, 1.0, 1.0, 0.024, Med.DisQuality, Med.HitAccuracy, 0.1); AreM = new AreM(Med.Unit, 1.0, 1.0, 0.024, Med.DisQuality, Med.HitAccuracy, 0.1);
AreM.Setting();
AreM.BasePoint = new Vector2D(0.5, 0.5); AreM.BasePoint = new Vector2D(0.5, 0.5);
AreMPos = AreM.GetPosition(ref AreM.BasePoint); AreMPos = AreM.GetPosition(ref AreM.BasePoint);
= e.; = e.;

View File

@@ -1,3 +1,4 @@
using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using _2DGAMELIB; using _2DGAMELIB;
@@ -616,8 +617,11 @@ namespace SlaveMatrix
if (調UI.SubFocus.Contains(this)) if (調UI.SubFocus.Contains(this))
{ {
vr = cp; vr = cp;
xr = (or.X - vr.X) * -0.008;
yr = (or.Y - vr.Y) * -0.008; //TODO Check if this works?
Vector2D px_diff = Med.FromBasePosition(or - vr);
xr = px_diff.X * -0.008;
yr = px_diff.Y * -0.008;
if ( == ContactType.Vagina) if ( == ContactType.Vagina)
{ {
= yr * Player.; = yr * Player.;
@@ -947,15 +951,20 @@ namespace SlaveMatrix
return; return;
} }
//TODO fix? //~~TODO~~ fix?
//v = (挿抜モーション.Run ? cp : _2DGAMELIB._Con.ToVector2D(Cursor.Position)); //v = (挿抜モーション.Run ? cp : _2DGAMELIB._Con.ToVector2D(Cursor.Position));
v = cp; v = (.Run ? cp : Med.CursorPosition);
System.Diagnostics.Debug.WriteLine("cursor pos: {0} {1}", Med.CursorPosition.X, Med.CursorPosition.Y);
if (調UI.Focus == || .Run) if (調UI.Focus == || .Run)
{ {
if (Isモード) if (Isモード)
{ {
x = (o.X - v.X) * 0.008; Vector2D px_diff = Med.FromBasePosition(o - v);
y = (o.Y - v.Y) * 0.008; x = px_diff.X * 0.008;
y = px_diff.Y * 0.008;
System.Diagnostics.Debug.WriteLine("x y diffs: {0} {1}", x, y);
if (Is挿入) if (Is挿入)
{ {
.Ele.C = (100.0 * x).Clamp(-5.0, 5.0); .Ele.C = (100.0 * x).Clamp(-5.0, 5.0);
@@ -967,15 +976,20 @@ namespace SlaveMatrix
Player.(); Player.();
Player.(); Player.();
(); ();
if (mb != MouseButtons.Left && .Ele.Yi == 0 && o.Y < v.Y && !.Run)
//if (mb != MouseButtons.Left && 対象.Ele.Yi == 0 && o.Y < v.Y && !挿抜モーション.Run)
if (mb != MouseButtons.Left && .Ele.Yi == 0 && o.Y > v.Y && !.Run)
{ {
調UI.Action(ContactType.Mouth, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false); 調UI.Action(ContactType.Mouth, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false);
Player.(); Player.();
Player.(); Player.();
(); ();
(); ();
//TODO fix?
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
Med.CursorPosition = Med.FromBasePosition(.Ele.B);
1(); 1();
if (調UI...Run) if (調UI...Run)
{ {
@@ -1009,15 +1023,19 @@ namespace SlaveMatrix
Player.(); Player.();
Player.(); Player.();
(); ();
if (mb != MouseButtons.Left && .Ele.Yi == 0 && o.Y < v.Y && !.Run) //if (mb != MouseButtons.Left && 対象.Ele.Yi == 0 && o.Y < v.Y && !挿抜モーション.Run)
if (mb != MouseButtons.Left && .Ele.Yi == 0 && o.Y > v.Y && !.Run)
{ {
調UI.Action(ContactType.Anal, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false); 調UI.Action(ContactType.Anal, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false);
Player.(); Player.();
Player.(); Player.();
(); ();
(); ();
//TODO fix?
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
Med.CursorPosition = Med.FromBasePosition(.Ele.B);
1(); 1();
if (調UI..) if (調UI..)
{ {
@@ -1041,15 +1059,20 @@ namespace SlaveMatrix
Player.(); Player.();
Player.(); Player.();
(); ();
if (mb != MouseButtons.Left && (Bod._表示 ? (dy == 0) : (.Ele.Yi == 0)) && o.Y < v.Y && !.Run)
//if (mb != MouseButtons.Left && (Bod.断面_表示 ? (dy == 0) : (対象.Ele.Yi == 0)) && o.Y < v.Y && !挿抜モーション.Run)
if (mb != MouseButtons.Left && (Bod._表示 ? (dy == 0) : (.Ele.Yi == 0)) && o.Y > v.Y && !.Run)
{ {
調UI.Action(ContactType.Vagina, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false); 調UI.Action(ContactType.Vagina, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false);
Player.(); Player.();
Player.(); Player.();
(); ();
(); ();
//TODO fix?
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
Med.CursorPosition = Med.FromBasePosition(.Ele.B);
1(); 1();
if (調UI..) if (調UI..)
{ {
@@ -1073,15 +1096,18 @@ namespace SlaveMatrix
Player.(); Player.();
Player.(); Player.();
(); ();
if (mb != MouseButtons.Left && .Ele.Yi == 0 && o.Y < v.Y && !.Run) //if (mb != MouseButtons.Left && 対象.Ele.Yi == 0 && o.Y < v.Y && !挿抜モーション.Run)
if (mb != MouseButtons.Left && .Ele.Yi == 0 && o.Y > v.Y && !.Run)
{ {
調UI.Action(ContactType.Thread, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false); 調UI.Action(ContactType.Thread, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false);
Player.(); Player.();
Player.(); Player.();
(); ();
(); ();
//TODO fix? //~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
Med.CursorPosition = Med.FromBasePosition(.Ele.B);
1(); 1();
if (調UI..) if (調UI..)
{ {
@@ -1368,8 +1394,9 @@ namespace SlaveMatrix
else if (調UI.Focus != 調UI.CM && !Isモード) else if (調UI.Focus != 調UI.CM && !Isモード)
{ {
(); ();
//TODO fix? //~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
Med.CursorPosition = Med.FromBasePosition(.Ele.B);
調UI.(); 調UI.();
} }
} }

View File

@@ -40,7 +40,7 @@ namespace SlaveMatrix
} }
} }
public void (Are Are) public void Draw(Are Are)
{ {
c = 0; c = 0;
for (y = 0; y < 10; y++) for (y = 0; y < 10; y++)

View File

@@ -39,7 +39,6 @@ namespace SlaveMatrix
public EleI(Med Med) public EleI(Med Med)
{ {
Lay = new Are(Med.Unit, Med.Base.XRatio, Med.Base.YRatio, Med.Base.Size + 0.0025, Med.DisQuality, Med.HitAccuracy); Lay = new Are(Med.Unit, Med.Base.XRatio, Med.Base.YRatio, Med.Base.Size + 0.0025, Med.DisQuality, Med.HitAccuracy);
Lay.Setting();
ElesH = new HashSet<Ele>(); ElesH = new HashSet<Ele>();
} }

View File

@@ -139,7 +139,8 @@ namespace SlaveMatrix
private static InfoPanel ip; private static InfoPanel ip;
private static Buts dbs; private static Buts dbs;
private static Lab npl; private static Lab npl;
public static TextBubble ViolaTextBubble;
public static TextBubble SlaveTextBubble;
//misc character stuff //misc character stuff
@@ -147,9 +148,6 @@ namespace SlaveMatrix
private static Cha Viola; private static Cha Viola;
public static ViolaText ViolaText; public static ViolaText ViolaText;
public static SlaveText SlaveText; public static SlaveText SlaveText;
public static ;
public static ;
//buffers //buffers
@@ -199,7 +197,6 @@ namespace SlaveMatrix
public static bool SDShow; public static bool SDShow;
public static bool save; public static bool save;
public static bool title; public static bool title;
private static bool fade_in;
public static int MaxRoomNumber => 135; public static int MaxRoomNumber => 135;
@@ -213,21 +210,15 @@ namespace SlaveMatrix
//setup buffers //setup buffers
drawArea = new Are(Med, Hit: false); drawArea = new Are(Med, Hit: false);
drawArea.Setting();
DrawBuffer = new Are(Med, Hit: true); DrawBuffer = new Are(Med, Hit: true);
DrawBuffer.Setting();
BlackBackground = new Are(Med, Hit: true); BlackBackground = new Are(Med, Hit: true);
BlackBackground.Setting();
BlackBackground.Clear(Col.Black); BlackBackground.Clear(Col.Black);
BasementBackground = new Are(Med, Hit: true); BasementBackground = new Are(Med, Hit: true);
BasementBackground.Setting();
BasementBackground.GD.DrawImage(new Bitmap(new MemoryStream(Resources.dangeon01_ex2)), BasementBackground.Dis.GetRect()); BasementBackground.GD.DrawImage(new Bitmap(new MemoryStream(Resources.dangeon01_ex2)), BasementBackground.Dis.GetRect());
OfficeBackground = new Are(Med, Hit: true); OfficeBackground = new Are(Med, Hit: true);
OfficeBackground.Setting();
OfficeBackground.GD.DrawImage(new Bitmap(new MemoryStream(Resources.li_room10a_c_ex2)), OfficeBackground.Dis.GetRect()); OfficeBackground.GD.DrawImage(new Bitmap(new MemoryStream(Resources.li_room10a_c_ex2)), OfficeBackground.Dis.GetRect());
SaveData = new ListView( SaveData = new ListView(
@@ -276,10 +267,7 @@ namespace SlaveMatrix
ip.UpdateSub2(); ip.UpdateSub2();
//note: removed 50ms timeout -- could add back with mot... //note: removed 50ms timeout -- could add back with mot...
Med.InvokeL(delegate
{
Med.SwitchMode("PlayerInformation", DrawBuffer, PlayerInformationSliders); Med.SwitchMode("PlayerInformation", DrawBuffer, PlayerInformationSliders);
});
} }
})); }));
dbs.Add("タイトル", MyUI.Button(Med, DrawBuffer, "Title", new Vector2D(x, y), delegate dbs.Add("タイトル", MyUI.Button(Med, DrawBuffer, "Title", new Vector2D(x, y), delegate
@@ -358,7 +346,7 @@ namespace SlaveMatrix
ip.SetHitColor(Med); ip.SetHitColor(Med);
= new ( ViolaTextBubble = new TextBubble(
DrawBuffer, DrawBuffer,
: false, : false,
new Font("MS Gothic", 1f), new Font("MS Gothic", 1f),
@@ -372,10 +360,10 @@ namespace SlaveMatrix
Col.White, Col.White,
delegate{} delegate{}
); );
.SetHitColor(Med); ViolaTextBubble.SetHitColor(Med);
= new ( SlaveTextBubble = new TextBubble(
DrawBuffer, DrawBuffer,
: false, : false,
new Font("MS Gothic", 1f), new Font("MS Gothic", 1f),
@@ -387,11 +375,11 @@ namespace SlaveMatrix
19.0, 19.0,
Dis: true Dis: true
); );
.SetHitColor(Med); SlaveTextBubble.SetHitColor(Med);
si = new SubInfo(Med, ip); si = new SubInfo(Med, ip);
ViolaText = new ViolaText(Med, ); ViolaText = new ViolaText(Med, ViolaTextBubble);
SlaveText = new SlaveText(Med, ); SlaveText = new SlaveText(Med, SlaveTextBubble);
npl = new Lab( npl = new Lab(
DrawBuffer, DrawBuffer,
"ラベル1", "ラベル1",
@@ -515,12 +503,12 @@ namespace SlaveMatrix
{ {
TrainingTarget.Dispose(); TrainingTarget.Dispose();
} }
.Dispose(); SlaveTextBubble.Dispose();
if (Viola != null) if (Viola != null)
{ {
Viola.Dispose(); Viola.Dispose();
} }
.Dispose(); ViolaTextBubble.Dispose();
SaveData.Dispose(); SaveData.Dispose();
ip.Dispose(); ip.Dispose();
dbs.Dispose(); dbs.Dispose();
@@ -531,6 +519,7 @@ namespace SlaveMatrix
//would really prefer not to have these here... //would really prefer not to have these here...
private static bool fade_in;
static MotV mv = new MotV(0.0, 1.0) static MotV mv = new MotV(0.0, 1.0)
{ {
BaseSpeed = 2.0 BaseSpeed = 2.0
@@ -567,15 +556,17 @@ namespace SlaveMatrix
{ {
Med.Mode = Mode; Med.Mode = Mode;
(drawArea, Med.FPSF); (drawArea, Med.FPSF);
Med.DrawStart(Are); Med.Sce.DrawStart(Are);
Med.DrawEnd(drawArea); Med.Sce.DrawEnd(drawArea);
fade_in = true; fade_in = true;
} }
public static void flash(this Med Med) public static void flash(this Med Med)
{ {
調(drawArea, Med.FPSF); 調(drawArea, Med.FPSF);
Med.ClearSta(Color.FromArgb(128, Color.White)); Color col = Color.FromArgb(128, Color.White);
Med.DrawEnd(drawArea); Med.Sce.ClearStart(ref col);
Med.Sce.DrawEnd(drawArea);
fade_in = true; fade_in = true;
} }
@@ -670,9 +661,8 @@ namespace SlaveMatrix
Cha d = Viola; Cha d = Viola;
Viola = new Cha(Med, DrawBuffer, Sta.GameData..ChaD); Viola = new Cha(Med, DrawBuffer, Sta.GameData..ChaD);
Viola.Set衣装(Sta.GameData..); Viola.Set衣装(Sta.GameData..);
.(Viola.Bod.._接続点); ViolaTextBubble.(Viola.Bod.._接続点);
Med.InvokeL(delegate
{
Initialize(); Initialize();
if (d != null) if (d != null)
{ {
@@ -701,7 +691,7 @@ namespace SlaveMatrix
Sta.GameData.Slaves = array; Sta.GameData.Slaves = array;
} }
//Med.InvokeL(Sounds.完了.Play); //Med.InvokeL(Sounds.完了.Play);
});
} }
public static void SetJSLlv(Med med) public static void SetJSLlv(Med med)
@@ -769,9 +759,8 @@ namespace SlaveMatrix
Cha d = Viola; Cha d = Viola;
Viola = new Cha(med, DrawBuffer, Sta.GameData..ChaD); Viola = new Cha(med, DrawBuffer, Sta.GameData..ChaD);
Viola.Set衣装(Sta.GameData..); Viola.Set衣装(Sta.GameData..);
.(Viola.Bod.._接続点); ViolaTextBubble.(Viola.Bod.._接続点);
med.InvokeL(delegate
{
Initialize(); Initialize();
if (d != null) if (d != null)
{ {
@@ -802,7 +791,6 @@ namespace SlaveMatrix
Sta.GameData.Gen = new Generator[9]; Sta.GameData.Gen = new Generator[9];
Sta.GameData.GenInstance(); Sta.GameData.GenInstance();
//Sounds.完了.Play(); //Sounds.完了.Play();
});
} }
@@ -1098,7 +1086,7 @@ namespace SlaveMatrix
TrainingTarget.Dispose(); TrainingTarget.Dispose();
} }
TrainingTarget = new Cha(Med, DrawBuffer, Sta.GameData.TrainingTarget.ChaD); TrainingTarget = new Cha(Med, DrawBuffer, Sta.GameData.TrainingTarget.ChaD);
.(TrainingTarget.Bod.._接続点); SlaveTextBubble.(TrainingTarget.Bod.._接続点);
Setnpl(u); Setnpl(u);
double d = ((u.Trained && Sta.MoveInsectMask) ? 1.0 : 0.0); double d = ((u.Trained && Sta.MoveInsectMask) ? 1.0 : 0.0);
if (TrainingTarget.Bod.Is顔面) if (TrainingTarget.Bod.Is顔面)
@@ -1197,8 +1185,8 @@ namespace SlaveMatrix
{ {
DrawBuffer.Clear(Col.Black); DrawBuffer.Clear(Col.Black);
DrawBuffer.Draw(label.ParT); DrawBuffer.Draw(label.ParT);
Med.DrawStart(BlackBackground); Med.Sce.DrawStart(BlackBackground);
Med.DrawEnd(DrawBuffer); Med.Sce.DrawEnd(DrawBuffer);
v = 0.0; v = 0.0;
fadeIn = true; fadeIn = true;
fadeOut = false; fadeOut = false;
@@ -1243,8 +1231,8 @@ namespace SlaveMatrix
mv.ResetValue(); mv.ResetValue();
Med.Draw(DrawBuffer); Med.Draw(DrawBuffer);
fadeOut = true; fadeOut = true;
Med.DrawStart(DrawBuffer); Med.Sce.DrawStart(DrawBuffer);
Med.DrawEnd(BlackBackground); Med.Sce.DrawEnd(BlackBackground);
} }
} }
} }
@@ -1317,8 +1305,8 @@ namespace SlaveMatrix
ll = false; ll = false;
DrawBuffer.Clear(Col.Black); DrawBuffer.Clear(Col.Black);
DrawBuffer.Draw(label.ParT); DrawBuffer.Draw(label.ParT);
Med.DrawStart(BlackBackground); Med.Sce.DrawStart(BlackBackground);
Med.DrawEnd(DrawBuffer); Med.Sce.DrawEnd(DrawBuffer);
v = 0.0; v = 0.0;
b1 = true; b1 = true;
mv.ResetValue(); mv.ResetValue();
@@ -1649,8 +1637,8 @@ namespace SlaveMatrix
{ {
調 BackgroundDrawing = new 調(); 調 BackgroundDrawing = new 調();
Are TrainingBackground = new Are(Med, Hit: false); Are TrainingBackground = new Are(Med, Hit: false);
TrainingBackground.Setting();
TrainingBackground.GD.Clear(Color.Gray); TrainingBackground.GD.Clear(Color.Gray);
Player.UI = new TrainingUI(Med, DrawBuffer, ip); Player.UI = new TrainingUI(Med, DrawBuffer, ip);
Player.UI.調.Action = delegate Player.UI.調.Action = delegate
{ {
@@ -1713,7 +1701,7 @@ namespace SlaveMatrix
} }
a.Draw(TrainingBackground); a.Draw(TrainingBackground);
TrainingTarget.Draw(a, FPS); TrainingTarget.Draw(a, FPS);
.Draw(a, FPS); SlaveTextBubble.Draw(a, FPS);
Player.UI.StaDraw(a, FPS); Player.UI.StaDraw(a, FPS);
ip.Draw(a, FPS); ip.Draw(a, FPS);
Med.Draw(a); Med.Draw(a);
@@ -1725,8 +1713,8 @@ namespace SlaveMatrix
SlaveText.Set状態(); SlaveText.Set状態();
if (TrainingTarget.Bod.Is顔面) if (TrainingTarget.Bod.Is顔面)
{ {
Action<Tex> o_done = .Tex.Done; Action<Tex> o_done = SlaveTextBubble.Tex.Done;
.Tex.Done = delegate (Tex tex) SlaveTextBubble.Tex.Done = delegate (Tex tex)
{ {
o_done(tex); o_done(tex);
TrainingTarget..Start(); TrainingTarget..Start();
@@ -1742,13 +1730,12 @@ namespace SlaveMatrix
TrainingTarget.Draw(a, FPS); TrainingTarget.Draw(a, FPS);
}; };
return new Module { return new Module {
Setting = delegate Setting = delegate
{ {
TrainingBackground.GD.Clear(Color.Gray); TrainingBackground.GD.Clear(Color.Gray);
BackgroundDrawing.Reset(); BackgroundDrawing.Reset();
BackgroundDrawing.(TrainingBackground); BackgroundDrawing.Draw(TrainingBackground);
ip.MaiShow = false; ip.MaiShow = false;
ip.Mai.Feed.Dra = true; ip.Mai.Feed.Dra = true;
ip.Mai2Show = false; ip.Mai2Show = false;
@@ -1784,7 +1771,7 @@ namespace SlaveMatrix
} }
TrainingTarget.Bod.Join(); TrainingTarget.Bod.Join();
TrainingTarget.Bod.Update(); TrainingTarget.Bod.Update();
.(); SlaveTextBubble.();
TrainingTarget.Bod. = 1.0; TrainingTarget.Bod. = 1.0;
調 = true; 調 = true;
TrainingTargetTrained = Sta.GameData.TrainingTarget.Trained; TrainingTargetTrained = Sta.GameData.TrainingTarget.Trained;
@@ -1999,8 +1986,8 @@ namespace SlaveMatrix
TrainingTarget.Bod. = null; TrainingTarget.Bod. = null;
TrainingTarget.Bod.Join(); TrainingTarget.Bod.Join();
TrainingTarget.Bod.Update(); TrainingTarget.Bod.Update();
.(); SlaveTextBubble.();
..End(); SlaveTextBubble..End();
Result2 = false; Result2 = false;
Result3 = false; Result3 = false;
si.Set(bre: false); si.Set(bre: false);
@@ -3844,7 +3831,7 @@ namespace SlaveMatrix
ip.Mai2Show = false; ip.Mai2Show = false;
ip.SubShow = true; ip.SubShow = true;
ip.Sub2Show = true; ip.Sub2Show = true;
.Tex.Feed.Dra = false; ViolaTextBubble.Tex.Feed.Dra = false;
bs["ボタン1"].Dra = !Sta.GameData.; bs["ボタン1"].Dra = !Sta.GameData.;
bs["ボタン3"].Dra = Sta.GameData.RepaymentStage == 3; bs["ボタン3"].Dra = Sta.GameData.RepaymentStage == 3;
Viola._見つめ(); Viola._見つめ();
@@ -3903,8 +3890,8 @@ namespace SlaveMatrix
a.GH.Clear(Col.Transparent); a.GH.Clear(Col.Transparent);
} }
a.Draw(OfficeBackground); a.Draw(OfficeBackground);
//Viola.Draw(a, FPS); Viola.Draw(a, FPS);
.Draw(a, FPS); ViolaTextBubble.Draw(a, FPS);
bs.Draw(a); bs.Draw(a);
dbs.Draw(a); dbs.Draw(a);
ip.Draw(a, FPS); ip.Draw(a, FPS);
@@ -4308,7 +4295,7 @@ namespace SlaveMatrix
case MouseButtons.Left: case MouseButtons.Left:
if (!ip.) if (!ip.)
{ {
.Down(.GetHitColor); ViolaTextBubble.Down(ViolaTextBubble.GetHitColor);
dbs.Down(ref hc); dbs.Down(ref hc);
bs.Down(ref hc); bs.Down(ref hc);
} }
@@ -4337,7 +4324,7 @@ namespace SlaveMatrix
{ {
if (!ip.) if (!ip.)
{ {
.Up(.GetHitColor); ViolaTextBubble.Up(ViolaTextBubble.GetHitColor);
dbs.Up(ref hc); dbs.Up(ref hc);
bs.Up(ref hc); bs.Up(ref hc);
} }
@@ -4412,8 +4399,8 @@ namespace SlaveMatrix
a.GH.Clear(Col.Transparent); a.GH.Clear(Col.Transparent);
} }
a.Draw(OfficeBackground); a.Draw(OfficeBackground);
//Viola.Draw(a, FPS); Viola.Draw(a, FPS);
.Draw(a, FPS); ViolaTextBubble.Draw(a, FPS);
bs.Draw(a); bs.Draw(a);
dbs.Draw(a); dbs.Draw(a);
ip.Draw(a, FPS); ip.Draw(a, FPS);
@@ -5129,22 +5116,8 @@ namespace SlaveMatrix
{ {
Module mod = new Module(); Module mod = new Module();
Buts bs = new Buts(); Buts bs = new Buts();
ParT parT = new ParT();
parT.Font = new Font("MS Gothic", 0.1f); bs.Add("ボタン0", MyUI.Button2(Med, DrawBuffer, GameText., new Vector2D(0.85, 0.02), delegate
parT.PositionBase = DrawBuffer.GetPosition(0.85, 0.02);
parT.Text = GameText.;
parT.FontSize = 0.15;
parT.SizeBase = 0.05;
parT.OP.AddRange(new Out[1] { Shas.GetSquare() });
parT.OP.ScalingY(parT.OP.GetCenter(), 0.47);
parT.OP.Rotation(parT.OP.GetCenter(), -26.0);
parT.Closed = true;
parT.TextColor = Col.White;
parT.BrushColor = Color.FromArgb(160, Col.Black);
parT.ShadBrush = new SolidBrush(Color.FromArgb(64, Col.Black));
parT.StringFormat.Alignment = StringAlignment.Center;
parT.StringFormat.LineAlignment = StringAlignment.Center;
bs.Add("ボタン0", new But1(parT, delegate
{ {
//Sounds.操作.Play(); //Sounds.操作.Play();
if (Sta.GameData.) if (Sta.GameData.)
@@ -5156,48 +5129,22 @@ namespace SlaveMatrix
Med.Mode = "Office"; Med.Mode = "Office";
} }
})); }));
ParT parT2 = new ParT();
parT2.Font = new Font("MS Gothic", 0.1f); bs.Add("ボタン1", MyUI.Button2(Med, DrawBuffer, GameText., new Vector2D(0.85, 0.1), delegate
parT2.PositionBase = DrawBuffer.GetPosition(0.85, 0.1);
parT2.Text = GameText.;
parT2.FontSize = 0.15;
parT2.SizeBase = 0.05;
parT2.OP.AddRange(new Out[1] { Shas.GetSquare() });
parT2.OP.ScalingY(parT2.OP.GetCenter(), 0.47);
parT2.OP.Rotation(parT2.OP.GetCenter(), -26.0);
parT2.Closed = true;
parT2.TextColor = Col.White;
parT2.BrushColor = Color.FromArgb(160, Col.Black);
parT2.ShadBrush = new SolidBrush(Color.FromArgb(64, Col.Black));
parT2.StringFormat.Alignment = StringAlignment.Center;
parT2.StringFormat.LineAlignment = StringAlignment.Center;
bs.Add("ボタン1", new But1(parT2, delegate
{ {
//Sounds.操作.Play(); //Sounds.操作.Play();
Med.Mode = "SlaveShop"; Med.Mode = "SlaveShop";
})); }));
ParT parT3 = new ParT();
parT3.Font = new Font("MS Gothic", 0.1f); //TODO: fix
parT3.PositionBase = DrawBuffer.GetPosition(0.85, 0.18); //parT3.PenColor = Color.Red;
parT3.Text = GameText.; bs.Add("ボタン2", MyUI.Button2(Med, DrawBuffer, GameText., new Vector2D(0.85, 0.1), delegate
parT3.FontSize = 0.15;
parT3.SizeBase = 0.05;
parT3.OP.AddRange(new Out[1] { Shas.GetSquare() });
parT3.OP.ScalingY(parT3.OP.GetCenter(), 0.47);
parT3.OP.Rotation(parT3.OP.GetCenter(), -26.0);
parT3.Closed = true;
parT3.TextColor = Col.White;
parT3.BrushColor = Color.FromArgb(160, Col.Black);
parT3.ShadBrush = new SolidBrush(Color.FromArgb(64, Col.Black));
parT3.StringFormat.Alignment = StringAlignment.Center;
parT3.StringFormat.LineAlignment = StringAlignment.Center;
parT3.PenColor = Color.Red;
bs.Add("ボタン2", new But1(parT3, delegate
{ {
//Sounds.操作.Play(); //Sounds.操作.Play();
Med.Mode = "ToolShop"; Med.Mode = "ToolShop";
})); }));
bs.SetHitColor(Med); bs.SetHitColor(Med);
ListView lv = null; ListView lv = null;
Action<But, int, ulong> buy = delegate(But but, int ind, ulong pri) Action<But, int, ulong> buy = delegate(But but, int ind, ulong pri)
{ {
@@ -5221,6 +5168,8 @@ namespace SlaveMatrix
ip.SubInfoIm = GameText.; ip.SubInfoIm = GameText.;
} }
}; };
lv = new ListView(DrawBuffer, DrawBuffer.GetPosition(0.01, 0.03), 0.5, new Font("MS Gothic", 1f), 0.07, Col.White, Col.Empty, Color.FromArgb(160, Col.Black), Col.Black, new TA(GameText. + " 35,000,000", delegate(But b) lv = new ListView(DrawBuffer, DrawBuffer.GetPosition(0.01, 0.03), 0.5, new Font("MS Gothic", 1f), 0.07, Col.White, Col.Empty, Color.FromArgb(160, Col.Black), Col.Black, new TA(GameText. + " 35,000,000", delegate(But b)
{ {
buy(b, 0, 35000000uL); buy(b, 0, 35000000uL);
@@ -5290,6 +5239,8 @@ namespace SlaveMatrix
} }
})); }));
lv.SetHitColor(Med); lv.SetHitColor(Med);
Action subinfo = delegate Action subinfo = delegate
{ {
if (lv.bs.EnumBut.Any((But e) => e.Dra)) if (lv.bs.EnumBut.Any((But e) => e.Dra))
@@ -5967,7 +5918,7 @@ namespace SlaveMatrix
mod.Down = delegate mod.Down = delegate
{ {
//TODO uncomment //TODO uncomment
//if (!ip.Mai.IsPlaying && !ip.Sub.IsPlaying && wi == i) if (!ip.Mai.IsPlaying && !ip.Sub.IsPlaying && wi == i)
{ {
i++; i++;
wi = i; wi = i;
@@ -6144,14 +6095,14 @@ namespace SlaveMatrix
ip.yAct = delegate ip.yAct = delegate
{ {
//Sounds.操作.Play(); //Sounds.操作.Play();
.Tex.Done = delegate ViolaTextBubble.Tex.Done = delegate
{ {
//Sounds.精算.Play(); //Sounds.精算.Play();
Sta.GameData. = 5000000000uL; Sta.GameData. = 5000000000uL;
ip.UpdateSub2(); ip.UpdateSub2();
}; };
Viola._不敵0眉上(); Viola._不敵0眉上();
.Text = GameText.; ViolaTextBubble.Text = GameText.;
ip.Text = GameText.6; ip.Text = GameText.6;
ip.SubInfo = GameText.; ip.SubInfo = GameText.;
if (i == 10) if (i == 10)
@@ -6168,14 +6119,14 @@ namespace SlaveMatrix
ip.nAct = delegate ip.nAct = delegate
{ {
//Sounds.操作.Play(); //Sounds.操作.Play();
.Tex.Done = delegate ViolaTextBubble.Tex.Done = delegate
{ {
//Sounds.精算.Play(); //Sounds.精算.Play();
Sta.GameData. = 5000000000uL; Sta.GameData. = 5000000000uL;
ip.UpdateSub2(); ip.UpdateSub2();
}; };
Viola._素1(); Viola._素1();
.Text = GameText. + "\r\n" + GameText.; ViolaTextBubble.Text = GameText. + "\r\n" + GameText.;
ip.Text = GameText.6; ip.Text = GameText.6;
ip.SubInfo = GameText.; ip.SubInfo = GameText.;
if (i == 10) if (i == 10)
@@ -6194,9 +6145,9 @@ namespace SlaveMatrix
mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc) mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc)
{ {
ip.DownB(ref hc); ip.DownB(ref hc);
if (!.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying) if (!ViolaTextBubble.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying)
{ {
if (wi == i && i != 10 && .Tex.Done == null) if (wi == i && i != 10 && ViolaTextBubble.Tex.Done == null)
{ {
i++; i++;
wi = i; wi = i;
@@ -6204,16 +6155,16 @@ namespace SlaveMatrix
{ {
if (i == 10) if (i == 10)
{ {
.Tex.Done = d; ViolaTextBubble.Tex.Done = d;
} }
else else
{ {
.Tex.Done = null; ViolaTextBubble.Tex.Done = null;
} }
if (i != 11) if (i != 11)
{ {
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
} }
@@ -6228,7 +6179,7 @@ namespace SlaveMatrix
i += 2; i += 2;
wi = i; wi = i;
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
} }
@@ -6250,11 +6201,11 @@ namespace SlaveMatrix
Sta.GameData..SetViola(Med, DrawBuffer); Sta.GameData..SetViola(Med, DrawBuffer);
Viola = new Cha(Med, DrawBuffer, Sta.GameData..ChaD); Viola = new Cha(Med, DrawBuffer, Sta.GameData..ChaD);
Viola.Set衣装(Sta.GameData..); Viola.Set衣装(Sta.GameData..);
.(Viola.Bod.._接続点); ViolaTextBubble.(Viola.Bod.._接続点);
i = 0; i = 0;
wi = 0; wi = 0;
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
@@ -6264,8 +6215,8 @@ namespace SlaveMatrix
DrawOP1 = delegate(Are a, FPS FPS) DrawOP1 = delegate(Are a, FPS FPS)
{ {
a.Draw(OfficeBackground); a.Draw(OfficeBackground);
//Viola.Draw(a, FPS); Viola.Draw(a, FPS);
.Draw(a, FPS); ViolaTextBubble.Draw(a, FPS);
dbs.Draw(a); dbs.Draw(a);
ip.Draw(a, FPS); ip.Draw(a, FPS);
Med.Draw(a); Med.Draw(a);
@@ -6377,14 +6328,14 @@ namespace SlaveMatrix
mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc) mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc)
{ {
ip.DownB(ref hc); ip.DownB(ref hc);
if (!.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying && wi == i) if (!ViolaTextBubble.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying && wi == i)
{ {
i++; i++;
wi = i; wi = i;
if (i < tsp.Length) if (i < tsp.Length)
{ {
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
} }
@@ -6410,7 +6361,7 @@ namespace SlaveMatrix
i = 0; i = 0;
wi = 0; wi = 0;
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
}; };
@@ -6421,8 +6372,8 @@ namespace SlaveMatrix
a.GH.Clear(Col.Transparent); a.GH.Clear(Col.Transparent);
} }
a.Draw(BasementBackground); a.Draw(BasementBackground);
//Viola.Draw(a, FPS); Viola.Draw(a, FPS);
.Draw(a, FPS); ViolaTextBubble.Draw(a, FPS);
dbs.Draw(a); dbs.Draw(a);
ip.Draw(a, FPS); ip.Draw(a, FPS);
Med.Draw(a); Med.Draw(a);
@@ -6537,7 +6488,7 @@ namespace SlaveMatrix
{ {
//Sounds.操作.Play(); //Sounds.操作.Play();
Viola._不敵0眉上(); Viola._不敵0眉上();
.Text = GameText.; ViolaTextBubble.Text = GameText.;
ip.Text = GameText.6; ip.Text = GameText.6;
ip.SubInfo = GameText.; ip.SubInfo = GameText.;
if (i == 1) if (i == 1)
@@ -6555,7 +6506,7 @@ namespace SlaveMatrix
{ {
//Sounds.操作.Play(); //Sounds.操作.Play();
Viola._困り顔1(); Viola._困り顔1();
.Text = GameText.; ViolaTextBubble.Text = GameText.;
ip.Text = GameText.6; ip.Text = GameText.6;
ip.SubInfo = GameText.; ip.SubInfo = GameText.;
if (i == 1) if (i == 1)
@@ -6592,11 +6543,11 @@ namespace SlaveMatrix
//Sounds.弾け.Play(); //Sounds.弾け.Play();
ip.Text = GameText.2; ip.Text = GameText.2;
ip.SubInfo = GameText.; ip.SubInfo = GameText.;
.Text = GameText.; ViolaTextBubble.Text = GameText.;
.Tex.Feed.Dra = true; ViolaTextBubble.Tex.Feed.Dra = true;
Sta.GameData. *= 2.0; Sta.GameData. *= 2.0;
}; };
.Tex.Feed.Dra = false; ViolaTextBubble.Tex.Feed.Dra = false;
Viola.Bod._表示 = true; Viola.Bod._表示 = true;
Viola._閉じ(0); Viola._閉じ(0);
Viola._S字(0); Viola._S字(0);
@@ -6605,7 +6556,7 @@ namespace SlaveMatrix
Viola.Bod.Update(); Viola.Bod.Update();
Viola._素0眉上(); Viola._素0眉上();
//Sounds.変更1.Play(); //Sounds.変更1.Play();
.Text = GameText.3; ViolaTextBubble.Text = GameText.3;
ip.Text = GameText.1; ip.Text = GameText.1;
ip.SubInfo = GameText. + " "; ip.SubInfo = GameText. + " ";
if (i == 6) if (i == 6)
@@ -6623,7 +6574,7 @@ namespace SlaveMatrix
{ {
//Sounds.操作.Play(); //Sounds.操作.Play();
Viola._不敵0(); Viola._不敵0();
.Text = GameText.3 + "\r\n" + GameText.; ViolaTextBubble.Text = GameText.3 + "\r\n" + GameText.;
ip.Text = GameText.6; ip.Text = GameText.6;
ip.SubInfo = GameText.; ip.SubInfo = GameText.;
if (i == 6) if (i == 6)
@@ -6644,9 +6595,9 @@ namespace SlaveMatrix
mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc) mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc)
{ {
ip.DownB(ref hc); ip.DownB(ref hc);
if (!.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying) if (!ViolaTextBubble.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying)
{ {
if (wi == i && i != 1 && i != 6 && .Tex.Done == null) if (wi == i && i != 1 && i != 6 && ViolaTextBubble.Tex.Done == null)
{ {
i++; i++;
wi = i; wi = i;
@@ -6659,20 +6610,20 @@ namespace SlaveMatrix
} }
if (i == 1) if (i == 1)
{ {
.Tex.Done = d1; ViolaTextBubble.Tex.Done = d1;
} }
else if (i == 6) else if (i == 6)
{ {
.Tex.Done = d2; ViolaTextBubble.Tex.Done = d2;
} }
else else
{ {
.Tex.Done = null; ViolaTextBubble.Tex.Done = null;
} }
if (i != 2 && i != 7) if (i != 2 && i != 7)
{ {
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
} }
@@ -6688,7 +6639,7 @@ namespace SlaveMatrix
i += 2; i += 2;
wi = i; wi = i;
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
} }
@@ -6710,14 +6661,14 @@ namespace SlaveMatrix
ip.Mai2Show = false; ip.Mai2Show = false;
ip.SubShow = true; ip.SubShow = true;
ip.Sub2Show = true; ip.Sub2Show = true;
.Tex.Feed.Dra = true; ViolaTextBubble.Tex.Feed.Dra = true;
Viola._見つめ(); Viola._見つめ();
Viola._基本0(); Viola._基本0();
Viola.Set基本姿勢(); Viola.Set基本姿勢();
i = 0; i = 0;
wi = 0; wi = 0;
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
}; };
@@ -6728,8 +6679,8 @@ namespace SlaveMatrix
a.GH.Clear(Col.Transparent); a.GH.Clear(Col.Transparent);
} }
a.Draw(OfficeBackground); a.Draw(OfficeBackground);
//Viola.Draw(a, FPS); Viola.Draw(a, FPS);
.Draw(a, FPS); ViolaTextBubble.Draw(a, FPS);
dbs.Draw(a); dbs.Draw(a);
ip.Draw(a, FPS); ip.Draw(a, FPS);
Med.Draw(a); Med.Draw(a);
@@ -6785,14 +6736,14 @@ namespace SlaveMatrix
mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc) mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc)
{ {
ip.DownB(ref hc); ip.DownB(ref hc);
if (!.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying && wi == i) if (!ViolaTextBubble.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying && wi == i)
{ {
i++; i++;
wi = i; wi = i;
if (i < tsp.Length) if (i < tsp.Length)
{ {
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
} }
@@ -6818,14 +6769,14 @@ namespace SlaveMatrix
ip.Mai2Show = false; ip.Mai2Show = false;
ip.SubShow = true; ip.SubShow = true;
ip.Sub2Show = true; ip.Sub2Show = true;
.Tex.Feed.Dra = true; ViolaTextBubble.Tex.Feed.Dra = true;
Viola._見つめ(); Viola._見つめ();
Viola._基本0(); Viola._基本0();
Viola.Set基本姿勢(); Viola.Set基本姿勢();
i = 0; i = 0;
wi = 0; wi = 0;
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
}; };
@@ -6836,8 +6787,8 @@ namespace SlaveMatrix
a.GH.Clear(Col.Transparent); a.GH.Clear(Col.Transparent);
} }
a.Draw(OfficeBackground); a.Draw(OfficeBackground);
//Viola.Draw(a, FPS); Viola.Draw(a, FPS);
.Draw(a, FPS); ViolaTextBubble.Draw(a, FPS);
dbs.Draw(a); dbs.Draw(a);
ip.Draw(a, FPS); ip.Draw(a, FPS);
Med.Draw(a); Med.Draw(a);
@@ -6893,14 +6844,14 @@ namespace SlaveMatrix
mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc) mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc)
{ {
ip.DownB(ref hc); ip.DownB(ref hc);
if (!.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying && wi == i) if (!ViolaTextBubble.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying && wi == i)
{ {
i++; i++;
wi = i; wi = i;
if (i < tsp.Length) if (i < tsp.Length)
{ {
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
} }
@@ -6932,14 +6883,14 @@ namespace SlaveMatrix
ip.Mai2Show = false; ip.Mai2Show = false;
ip.SubShow = true; ip.SubShow = true;
ip.Sub2Show = true; ip.Sub2Show = true;
.Tex.Feed.Dra = true; ViolaTextBubble.Tex.Feed.Dra = true;
Viola._見つめ(); Viola._見つめ();
Viola._基本0(); Viola._基本0();
Viola.Set基本姿勢(); Viola.Set基本姿勢();
i = 0; i = 0;
wi = 0; wi = 0;
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
}; };
@@ -7090,7 +7041,7 @@ namespace SlaveMatrix
yes = true; yes = true;
//Sounds.操作.Play(); //Sounds.操作.Play();
Viola._基本1眉上(); Viola._基本1眉上();
.Text = GameText.; ViolaTextBubble.Text = GameText.;
ip.Text = GameText.6; ip.Text = GameText.6;
ip.SubInfo = GameText.; ip.SubInfo = GameText.;
if (i == 2) if (i == 2)
@@ -7109,7 +7060,7 @@ namespace SlaveMatrix
yes = false; yes = false;
//Sounds.操作.Play(); //Sounds.操作.Play();
Viola._不敵0(); Viola._不敵0();
.Text = GameText.; ViolaTextBubble.Text = GameText.;
ip.Text = GameText.6; ip.Text = GameText.6;
ip.SubInfo = GameText.; ip.SubInfo = GameText.;
if (i == 2) if (i == 2)
@@ -7130,9 +7081,9 @@ namespace SlaveMatrix
mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc) mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc)
{ {
ip.DownB(ref hc); ip.DownB(ref hc);
if (!.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying) if (!ViolaTextBubble.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying)
{ {
if (wi == i && i != 2 && .Tex.Done == null) if (wi == i && i != 2 && ViolaTextBubble.Tex.Done == null)
{ {
i++; i++;
wi = i; wi = i;
@@ -7140,30 +7091,30 @@ namespace SlaveMatrix
{ {
if (i == 2) if (i == 2)
{ {
.Tex.Done = d1; ViolaTextBubble.Tex.Done = d1;
} }
else else
{ {
.Tex.Done = null; ViolaTextBubble.Tex.Done = null;
} }
if (i != 3) if (i != 3)
{ {
if (i < 4) if (i < 4)
{ {
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
} }
else if (yes) else if (yes)
{ {
sfcy[i - 4](); sfcy[i - 4]();
.Text = tscy[i - 4]; ViolaTextBubble.Text = tscy[i - 4];
ip.SubInfo = suby[i - 4]; ip.SubInfo = suby[i - 4];
} }
else else
{ {
sfcn[i - 4](); sfcn[i - 4]();
.Text = tscn[i - 4]; ViolaTextBubble.Text = tscn[i - 4];
ip.SubInfo = subn[i - 4]; ip.SubInfo = subn[i - 4];
} }
ip.Text = tsp[i]; ip.Text = tsp[i];
@@ -7182,19 +7133,19 @@ namespace SlaveMatrix
if (i < 4) if (i < 4)
{ {
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
} }
else if (yes) else if (yes)
{ {
sfcy[i - 4](); sfcy[i - 4]();
.Text = tscy[i - 4]; ViolaTextBubble.Text = tscy[i - 4];
ip.SubInfo = suby[i - 4]; ip.SubInfo = suby[i - 4];
} }
else else
{ {
sfcn[i - 4](); sfcn[i - 4]();
.Text = tscn[i - 4]; ViolaTextBubble.Text = tscn[i - 4];
ip.SubInfo = subn[i - 4]; ip.SubInfo = subn[i - 4];
} }
ip.Text = tsp[i]; ip.Text = tsp[i];
@@ -7223,14 +7174,14 @@ namespace SlaveMatrix
ip.Mai2Show = false; ip.Mai2Show = false;
ip.SubShow = true; ip.SubShow = true;
ip.Sub2Show = true; ip.Sub2Show = true;
.Tex.Feed.Dra = true; ViolaTextBubble.Tex.Feed.Dra = true;
Viola._見つめ(); Viola._見つめ();
Viola._基本0(); Viola._基本0();
Viola.Set基本姿勢(); Viola.Set基本姿勢();
i = 0; i = 0;
wi = 0; wi = 0;
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
}; };
@@ -7293,14 +7244,14 @@ namespace SlaveMatrix
mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc) mod.Down = delegate(MouseButtons mb, Vector2D cp, Color hc)
{ {
ip.DownB(ref hc); ip.DownB(ref hc);
if (!.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying && wi == i) if (!ViolaTextBubble.Tex.IsPlaying && !ip.Mai.IsPlaying && !ip.Sub.IsPlaying && wi == i)
{ {
i++; i++;
wi = i; wi = i;
if (i < tsp.Length) if (i < tsp.Length)
{ {
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
} }
@@ -7332,14 +7283,14 @@ namespace SlaveMatrix
ip.Mai2Show = false; ip.Mai2Show = false;
ip.SubShow = true; ip.SubShow = true;
ip.Sub2Show = true; ip.Sub2Show = true;
.Tex.Feed.Dra = true; ViolaTextBubble.Tex.Feed.Dra = true;
Viola._見つめ(); Viola._見つめ();
Viola._基本0(); Viola._基本0();
Viola.Set基本姿勢(); Viola.Set基本姿勢();
i = 0; i = 0;
wi = 0; wi = 0;
sfc[i](); sfc[i]();
.Text = tsc[i]; ViolaTextBubble.Text = tsc[i];
ip.Text = tsp[i]; ip.Text = tsp[i];
ip.SubInfo = sub[i]; ip.SubInfo = sub[i];
Sta.GameData. = Sta.GameData.; Sta.GameData. = Sta.GameData.;

View File

@@ -842,12 +842,6 @@ namespace SlaveMatrix
} }
} }
public static void Setting(this Are Are)
{
Are.GD.SmoothingMode = SmoothingMode.HighQuality;
Are.GD.PixelOffsetMode = PixelOffsetMode.HighQuality;
}
public static string Numf1(this double n) public static string Numf1(this double n)
{ {
return n.ToString("P1").PadLeft(6); return n.ToString("P1").PadLeft(6);

View File

@@ -1342,8 +1342,9 @@ namespace SlaveMatrix
Focus = CM; Focus = CM;
if (Med.Mode == "Training") if (Med.Mode == "Training")
{ {
//TODO fix? //~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(ハンド右.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(ハンド右.位置B));
Med.CursorPosition = Med.FromBasePosition(.B);
} }
Set持ち手(); Set持ち手();
} }
@@ -1456,8 +1457,11 @@ namespace SlaveMatrix
} }
Focus.Ele.SetHitTrue(); Focus.Ele.SetHitTrue();
Focus_nr = CM; Focus_nr = CM;
//TODO fix?
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(ハンド右.位置B)); //Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(ハンド右.位置B));
Med.CursorPosition = Med.FromBasePosition(.B);
Set持ち手(); Set持ち手();
} }
@@ -1897,7 +1901,7 @@ namespace SlaveMatrix
public void Down(ref MouseButtons mb, ref Vector2D cp, ref Vector2D op, ref Color hc, ref ContactD cd) public void Down(ref MouseButtons mb, ref Vector2D cp, ref Vector2D op, ref Color hc, ref ContactD cd)
{ {
if (HeldButton != 0) if (HeldButton != MouseButtons.None)
{ {
return; return;
} }
@@ -2410,7 +2414,6 @@ namespace SlaveMatrix
parT7.PositionBase = parT6.PositionBase.AddY(0.015); parT7.PositionBase = parT6.PositionBase.AddY(0.015);
string Path = "Photo"; string Path = "Photo";
Film = new Are(Med, Hit: false); Film = new Are(Med, Hit: false);
Film.Setting();
= new But1(parT7, delegate = new But1(parT7, delegate
{ {
//Sounds.撮影.Play(); //Sounds.撮影.Play();
@@ -2421,7 +2424,7 @@ namespace SlaveMatrix
} }
DateTime now = DateTime.Now; DateTime now = DateTime.Now;
Mods.(調UI2.Film, Med.FPSF); Mods.(調UI2.Film, Med.FPSF);
Font font = new Font("MS Gothic", (float)(10.0 * Med.DpiY)); Font font = new Font("MS Gothic", (float)(10.0));
float x = 350f; float x = 350f;
float y = 365f; float y = 365f;
if (Sta.BigWindow) if (Sta.BigWindow)

View File

@@ -27,6 +27,7 @@ Global
{A12B2957-8EC4-4DA7-AD38-4FE141C532E1}.Debug|x86.ActiveCfg = Debug|Any CPU {A12B2957-8EC4-4DA7-AD38-4FE141C532E1}.Debug|x86.ActiveCfg = Debug|Any CPU
{A12B2957-8EC4-4DA7-AD38-4FE141C532E1}.Debug|x86.Build.0 = Debug|Any CPU {A12B2957-8EC4-4DA7-AD38-4FE141C532E1}.Debug|x86.Build.0 = Debug|Any CPU
{A12B2957-8EC4-4DA7-AD38-4FE141C532E1}.Release|x64.ActiveCfg = Release|Any CPU {A12B2957-8EC4-4DA7-AD38-4FE141C532E1}.Release|x64.ActiveCfg = Release|Any CPU
{A12B2957-8EC4-4DA7-AD38-4FE141C532E1}.Release|x64.Build.0 = Release|Any CPU
{A12B2957-8EC4-4DA7-AD38-4FE141C532E1}.Release|x86.ActiveCfg = Release|Any CPU {A12B2957-8EC4-4DA7-AD38-4FE141C532E1}.Release|x86.ActiveCfg = Release|Any CPU
{A12B2957-8EC4-4DA7-AD38-4FE141C532E1}.Release|x86.Build.0 = Release|Any CPU {A12B2957-8EC4-4DA7-AD38-4FE141C532E1}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection

File diff suppressed because it is too large Load Diff