-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implemented about 10 window_ functions
from #64
- Loading branch information
Showing
14 changed files
with
117 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
using System.Windows.Forms; | ||
using Microsoft.Xna.Framework; | ||
using SimplexIde; | ||
|
||
namespace SimplexCore | ||
{ | ||
public static partial class Sgml | ||
{ | ||
public static Form1 form; | ||
public static Color outsideColor = Color.Black; | ||
|
||
public static void window_center() | ||
{ | ||
#if EDITOR | ||
form.Location = new System.Drawing.Point((Screen.PrimaryScreen.WorkingArea.Width - form.Width) / 2, (Screen.PrimaryScreen.WorkingArea.Height - form.Height) / 2); | ||
#endif | ||
} | ||
|
||
public static string window_get_caption() | ||
{ | ||
#if EDITOR | ||
return form.Text; | ||
#endif | ||
} | ||
|
||
public static Color window_get_colour() | ||
{ | ||
#if EDITOR | ||
return outsideColor; | ||
#endif | ||
} | ||
|
||
public static bool window_get_fullscreen() | ||
{ | ||
#if EDITOR | ||
return form.WindowState == FormWindowState.Maximized; | ||
#endif | ||
} | ||
|
||
public static int window_get_height() | ||
{ | ||
#if EDITOR | ||
return form.Height; | ||
#endif | ||
} | ||
|
||
public static int window_get_width() | ||
{ | ||
#if EDITOR | ||
return form.Width; | ||
#endif | ||
} | ||
|
||
public static int window_get_x() | ||
{ | ||
#if EDITOR | ||
return form.Location.X; | ||
#endif | ||
} | ||
|
||
public static int window_get_y() | ||
{ | ||
#if EDITOR | ||
return form.Location.Y; | ||
#endif | ||
} | ||
|
||
public static int window_get_cursor() | ||
{ | ||
#if EDITOR | ||
CursorInfo ci = new CursorInfo(); | ||
ci.Size = Marshal.SizeOf(ci.GetType()); | ||
|
||
if (NativeMethods.GetCursorInfo(out ci)) | ||
{ | ||
Cursor c = new Cursor(ci.Handle); | ||
return c.GetHashCode(); | ||
} | ||
|
||
return -1; | ||
#endif | ||
} | ||
|
||
public static int window_get_y() | ||
{ | ||
#if EDITOR | ||
return form.Location.Y; | ||
#endif | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-23.6 KB
(92%)
SimplexIde/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
473d47255d1711cf2dfa9aed412f53fdac8e4c2f | ||
e50e4de07efe3b905ecf1f84127247c4bbac9374 |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters