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 Bitmap Dis;
public Bitmap Hit;
protected Graphics gd;
protected Bitmap Hit;
protected Graphics gh;
protected double unit;
protected double disUnit;
protected double hitUnit;
protected Size WH = System.Drawing.Size.Empty;
protected Size WHH = System.Drawing.Size.Empty;
protected Size WHA = System.Drawing.Size.Empty;
private Color ClearColor = Color.Transparent;
public Vector2D BasePoint = Dat.Vec2DZero;
public Vector2D Position = Dat.Vec2DZero;
protected Vector2D p;
public Graphics GD => gd;
public Graphics GH => gh;
public double Unit => unit;
public double DisUnit => disUnit;
public Are() { }
@@ -132,15 +119,28 @@ namespace _2DGAMELIB
}
}
public void Draw(Graphics GD)
public void Draw(Are Are)
{
Vector2D p = Are.GetPosition();
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)
{
GH.DrawImage(Are.Hit, (int)(p.X * Are.hitUnit), (int)(p.Y * Are.hitUnit), Are.WHH.Width, Are.WHH.Height);
}
}
public void DrawTo(Graphics GD)
{
p = GetPosition();
Vector2D p = GetPosition();
GD.DrawImage(Dis, (int)(p.X * unit), (int)(p.Y * unit), WH.Width, WH.Height);
}
public void Draw(Graphics GD, Graphics GH)
public void DrawTo(Graphics GD, Graphics GH)
{
p = GetPosition();
Vector2D p = GetPosition();
GD.DrawImage(Dis, (int)(p.X * unit), (int)(p.Y * unit), WH.Width, WH.Height);
if (gh != null)
{
@@ -148,15 +148,6 @@ namespace _2DGAMELIB
}
}
public void Draw(Are Are)
{
p = Are.GetPosition();
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)
{
GH.DrawImage(Are.Hit, (int)(p.X * Are.hitUnit), (int)(p.Y * Are.hitUnit), Are.WHH.Width, Are.WHH.Height);
}
}
@@ -164,10 +155,10 @@ namespace _2DGAMELIB
public void Clear()
{
gd.Clear(ClearColor);
gd.Clear(Color.Transparent);
if (gh != null)
{
gh.Clear(ClearColor);
gh.Clear(Color.Transparent);
}
}
@@ -176,7 +167,7 @@ namespace _2DGAMELIB
gd.Clear(Color);
if (gh != null)
{
gh.Clear(ClearColor);
gh.Clear(Color.Transparent);
}
}

View File

