C
C#11mo ago
thefake

making an overlay

I want to make my own overlay, just like xbox gamebar or that geforce experience thing where you can broadcast, etc. I dont want to tab out of my games when I just need media controls to skip a song. I want it to be similiar to the ALT + R thing from geforce experience where you get an overlay, that shows you info. How should I do this? I’d like it to be a system tray thing that toggles the gui on keypress. Should I do this with basic .NET C# in visual studio to make the gui and make it system tray thing somehow or should I do something else to build the ui?
24 Replies
Pobiega
Pobiega11mo ago
https://github.com/michel-pi/GameOverlay.Net is an excellent startingpoint
thefake
thefakeOP11mo ago
Looks good, but I’d like it to be interactive
Pobiega
Pobiega11mo ago
so make it interactive?
thefake
thefakeOP11mo ago
I only read “click-through”
Pobiega
Pobiega11mo ago
you can disable that iirc
thefake
thefakeOP11mo ago
Ah okay then Awesome
Pobiega
Pobiega11mo ago
take the example code, make it run, try to make some clickies work seems like a good starting point
thefake
thefakeOP11mo ago
Ill try this evening
Pobiega
Pobiega11mo ago
if that doesnt work, maybe look at https://github.com/lolp1/Overlay.NET
thefake
thefakeOP11mo ago
I dont know if I want to work with libraries I thought I would do it with bare .NET and C#
Pobiega
Pobiega11mo ago
uhh
thefake
thefakeOP11mo ago
Would that be worse?
Pobiega
Pobiega11mo ago
yes so, in order to render things "on top" of an exclusive full screen game, like the steam or geforce experience overlays do... you need to do some tricky stuff with directx
thefake
thefakeOP11mo ago
Oh I dont think im at the point where I can fool around with directx yet
Pobiega
Pobiega11mo ago
this is very much non-trivial code for a beginner, and if you truly want "no libraries" you cant even use SharpDX or similar direct x libs so you'll have to interface with native directx apis yourself 😄 tldr: dont be afraid of using libraries
thefake
thefakeOP11mo ago
Im not afraid but I want to go deep in C# and libraries are premade stuff
Pobiega
Pobiega11mo ago
You can make it with a library first, then check the source code of the library to see how it works then remake it without the library ¯\_(ツ)_/¯
thefake
thefakeOP11mo ago
I guess thats the best way
Pobiega
Pobiega11mo ago
Realistictly, you won't be able to do this using strictly only the base class library of .NET it simply doesnt have the bindings required to do something like this if you just want a desktop app that you can tab into, thats a different story
thefake
thefakeOP11mo ago
No Thats the point Tabbing out often “lags” games
Pobiega
Pobiega11mo ago
yep
thefake
thefakeOP11mo ago
I always do borderless window if I can but some only got fullscreen And in far cry 4 for example I wasnt even able to get the windows menu with the win-key or esc+ctrl, I had to use alt+tab and even when I did that it was laggy and weird Ive looked at the source code and it seems relatively easy
public static void MakeTopmost(IntPtr hwnd) => User32.SetWindowPos(hwnd, User32.HwndInsertTopMost, 0, 0, 0, 0, SwpFlags.ShowWindow | SwpFlags.NoActivate | SwpFlags.NoMove | SwpFlags.NoSize);
public static void MakeTopmost(IntPtr hwnd) => User32.SetWindowPos(hwnd, User32.HwndInsertTopMost, 0, 0, 0, 0, SwpFlags.ShowWindow | SwpFlags.NoActivate | SwpFlags.NoMove | SwpFlags.NoSize);
thefake
thefakeOP11mo ago
No description
thefake
thefakeOP11mo ago
Ive made a sketch in adobe illustrator of how I want it to be Everything will be rounded as hell
Want results from more Discord servers?
Add your server