• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubybathyscaphegamewindowspythonphpguic翻訳omegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

dtxmania 中文


Commit MetaInfo

Revisionef6c93571e30d33920b2127b6b1972f73f3eabce (tree)
Zeit2019-08-26 21:18:11
Autoryyagi <yyagi.dtxmania@gmai...>
Commiteryyagi

Log Message

#39511 ウインドウの中をドラッグしてもウインドウを移動できるようにした。

Ändern Zusammenfassung

  • delete: "DTXMania/\343\202\263\343\203\274\343\203\211/\345\205\250\344\275\223/CDTXMania.cs"

Diff

--- "a/DTXMania/\343\202\263\343\203\274\343\203\211/\345\205\250\344\275\223/CDTXMania.cs"
+++ "b/DTXMania/\343\202\263\343\203\274\343\203\211/\345\205\250\344\275\223/CDTXMania.cs"
@@ -638,6 +638,7 @@ namespace DTXMania
638638 base.Window.Icon = Properties.Resources.dtx;
639639 base.Window.KeyDown += new KeyEventHandler(this.Window_KeyDown);
640640 base.Window.MouseUp += new MouseEventHandler(this.Window_MouseUp);
641+ base.Window.MouseDown += new MouseEventHandler(this.Window_MouseDown);
641642 // #23510 2010.11.13 yyagi: to go fullscreen mode
642643 base.Window.MouseDoubleClick += new MouseEventHandler(this.Window_MouseDoubleClick);
643644 // #23510 2010.11.20 yyagi: to set resized window size in Config.ini
@@ -3058,6 +3059,11 @@ namespace DTXMania
30583059 {
30593060 mb = e.Button;
30603061 }
3062+ private void Window_MouseDown(object sender, MouseEventArgs e)
3063+ {
3064+ currentMousePosition.X = Control.MousePosition.X;
3065+ currentMousePosition.Y = Control.MousePosition.Y;
3066+ }
30613067
30623068 private void Window_MouseDoubleClick(object sender, MouseEventArgs e) // #23510 2010.11.13 yyagi: to go full screen mode
30633069 {
@@ -3067,11 +3073,23 @@ namespace DTXMania
30673073 this.t全画面_ウィンドウモード切り替え();
30683074 }
30693075 }
3076+ private Point currentMousePosition = new Point(-1,-1);
30703077 private void Window_MouseMove(object sender, MouseEventArgs e)
30713078 {
30723079 if (cMouseHideControl != null) cMouseHideControl.tResetCursorState(ConfigIni.bウィンドウモード, this.bApplicationActive);
3073- }
3080+ if (Control.MouseButtons.HasFlag(MouseButtons.Left))
3081+ {
3082+ int X = base.Window.Location.X;
3083+ X += (Control.MousePosition.X - currentMousePosition.X);
3084+ int Y = base.Window.Location.Y;
3085+ Y += (Control.MousePosition.Y - currentMousePosition.Y);
30743086
3087+ base.Window.Location = new Point(X, Y);
3088+
3089+ currentMousePosition.X = Control.MousePosition.X;
3090+ currentMousePosition.Y = Control.MousePosition.Y;
3091+ }
3092+ }
30753093 private void Window_ResizeEnd(object sender, EventArgs e) // #23510 2010.11.20 yyagi: to get resized window size
30763094 {
30773095 if (ConfigIni.bウィンドウモード)