@@ -9,100 +9,84 @@ namespace _2DGAMELIB
{
public class Med
{
public static object obj;
private GlImage baseControl;
private GlImage baseControl;
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 double Unit = 1762.4;
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 Graphics GD;
public double HitAccuracy = 0.5;
public Bitmap Hit;
public Graphics GH;
public Bitmap BD;
public Sce Sce;
public FPS FPSF = new FPS(60.0);
public Graphics GD;
private Size BaseSize = Size.Empty;
private Vector2D resVector = Dat.Vec2DZero;
public Bitmap BH;
public string UITitle;
public Graphics GH;
private string mode;
public string Modeb;
private Color ClearColor = Color.Transparent;
private Dictionary<string, Module> Modes;
private Func<Med, Dictionary<string, Module>> GetModes;
public bool Drive = true;
public HashSet<Color> HitColors = new HashSet<Color>
{
Color.Transparent,
Color.Black
};
private Size BaseSize = Size.Empty;
private double resMag = 1.0;
//public Control BaseControlC => baseControl;
private Vector2D resVector = Dat.Vec2DZero;
public string Mode
{
get
{
return mode;
}
set
{
Modes[mode].Up(MouseButtons.None, Dat.Vec2DZero, Color.Empty);
Modes[mode].Move(MouseButtons.None, Dat.Vec2DZero, Color.Empty);
Modeb = mode;
mode = value;
Modes[mode].Move(MouseButtons.None, Dat.Vec2DZero, Color.Empty);
Modes[mode].Setting();
}
}
private Sce Sce;
private string mode;
public string Modeb;
private Dictionary<string, Module> Modes;
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>
{
Color.Transparent,
Color.Black
};
public static double DpiX;
public static double DpiY;
public string UITitle;
public bool ShowFPS;
//public Control BaseControlC => baseControl;
public string Mode
{
get
{
return mode;
}
set
{
Modes[mode].Up(MouseButtons.None, Dat.Vec2DZero, Color.Empty);
Modes[mode].Move(MouseButtons.None, Dat.Vec2DZero, Color.Empty);
Modeb = mode;
mode = value;
Modes[mode].Move(MouseButtons.None, Dat.Vec2DZero, Color.Empty);
Modes[mode].Setting();
}
}
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()
{
//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)
{
Sce.TransformAlpha(GD, Rate);
@@ -113,20 +97,10 @@ namespace _2DGAMELIB
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)
{
@@ -138,24 +112,31 @@ namespace _2DGAMELIB
{
baseControl = BaseControl;
BaseSize = new Size((int)(Base.LocalWidth * Unit), (int)(Base.LocalHeight * Unit));
BD = new Bitmap(BaseSize.Width, BaseSize.Height);
GD = Graphics.FromImage(BD);
GD.InterpolationMode = InterpolationMode.HighQualityBilinear;
BH = new Bitmap((int)((double)BaseSize.Width * HitAccuracy), (int)((double)BaseSize.Height * HitAccuracy));
GH = Graphics.FromImage(BH);
GH.InterpolationMode = InterpolationMode.Bilinear;
WidthM = BH.Width - 1;
HeightM = BH.Height - 1;
Clear();
Dis = new Bitmap(BaseSize.Width, BaseSize.Height);
GD = Graphics.FromImage(Dis);
//GD.InterpolationMode = InterpolationMode.HighQualityBilinear;
GD.SmoothingMode = SmoothingMode.None;
GD.PixelOffsetMode = PixelOffsetMode.HighSpeed;
GD.InterpolationMode = InterpolationMode.NearestNeighbor;
//needed for text or smthn
GD.CompositingMode = CompositingMode.SourceOver;
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);
Modes = GetModes(this);
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;
switch (button)
{
@@ -176,14 +157,17 @@ namespace _2DGAMELIB
break;
}
(state == InputState.Press ? Modes[mode].Down : Modes[mode].Up)(arg2, ToBasePosition(Position5), GetHitColor(ref Position5));
double x, y;
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)
{
Point Position3 = new Point((int)x, (int)y);
Modes[mode].Move(BaseControl.GetMouseButtons(), ToBasePosition(Position3), GetHitColor(ref Position3));
Vector2D Position3 = new Vector2D(x, y);
Modes[mode].Move(BaseControl.GetMouseButtons(), ToBasePosition(Position3), GetHitColor(Position3));
};
BaseControl.Leave = delegate (IntPtr window, bool entered)
@@ -192,8 +176,8 @@ namespace _2DGAMELIB
{
double x, y;
Glfw.GetCursorPosition(GlImage.PtrToWindow(window), out x, out y);
Point Position2 = new Point((int)x, (int)y);
Modes[mode].Leave(BaseControl.GetMouseButtons(), ToBasePosition(Position2), GetHitColor(ref Position2));
Vector2D Position2 = new Vector2D(x, y);
Modes[mode].Leave(BaseControl.GetMouseButtons(), ToBasePosition(Position2), GetHitColor(Position2));
}
};
@@ -201,9 +185,9 @@ namespace _2DGAMELIB
{
double x, 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
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)
@@ -246,20 +230,22 @@ namespace _2DGAMELIB
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);
}
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;
Point point = ((Position.ToVector2D() - resVector) * num).ToPoint();
Point point = ((Position - resVector) * num).ToPoint();
if (point.X < 0)
{
point.X = 0;
@@ -276,7 +262,7 @@ namespace _2DGAMELIB
{
point.Y = HeightM;
}
return BH.GetPixel(point.X, point.Y);
return Hit.GetPixel(point.X, point.Y);
}
public Color GetHitColor(ref Point Position)
@@ -299,14 +285,18 @@ namespace _2DGAMELIB
{
point.Y = HeightM;
}
return BH.GetPixel(point.X, point.Y);
return Hit.GetPixel(point.X, point.Y);
}
public void Drawing()
{
baseControl.BitmapSetting(BD);
Modes[mode].Setting();
baseControl.BitmapSetting(Dis);
baseControl.SetTitle(UITitle);
Modes[mode].Setting();
Action action = delegate
{
@@ -320,8 +310,9 @@ namespace _2DGAMELIB
}
}
GD.DrawImage(BH, new Point(0, 0));
baseControl.SetBitmap(BD);
//DEBUG shows the hit lut
//GD.DrawImage(Hit, new Point(0, 0));
baseControl.SetBitmap(Dis);
};
@@ -332,45 +323,30 @@ namespace _2DGAMELIB
}
}
public void Clear()
{
GD.Clear(ClearColor);
GH.Clear(ClearColor);
}
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()
{
if (cur)
{
//TODO fix?
//System.Windows.Forms.Cursor.Hide();
cur = false;
}
//TODO fix?
}
public void CursorShow()
{
if (!cur)
{
//TODO fix?
//System.Windows.Forms.Cursor.Show();
cur = true;
}
//TODO fix?
}
public void InvokeL(Action a)
{
//TODO this look right?
a();
//baseControl.Invoke(a);
}
public Color GetUniqueColor()
//hit color stuff
public Color GetUniqueColor()
{
Oth.GetRandomColor(out var ret);
while (HitColors.Contains(ret))
@@ -434,10 +410,6 @@ namespace _2DGAMELIB
//return result;
}*/
static Med()
{
obj = new object();
FPS = 60.0;
}
static Med() {}
}
}

