Probably Broke something...
This commit is contained in:
@@ -1,9 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<ItemGroup>
|
|
||||||
<Compile Update="_2DGAMELIB\UI.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -30,7 +30,8 @@ public class Lab
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (!Med.BaseControl.Contains(tb))
|
//TODO fix?
|
||||||
|
//if (!Med.BaseControl.Contains(tb))
|
||||||
{
|
{
|
||||||
SetText(value);
|
SetText(value);
|
||||||
}
|
}
|
||||||
@@ -82,7 +83,8 @@ public class Lab
|
|||||||
{
|
{
|
||||||
if (e.KeyCode == Keys.Return)
|
if (e.KeyCode == Keys.Return)
|
||||||
{
|
{
|
||||||
this.Med.BaseControl.Controls.Remove(tb);
|
//TODO fix?
|
||||||
|
//this.Med.BaseControl.Controls.Remove(tb);
|
||||||
SetText(tb.Text);
|
SetText(tb.Text);
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
@@ -92,9 +94,10 @@ public class Lab
|
|||||||
{
|
{
|
||||||
e.IsInputKey = true;
|
e.IsInputKey = true;
|
||||||
};
|
};
|
||||||
Med.BaseControl.Controls.Add(tb);
|
//TODO fix?
|
||||||
Med.BaseControl.Controls.Remove(tb);
|
//Med.BaseControl.Controls.Add(tb);
|
||||||
((Control)Med.BaseControl).Resize += Lab_Resize;
|
//Med.BaseControl.Controls.Remove(tb);
|
||||||
|
//((Control)Med.BaseControl).Resize += Lab_Resize;
|
||||||
}
|
}
|
||||||
Out[] array = new Out[1] { Shas.Get正方形() };
|
Out[] array = new Out[1] { Shas.Get正方形() };
|
||||||
if (FramColor == Color.Empty || FramColor == Color.Transparent)
|
if (FramColor == Color.Empty || FramColor == Color.Transparent)
|
||||||
@@ -127,7 +130,8 @@ public class Lab
|
|||||||
|
|
||||||
private void Lab_Resize(object sender, EventArgs e)
|
private void Lab_Resize(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Med.BaseControl.Controls.Remove(tb);
|
//TODO fix?
|
||||||
|
//Med.BaseControl.Controls.Remove(tb);
|
||||||
SetText(tb.Text);
|
SetText(tb.Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,12 +181,13 @@ public class Lab
|
|||||||
|
|
||||||
public bool Double(ref Color HitColor)
|
public bool Double(ref Color HitColor)
|
||||||
{
|
{
|
||||||
if (Input && parT.HitColor == HitColor && !Med.BaseControl.Controls.Contains(tb))
|
//TODO fix?
|
||||||
{
|
//if (Input && parT.HitColor == HitColor && !Med.BaseControl.Controls.Contains(tb))
|
||||||
tb.Text = parT.Text;
|
{
|
||||||
|
tb.Text = parT.Text;
|
||||||
parT.Text = "";
|
parT.Text = "";
|
||||||
SetRectT();
|
SetRectT();
|
||||||
Med.BaseControl.Controls.Add(tb);
|
//Med.BaseControl.Controls.Add(tb);
|
||||||
tb.SelectAll();
|
tb.SelectAll();
|
||||||
tb.Focus();
|
tb.Focus();
|
||||||
tb.BringToFront();
|
tb.BringToFront();
|
||||||
@@ -193,9 +198,10 @@ public class Lab
|
|||||||
|
|
||||||
public void Click(ref Color HitColor)
|
public void Click(ref Color HitColor)
|
||||||
{
|
{
|
||||||
if (Input && parT.HitColor != HitColor && Med.BaseControl.Controls.Contains(tb))
|
//TODO fix?
|
||||||
|
//if (Input && parT.HitColor != HitColor && Med.BaseControl.Controls.Contains(tb))
|
||||||
{
|
{
|
||||||
Med.BaseControl.Controls.Remove(tb);
|
//Med.BaseControl.Controls.Remove(tb);
|
||||||
SetText(tb.Text);
|
SetText(tb.Text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -205,7 +211,8 @@ public class Lab
|
|||||||
parT.Dispose();
|
parT.Dispose();
|
||||||
if (Input)
|
if (Input)
|
||||||
{
|
{
|
||||||
((Control)Med.BaseControl).Resize -= Lab_Resize;
|
//TODO fix?
|
||||||
|
//((Control)Med.BaseControl).Resize -= Lab_Resize;
|
||||||
}
|
}
|
||||||
if (tb != null)
|
if (tb != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class Med
|
|||||||
{
|
{
|
||||||
public static object obj;
|
public static object obj;
|
||||||
|
|
||||||
private WPFImage baseControl;
|
private GlImage baseControl;
|
||||||
|
|
||||||
public double Unit = 1762.4;
|
public double Unit = 1762.4;
|
||||||
|
|
||||||
@@ -84,9 +84,9 @@ public class Med
|
|||||||
|
|
||||||
public bool ShowFPS;
|
public bool ShowFPS;
|
||||||
|
|
||||||
public Control BaseControlC => baseControl;
|
//public Control BaseControlC => baseControl;
|
||||||
|
|
||||||
public WPFImage BaseControl => baseControl;
|
public GlImage BaseControl => baseControl;
|
||||||
|
|
||||||
public double ResMag => resMag;
|
public double ResMag => resMag;
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ public class Med
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector2D CursorPosition => ToBasePosition(baseControl.PointToClient(System.Windows.Forms.Cursor.Position));
|
public Vector2D CursorPosition => ToBasePosition(baseControl.GetCursorPoint()); //ToBasePosition(baseControl.PointToClient(System.Windows.Forms.Cursor.Position));
|
||||||
|
|
||||||
public Med()
|
public Med()
|
||||||
{
|
{
|
||||||
@@ -151,7 +151,7 @@ public class Med
|
|||||||
this.GetModes = GetModes;
|
this.GetModes = GetModes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Size Setting(WPFImage BaseControl)
|
public Size Setting(GlImage BaseControl)
|
||||||
{
|
{
|
||||||
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));
|
||||||
@@ -168,58 +168,7 @@ public class Med
|
|||||||
Modes = GetModes(this);
|
Modes = GetModes(this);
|
||||||
|
|
||||||
|
|
||||||
BaseControl.Image.MouseDown += delegate(object s, System.Windows.Input.MouseButtonEventArgs e)
|
BaseControl.Click = delegate (IntPtr window, GLFW.MouseButton button, InputState state, GLFW.ModifierKeys modifiers)
|
||||||
{
|
|
||||||
Point Position5 = baseControl.PointToClient(System.Windows.Forms.Cursor.Position);
|
|
||||||
MouseButtons arg2 = MouseButtons.None;
|
|
||||||
switch (e.ChangedButton)
|
|
||||||
{
|
|
||||||
case System.Windows.Input.MouseButton.Left:
|
|
||||||
arg2 = MouseButtons.Left;
|
|
||||||
break;
|
|
||||||
case System.Windows.Input.MouseButton.Middle:
|
|
||||||
arg2 = MouseButtons.Middle;
|
|
||||||
break;
|
|
||||||
case System.Windows.Input.MouseButton.Right:
|
|
||||||
arg2 = MouseButtons.Right;
|
|
||||||
break;
|
|
||||||
case System.Windows.Input.MouseButton.XButton1:
|
|
||||||
arg2 = MouseButtons.XButton1;
|
|
||||||
break;
|
|
||||||
case System.Windows.Input.MouseButton.XButton2:
|
|
||||||
arg2 = MouseButtons.XButton2;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
Modes[mode].Down(arg2, ToBasePosition(Position5), GetHitColor(ref Position5));
|
|
||||||
};
|
|
||||||
|
|
||||||
BaseControl.Image.MouseUp += delegate(object s, System.Windows.Input.MouseButtonEventArgs e)
|
|
||||||
{
|
|
||||||
Point Position4 = baseControl.PointToClient(System.Windows.Forms.Cursor.Position);
|
|
||||||
MouseButtons arg = MouseButtons.None;
|
|
||||||
switch (e.ChangedButton)
|
|
||||||
{
|
|
||||||
case System.Windows.Input.MouseButton.Left:
|
|
||||||
arg = MouseButtons.Left;
|
|
||||||
break;
|
|
||||||
case System.Windows.Input.MouseButton.Middle:
|
|
||||||
arg = MouseButtons.Middle;
|
|
||||||
break;
|
|
||||||
case System.Windows.Input.MouseButton.Right:
|
|
||||||
arg = MouseButtons.Right;
|
|
||||||
break;
|
|
||||||
case System.Windows.Input.MouseButton.XButton1:
|
|
||||||
arg = MouseButtons.XButton1;
|
|
||||||
break;
|
|
||||||
case System.Windows.Input.MouseButton.XButton2:
|
|
||||||
arg = MouseButtons.XButton2;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
Modes[mode].Up(arg, ToBasePosition(Position4), GetHitColor(ref Position4));
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
BaseControl.gl_img.Click = delegate (IntPtr window, GLFW.MouseButton button, InputState state, GLFW.ModifierKeys modifiers)
|
|
||||||
{
|
{
|
||||||
double x, y;
|
double x, y;
|
||||||
Glfw.GetCursorPosition(GlImage.PtrToWindow(window), out x, out y);
|
Glfw.GetCursorPosition(GlImage.PtrToWindow(window), out x, out y);
|
||||||
@@ -248,27 +197,13 @@ public class Med
|
|||||||
(state == InputState.Press ? Modes[mode].Down : Modes[mode].Up)(arg2, ToBasePosition(Position5), GetHitColor(ref Position5));
|
(state == InputState.Press ? Modes[mode].Down : Modes[mode].Up)(arg2, ToBasePosition(Position5), GetHitColor(ref Position5));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BaseControl.Move = delegate (IntPtr window, double x, double y)
|
||||||
BaseControl.Image.MouseMove += delegate
|
|
||||||
{
|
|
||||||
Point Position3 = baseControl.PointToClient(System.Windows.Forms.Cursor.Position);
|
|
||||||
Modes[mode].Move(Control.MouseButtons, ToBasePosition(Position3), GetHitColor(ref Position3));
|
|
||||||
};
|
|
||||||
|
|
||||||
BaseControl.gl_img.Move = delegate (IntPtr window, double x, double y)
|
|
||||||
{
|
{
|
||||||
Point Position3 = new Point((int)x, (int)y);
|
Point Position3 = new Point((int)x, (int)y);
|
||||||
Modes[mode].Move(Control.MouseButtons, ToBasePosition(Position3), GetHitColor(ref Position3));
|
Modes[mode].Move(Control.MouseButtons, ToBasePosition(Position3), GetHitColor(ref Position3));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BaseControl.Leave = delegate (IntPtr window, bool entered)
|
||||||
BaseControl.Image.MouseLeave += delegate
|
|
||||||
{
|
|
||||||
Point Position2 = baseControl.PointToClient(System.Windows.Forms.Cursor.Position);
|
|
||||||
Modes[mode].Leave(Control.MouseButtons, ToBasePosition(Position2), GetHitColor(ref Position2));
|
|
||||||
};
|
|
||||||
|
|
||||||
BaseControl.gl_img.Leave = delegate (IntPtr window, bool entered)
|
|
||||||
{
|
{
|
||||||
if (!entered)
|
if (!entered)
|
||||||
{
|
{
|
||||||
@@ -279,13 +214,7 @@ public class Med
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
BaseControl.Image.MouseWheel += delegate(object s, MouseWheelEventArgs e)
|
BaseControl.Scroll = delegate (IntPtr window, double xo, double yo)
|
||||||
{
|
|
||||||
Point Position = baseControl.PointToClient(System.Windows.Forms.Cursor.Position);
|
|
||||||
Modes[mode].Wheel(Control.MouseButtons, ToBasePosition(Position), e.Delta, GetHitColor(ref Position));
|
|
||||||
};
|
|
||||||
|
|
||||||
BaseControl.gl_img.Scroll = delegate (IntPtr window, double xo, double yo)
|
|
||||||
{
|
{
|
||||||
double x, y;
|
double x, y;
|
||||||
Glfw.GetCursorPosition(GlImage.PtrToWindow(window), out x, out y);
|
Glfw.GetCursorPosition(GlImage.PtrToWindow(window), out x, out y);
|
||||||
@@ -294,44 +223,7 @@ public class Med
|
|||||||
Modes[mode].Wheel(Control.MouseButtons, ToBasePosition(Position), (int)yo, GetHitColor(ref Position));
|
Modes[mode].Wheel(Control.MouseButtons, ToBasePosition(Position), (int)yo, GetHitColor(ref Position));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BaseControl.Resize = delegate (IntPtr window, int width, int height)
|
||||||
((Control)BaseControl).Resize += delegate
|
|
||||||
{
|
|
||||||
if (BaseSize.Width >= BaseSize.Height)
|
|
||||||
{
|
|
||||||
double num = (double)BaseSize.Width / (double)BaseSize.Height;
|
|
||||||
if ((double)baseControl.ClientSize.Width / (double)baseControl.ClientSize.Height <= num)
|
|
||||||
{
|
|
||||||
resMag = (double)BaseSize.Width / (double)baseControl.ClientSize.Width;
|
|
||||||
resVector.X = 0.0;
|
|
||||||
resVector.Y = ((double)baseControl.ClientSize.Height - (double)BaseSize.Height / resMag) * 0.5;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
resMag = (double)BaseSize.Height / (double)baseControl.ClientSize.Height;
|
|
||||||
resVector.X = ((double)baseControl.ClientSize.Width - (double)BaseSize.Width / resMag) * 0.5;
|
|
||||||
resVector.Y = 0.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
double num2 = (double)BaseSize.Height / (double)BaseSize.Width;
|
|
||||||
if ((double)baseControl.ClientSize.Height / (double)baseControl.ClientSize.Width <= num2)
|
|
||||||
{
|
|
||||||
resMag = (double)BaseSize.Height / (double)baseControl.ClientSize.Height;
|
|
||||||
resVector.X = ((double)baseControl.ClientSize.Width - (double)BaseSize.Width / resMag) * 0.5;
|
|
||||||
resVector.Y = 0.0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
resMag = (double)BaseSize.Width / (double)baseControl.ClientSize.Width;
|
|
||||||
resVector.X = 0.0;
|
|
||||||
resVector.Y = ((double)baseControl.ClientSize.Height - (double)BaseSize.Height / resMag) * 0.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
BaseControl.gl_img.Resize = delegate (IntPtr window, int width, int height)
|
|
||||||
{
|
{
|
||||||
//TODO mess with viewport
|
//TODO mess with viewport
|
||||||
if (BaseSize.Width >= BaseSize.Height)
|
if (BaseSize.Width >= BaseSize.Height)
|
||||||
@@ -455,7 +347,8 @@ public class Med
|
|||||||
|
|
||||||
if (ShowFPS)
|
if (ShowFPS)
|
||||||
{
|
{
|
||||||
baseControl.Parent.Text = UITitle + " - FPS: " + System.Math.Round(FPSF.Value, 2);
|
//TODO fix
|
||||||
|
//baseControl.Parent.Text = UITitle + " - FPS: " + System.Math.Round(FPSF.Value, 2);
|
||||||
}
|
}
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
baseControl.PollEvents();
|
baseControl.PollEvents();
|
||||||
@@ -498,7 +391,9 @@ public class Med
|
|||||||
|
|
||||||
public void InvokeL(Action a)
|
public void InvokeL(Action a)
|
||||||
{
|
{
|
||||||
baseControl.Invoke(a);
|
//TODO this look right?
|
||||||
|
a();
|
||||||
|
//baseControl.Invoke(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color GetUniqueColor()
|
public Color GetUniqueColor()
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace _2DGAMELIB;
|
namespace _2DGAMELIB;
|
||||||
|
|
||||||
public class UI : Form
|
public class UI //: Form
|
||||||
{
|
{
|
||||||
private Med Med;
|
private Med Med;
|
||||||
|
|
||||||
private IContainer components;
|
private IContainer components;
|
||||||
|
|
||||||
private WPFImage wpfImage1;
|
private GlImage wpfImage1;
|
||||||
|
|
||||||
private System.Windows.Controls.Image hostedComponent1;
|
private System.Windows.Controls.Image hostedComponent1;
|
||||||
|
|
||||||
@@ -24,14 +22,15 @@ public class UI : Form
|
|||||||
|
|
||||||
public UI(Med Med)
|
public UI(Med Med)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
this.Med = Med;
|
||||||
this.Med = Med;
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UI_Load(object sender, EventArgs e)
|
private void UI_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
base.ClientSize = Med.Setting(wpfImage1);
|
//base.ClientSize =
|
||||||
base.ClientSize = new Size(1024, 768);
|
Med.Setting(wpfImage1);
|
||||||
|
//base.ClientSize = new Size(1024, 768);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!File.Exists(ConfigPath))
|
if (!File.Exists(ConfigPath))
|
||||||
@@ -50,7 +49,7 @@ public class UI : Form
|
|||||||
}
|
}
|
||||||
if (BigWindow)
|
if (BigWindow)
|
||||||
{
|
{
|
||||||
base.ClientSize = new Size(1280, 960);
|
//base.ClientSize = new Size(1280, 960);
|
||||||
}
|
}
|
||||||
UI_Resize(null, null);
|
UI_Resize(null, null);
|
||||||
}
|
}
|
||||||
@@ -62,11 +61,12 @@ public class UI : Form
|
|||||||
|
|
||||||
private void UI_Resize(object sender, EventArgs e)
|
private void UI_Resize(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
wpfImage1.ImageSetting();
|
//wpfImage1.ImageSetting();
|
||||||
wpfImage1.Image.Width = (double)base.ClientSize.Width * Med.DpiX;
|
//wpfImage1.Image.Width = (double)base.ClientSize.Width * Med.DpiX;
|
||||||
wpfImage1.Image.Height = (double)base.ClientSize.Height * Med.DpiY;
|
//wpfImage1.Image.Height = (double)base.ClientSize.Height * Med.DpiY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && components != null)
|
if (disposing && components != null)
|
||||||
@@ -74,15 +74,17 @@ public class UI : Form
|
|||||||
components.Dispose();
|
components.Dispose();
|
||||||
}
|
}
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(_2DGAMELIB.UI));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(_2DGAMELIB.UI));
|
||||||
this.wpfImage1 = new _2DGAMELIB.WPFImage();
|
this.wpfImage1 = new GlImage();
|
||||||
this.hostedComponent1 = new System.Windows.Controls.Image();
|
this.hostedComponent1 = new System.Windows.Controls.Image();
|
||||||
|
|
||||||
base.SuspendLayout();
|
//base.SuspendLayout();
|
||||||
|
|
||||||
|
/*
|
||||||
this.wpfImage1.BackColor = System.Drawing.Color.Black;
|
this.wpfImage1.BackColor = System.Drawing.Color.Black;
|
||||||
this.wpfImage1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.wpfImage1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.wpfImage1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
this.wpfImage1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
@@ -90,24 +92,29 @@ public class UI : Form
|
|||||||
this.wpfImage1.Name = "wpfImage1";
|
this.wpfImage1.Name = "wpfImage1";
|
||||||
this.wpfImage1.Text = "wpfImage1";
|
this.wpfImage1.Text = "wpfImage1";
|
||||||
this.wpfImage1.TabIndex = 0;
|
this.wpfImage1.TabIndex = 0;
|
||||||
this.wpfImage1.Child = this.hostedComponent1;
|
this.wpfImage1.Child = this.hostedComponent1;*/
|
||||||
this.Text = "UI";
|
|
||||||
|
|
||||||
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
|
//this.Text = "UI";
|
||||||
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
base.Controls.Add(this.wpfImage1);
|
|
||||||
base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
|
|
||||||
base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
|
|
||||||
base.Name = "UI";
|
|
||||||
base.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
|
||||||
|
|
||||||
base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(UI_FormClosing);
|
//base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
|
||||||
|
//base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
|
||||||
|
//base.Controls.Add(this.wpfImage1);
|
||||||
|
|
||||||
|
//base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
|
||||||
|
//base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
|
||||||
|
//base.Name = "UI";
|
||||||
|
//base.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||||
|
|
||||||
|
//base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(UI_FormClosing);
|
||||||
|
|
||||||
//beauty
|
//beauty
|
||||||
this.wpfImage1.gl_img.Closing = delegate () { UI_FormClosing(null, null); };
|
this.wpfImage1.Closing = delegate () { UI_FormClosing(null, null); };
|
||||||
|
|
||||||
base.Load += new System.EventHandler(UI_Load);
|
//TODO fix?
|
||||||
base.Resize += new System.EventHandler(UI_Resize);
|
//base.Load += new System.EventHandler(UI_Load);
|
||||||
base.ResumeLayout(false);
|
UI_Load(null, null);
|
||||||
|
//base.Resize += new System.EventHandler(UI_Resize);
|
||||||
|
//base.ResumeLayout(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,17 +28,23 @@ public class GlImage
|
|||||||
return __refvalue(destRef, GLFW.Window);
|
return __refvalue(destRef, GLFW.Window);
|
||||||
}
|
}
|
||||||
|
|
||||||
private GLFW.Window window;
|
public GLFW.Window window;
|
||||||
uint shader_program;
|
private uint shader_program;
|
||||||
uint texture;
|
private uint texture;
|
||||||
uint vertex_buf;
|
private uint vertex_buf;
|
||||||
uint vao;
|
private uint vao;
|
||||||
|
|
||||||
|
|
||||||
public GlImage() { }
|
public GlImage() { }
|
||||||
|
|
||||||
public void ImageSetting() { }
|
public void ImageSetting() { }
|
||||||
|
|
||||||
|
public System.Drawing.Point GetCursorPoint() {
|
||||||
|
double x, y;
|
||||||
|
Glfw.GetCursorPosition(window, out x, out y);
|
||||||
|
return new System.Drawing.Point((int)x, (int)y);
|
||||||
|
}
|
||||||
|
|
||||||
public delegate void ShouldCloseCallback();
|
public delegate void ShouldCloseCallback();
|
||||||
|
|
||||||
public ShouldCloseCallback Closing = delegate () { };
|
public ShouldCloseCallback Closing = delegate () { };
|
||||||
@@ -192,6 +198,7 @@ void main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
public class WPFImage : ElementHost
|
public class WPFImage : ElementHost
|
||||||
{
|
{
|
||||||
public GlImage gl_img;
|
public GlImage gl_img;
|
||||||
@@ -287,3 +294,4 @@ public class WPFImage : ElementHost
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
@@ -118,7 +118,8 @@ public class ハンド処理 : 処理B
|
|||||||
調教UI.ハンド左.角度C = 0.0;
|
調教UI.ハンド左.角度C = 0.0;
|
||||||
if (Med.Mode == "Training")
|
if (Med.Mode == "Training")
|
||||||
{
|
{
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
||||||
}
|
}
|
||||||
バスト初期化.Start();
|
バスト初期化.Start();
|
||||||
if (調教UI.ハンド右.Xi == 5)
|
if (調教UI.ハンド右.Xi == 5)
|
||||||
@@ -165,7 +166,8 @@ public class ハンド処理 : 処理B
|
|||||||
調教UI.ハンド左.角度C = 0.0;
|
調教UI.ハンド左.角度C = 0.0;
|
||||||
if (Med.Mode == "Training")
|
if (Med.Mode == "Training")
|
||||||
{
|
{
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
||||||
}
|
}
|
||||||
バスト初期化.Start();
|
バスト初期化.Start();
|
||||||
if (調教UI.ハンド右.Xi == 2)
|
if (調教UI.ハンド右.Xi == 2)
|
||||||
@@ -201,7 +203,8 @@ public class ハンド処理 : 処理B
|
|||||||
調教UI.ハンド右.位置B = 位置B;
|
調教UI.ハンド右.位置B = 位置B;
|
||||||
Addvl(ref 陰核位置);
|
Addvl(ref 陰核位置);
|
||||||
核捏ね初 = true;
|
核捏ね初 = true;
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
||||||
核捏ねsi2();
|
核捏ねsi2();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,7 +217,8 @@ public class ハンド処理 : 処理B
|
|||||||
Bod.ピアス.位置C = Dat.Vec2DZero;
|
Bod.ピアス.位置C = Dat.Vec2DZero;
|
||||||
if (Med.Mode == "Training")
|
if (Med.Mode == "Training")
|
||||||
{
|
{
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,7 +260,8 @@ public class ハンド処理 : 処理B
|
|||||||
Isくぱぁ = false;
|
Isくぱぁ = false;
|
||||||
if (Med.Mode == "Training")
|
if (Med.Mode == "Training")
|
||||||
{
|
{
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
||||||
}
|
}
|
||||||
if (cd.c == ContactType.Crotch)
|
if (cd.c == ContactType.Crotch)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -484,7 +484,8 @@ public class ペニス処理 : 処理B
|
|||||||
{
|
{
|
||||||
パイズリ.End();
|
パイズリ.End();
|
||||||
}
|
}
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
||||||
調教UI.ハンド処理.バスト初期化.Start();
|
調教UI.ハンド処理.バスト初期化.Start();
|
||||||
vc = Dat.Vec2DZero;
|
vc = Dat.Vec2DZero;
|
||||||
Bod.胸毛_人.位置C = vc;
|
Bod.胸毛_人.位置C = vc;
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ public class マウス処理 : 処理B
|
|||||||
{
|
{
|
||||||
if (Is吸付)
|
if (Is吸付)
|
||||||
{
|
{
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置));
|
||||||
}
|
}
|
||||||
else if (Is舐め)
|
else if (Is舐め)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -972,7 +972,8 @@ public class 挿入処理 : 処理B
|
|||||||
Player.主精力消費小();
|
Player.主精力消費小();
|
||||||
口終了();
|
口終了();
|
||||||
解除();
|
解除();
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
||||||
待機時1();
|
待機時1();
|
||||||
if (調教UI.ペニス処理.フェラ.Run)
|
if (調教UI.ペニス処理.フェラ.Run)
|
||||||
{
|
{
|
||||||
@@ -1013,7 +1014,8 @@ public class 挿入処理 : 処理B
|
|||||||
Player.主精力消費小();
|
Player.主精力消費小();
|
||||||
肛終了();
|
肛終了();
|
||||||
解除();
|
解除();
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
||||||
待機時1();
|
待機時1();
|
||||||
if (調教UI.ペニス処理.中出し)
|
if (調教UI.ペニス処理.中出し)
|
||||||
{
|
{
|
||||||
@@ -1044,7 +1046,8 @@ public class 挿入処理 : 処理B
|
|||||||
Player.主精力消費小();
|
Player.主精力消費小();
|
||||||
膣終了();
|
膣終了();
|
||||||
解除();
|
解除();
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
||||||
待機時1();
|
待機時1();
|
||||||
if (調教UI.ペニス処理.中出し)
|
if (調教UI.ペニス処理.中出し)
|
||||||
{
|
{
|
||||||
@@ -1075,7 +1078,8 @@ public class 挿入処理 : 処理B
|
|||||||
Player.主精力消費小();
|
Player.主精力消費小();
|
||||||
糸終了();
|
糸終了();
|
||||||
解除();
|
解除();
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
||||||
待機時1();
|
待機時1();
|
||||||
if (調教UI.ペニス処理.中出し)
|
if (調教UI.ペニス処理.中出し)
|
||||||
{
|
{
|
||||||
@@ -1362,7 +1366,8 @@ public class 挿入処理 : 処理B
|
|||||||
else if (調教UI.Focus != 調教UI.ハンド右CM && !Isモード)
|
else if (調教UI.Focus != 調教UI.ハンド右CM && !Isモード)
|
||||||
{
|
{
|
||||||
解除();
|
解除();
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Ele.位置B));
|
||||||
調教UI.通常放し();
|
調教UI.通常放し();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ internal static class Program
|
|||||||
med.InitializeModes("Start", Mods.GetMods);
|
med.InitializeModes("Start", Mods.GetMods);
|
||||||
|
|
||||||
UI uI = new UI(med);
|
UI uI = new UI(med);
|
||||||
uI.Text = GameText.スレイブマトリクス;
|
//uI.Text = GameText.スレイブマトリクス;
|
||||||
uI.Show();
|
//uI.Show();
|
||||||
|
|
||||||
//main loop
|
//main loop
|
||||||
med.Drawing();
|
med.Drawing();
|
||||||
|
|||||||
@@ -1422,7 +1422,8 @@ public class TrainingUI : Ele
|
|||||||
Focus = ハンド右CM;
|
Focus = ハンド右CM;
|
||||||
if (Med.Mode == "Training")
|
if (Med.Mode == "Training")
|
||||||
{
|
{
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(ハンド右.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(ハンド右.位置B));
|
||||||
}
|
}
|
||||||
Set持ち手();
|
Set持ち手();
|
||||||
}
|
}
|
||||||
@@ -1535,7 +1536,8 @@ public class TrainingUI : Ele
|
|||||||
}
|
}
|
||||||
Focus.Ele.SetHitTrue();
|
Focus.Ele.SetHitTrue();
|
||||||
Focus_nr = ハンド右CM;
|
Focus_nr = ハンド右CM;
|
||||||
Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(ハンド右.位置B));
|
//TODO fix?
|
||||||
|
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(ハンド右.位置B));
|
||||||
Set持ち手();
|
Set持ち手();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user