Skip to content

Commit a8af27b

Browse files
committed
V2.0.1 Fullscreen by Izoyo
1 parent 7269f77 commit a8af27b

4 files changed

Lines changed: 56 additions & 4 deletions

File tree

MainWindow.xaml.cs

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ namespace TFT_Overlay
1414
/// </summary>
1515
public partial class MainWindow : Window
1616
{
17+
[System.Runtime.InteropServices.DllImport("user32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto, ExactSpelling = true)]
18+
public static extern IntPtr GetForegroundWindow();
19+
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SetForegroundWindow")]
20+
public static extern bool SetForegroundWindow(IntPtr hWnd);
21+
public IntPtr myHandle;
22+
private System.Timers.Timer tTop;
23+
1724
private readonly Cursor LoLNormal = CustomCursor.FromByteArray(Properties.Resources.LoLNormal);
1825
private readonly Cursor LoLPointer = CustomCursor.FromByteArray(Properties.Resources.LoLPointer);
1926
private readonly Cursor LoLHover = CustomCursor.FromByteArray(Properties.Resources.LoLHover);
@@ -37,6 +44,17 @@ public MainWindow()
3744
InitializeComponent();
3845
LoadStringResource(Settings.Default.Language);
3946
this.Cursor = LoLNormal;
47+
48+
this.WindowState = System.Windows.WindowState.Normal;
49+
this.ShowInTaskbar = false;
50+
this.Topmost = OnTop;
51+
myHandle = new System.Windows.Interop.WindowInteropHelper(this).Handle;
52+
//...
53+
tTop = new System.Timers.Timer(15000);//set Timer
54+
tTop.Elapsed += new System.Timers.ElapsedEventHandler(theout);
55+
tTop.AutoReset = true;
56+
tTop.Enabled = true;
57+
4058
CanDrag = !Settings.Default.Lock;
4159

4260
if (Settings.Default.AutoDim == true)
@@ -50,6 +68,34 @@ public MainWindow()
5068
}
5169
}
5270

71+
public void theout(object source, System.Timers.ElapsedEventArgs e)
72+
{
73+
if (OnTop)
74+
{
75+
if (myHandle != GetForegroundWindow()) //let the win always on focus
76+
{
77+
SetForegroundWindow(myHandle);
78+
}
79+
try
80+
{
81+
this.Dispatcher.Invoke(
82+
new Action(
83+
delegate
84+
{
85+
this.Topmost = false;
86+
this.Topmost = true;
87+
88+
}
89+
)
90+
);
91+
}
92+
catch (System.Threading.Tasks.TaskCanceledException errMsg)
93+
{
94+
tTop.Stop();
95+
}
96+
}
97+
}
98+
5399
private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
54100
{
55101
Settings.Default.Save();
@@ -62,12 +108,12 @@ private void MenuItem_Click(object sender, RoutedEventArgs e)
62108

63109
private void MenuItem_Click_About(object sender, RoutedEventArgs e)
64110
{
65-
MessageBox.Show("TFT Information Overlay V" + CurrentVersion + " by J2GKaze/Jinsoku#4019\n\nDM me on Discord if you have any questions\n\nLast Updated: July 23rd, 2019 @ 5:45PM PST", "About");
111+
MessageBox.Show("TFT Information Overlay V" + CurrentVersion + " by J2GKaze/Jinsoku#4019\n\nDM me on Discord if you have any questions\n\nLast Updated: July 24th, 2019 @ 4:25 PST", "About");
66112
}
67113

68114
private void MenuItem_Click_Credits(object sender, RoutedEventArgs e)
69115
{
70-
MessageBox.Show("Big thanks to:\nChaoticoz: Lock Window, Always on Top, and Mouseover\nAsemco/Asemco#7390: Adding Origins and Classes\nAthenyx#9406: Designs\nTenebris: Auto-Updater\nOBJECT#3031: Items/Origins/Classes Strings Base\nJpgdev: Readme format\nKbphan\nEerilai\nꙅꙅɘᴎTqAbɘbᴎɘld#1175: Window Position/Size Saving, CPU Threading Fix\nNarcolic#6374: Item Builder\n\nShoutout to:\nAlexander321#7153 for the Discord Nitro Gift!\nAnonymous for Reddit Gold\nu/test01011 for Reddit Gold\n\nmac#0001 & bNatural#0001(Feel free to bug these 2 on Discord) ;)\nShamish#4895 (Make sure you bug this guy a lot)\nDekinosai#7053 (Buy this man tons of drinks)", "Credits");
116+
MessageBox.Show("Big thanks to:\nChaoticoz: Lock Window, Always on Top, and Mouseover\nAsemco/Asemco#7390: Adding Origins and Classes\nAthenyx#9406: Designs\nTenebris: Auto-Updater\nOBJECT#3031: Items/Origins/Classes Strings Base\nJpgdev: Readme format\nKbphan\nEerilai\nꙅꙅɘᴎTqAbɘbᴎɘld#1175: Window Position/Size Saving, CPU Threading Fix\nNarcolic#6374: Item Builder\nIzoyo: Fullscreen\n\nShoutout to:\nAlexander321#7153 for the Discord Nitro Gift!\nAnonymous for Reddit Gold\nu/test01011 for Reddit Gold\n\nmac#0001 & bNatural#0001(Feel free to bug these 2 on Discord) ;)\nShamish#4895 (Make sure you bug this guy a lot)\nDekinosai#7053 (Buy this man tons of drinks)", "Credits");
71117
}
72118

73119
private void MenuItem_Click_Lock(object sender, RoutedEventArgs e)

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
- [Click Here for instructions](https://github.com/Just2good/TFT-Overlay/blob/master/Localization.md)
2323

2424
## Version History
25+
- **7.24.2019**
26+
-[2.0.1](https://github.com/Just2good/TFT-Overlay/releases/tag/V2.0.1)
27+
- Fullscreen by Izoyo
28+
- Updated for 9.14B
29+
- IT & FR Updated
30+
2531
- **7.23.2019**
2632
- [1.9.9](https://github.com/Just2good/TFT-Overlay/releases/tag/V1.9.9)
2733
- Added Player Damage Chart

Utilities/Version.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
{
33
class Version
44
{
5-
public static string version = "1.9.9";
5+
public static string version = "2.0.1";
66
}
77
}

Version.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
{
33
class Version
44
{
5-
public static string version = "1.9.9";
5+
public static string version = "2.0.1";
66
}
77
}

0 commit comments

Comments
 (0)