View File

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

View File

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

View File

@@ -40,12 +40,16 @@ namespace _2DGAMELIB
public GlImage() { }
public System.Drawing.Point GetCursorPoint() {
public Vector2D GetCursorPoint() {
double x, 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() {
MouseButtons btns = 0;
@@ -220,7 +224,7 @@ void main()
gl.TexParameterI(Silk.NET.OpenGL.GLEnum.Texture2D, Silk.NET.OpenGL.GLEnum.TextureMinFilter, new int[] {(int)TextureMinFilter.Nearest});
float[] buf = { 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f };
float[] buf = { 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f };
vertex_buf = gl.GenBuffer();
gl.BindBuffer(Silk.NET.OpenGL.GLEnum.ArrayBuffer, vertex_buf);
fixed (float* buf_ = buf) gl.BufferData(Silk.NET.OpenGL.GLEnum.ArrayBuffer, (uint)(sizeof(float) * buf.Length), buf_, Silk.NET.OpenGL.GLEnum.StaticDraw);
@@ -228,102 +232,4 @@ void main()
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 hd;
private TextBubble hd;
public SlaveText(Med Med, hd)
public SlaveText(Med Med, TextBubble hd)
{
this.Med = Med;
this.hd = hd;

View File

@@ -6,7 +6,7 @@ using _2DGAMELIB;
namespace SlaveMatrix
{
public class
public class TextBubble
{
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);
.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);
.SetHitFalse();

View File

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

View File

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

View File

@@ -591,7 +591,6 @@ namespace SlaveMatrix
X1Y4_血管下CP = new ColorP(X1Y4_血管下, CD, DisUnit, abj: true);
= e.;
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);
X0Y0_陰嚢.BasePointBase = X0Y0_陰嚢.ToLocal(X0Y0_陰茎.ToGlobal(X0Y0_陰茎.JP[3].Joint));
X0Y1_陰嚢.BasePointBase = X0Y1_陰嚢.ToLocal(X0Y1_陰茎.ToGlobal(X0Y1_陰茎.JP[3].Joint));

View File

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

View File

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

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);
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);
AreMPos = AreM.GetPosition(ref AreM.BasePoint);
= 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);
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);
AreMPos = AreM.GetPosition(ref AreM.BasePoint);
= e.;

View File

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

View File

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

View File

@@ -39,7 +39,6 @@ namespace SlaveMatrix
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.Setting();
ElesH = new HashSet<Ele>();
}

View File

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

View File

@@ -1342,8 +1342,9 @@ namespace SlaveMatrix
Focus = CM;
if (Med.Mode == "Training")
{
//TODO fix?
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(ハンド右.位置B));
Med.CursorPosition = Med.FromBasePosition(.B);
}
Set持ち手();
}
@@ -1456,8 +1457,11 @@ namespace SlaveMatrix
}
Focus.Ele.SetHitTrue();
Focus_nr = CM;
//TODO fix?
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(ハンド右.位置B));
Med.CursorPosition = Med.FromBasePosition(.B);
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)
{
if (HeldButton != 0)
if (HeldButton != MouseButtons.None)
{
return;
}
@@ -2410,7 +2414,6 @@ namespace SlaveMatrix
parT7.PositionBase = parT6.PositionBase.AddY(0.015);
string Path = "Photo";
Film = new Are(Med, Hit: false);
Film.Setting();
= new But1(parT7, delegate
{
//Sounds.撮影.Play();
@@ -2421,7 +2424,7 @@ namespace SlaveMatrix
}
DateTime now = DateTime.Now;
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 y = 365f;
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.Build.0 = Debug|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.Build.0 = Release|Any CPU
EndGlobalSection

File diff suppressed because it is too large Load Diff