game_window_manager icon indicating copy to clipboard operation
game_window_manager copied to clipboard

Minimize to tray and run on startup QOL options would be nice!

Open addrum opened this issue 7 years ago • 17 comments

addrum avatar Apr 01 '18 15:04 addrum

This is planned, and although I have no specific experience with this part of the WinAPI I suspect it isn't too complex. Per-application profiles are coming first though :)

20k avatar Apr 01 '18 18:04 20k

Minimizing to tray can be surprisingly difficult using pure win32 api.

Stateford avatar Apr 01 '18 19:04 Stateford

@20k could you detail how I can build this repo correctly? If you're okay with it, I'm keen to look at implementing this myself as I need some more c++ practice. I've cloned it and opened the codeblocks project file but am getting a few errors (I've also initialised the submodule properly too). If I change the include optional to be experimental/optional it removes that error but introduces about 40 more. I did also manage to remove the SFML related error but it modified the codeblocks project file so I'm not sure if I'm doing something wrong there. Any pointers would be greatly appreciated! image

addrum avatar Apr 02 '18 12:04 addrum

@addrum You need a c++17 compliant compiler to get support, <experimental/optional> has a different interface in some respects, additionally the serialisation library I'm using also requires c++17

If you're lacking a c++17 compliant compiler I would recommend msys2, it is exceptionally quick and easy to get a working 64-bit build environment set up

Dependencies you'll need to fetch manually are: SFML + ImGui + ImGui-SFML, which expect to be in your include directory

Additionally MSVC should be able to compile this, but I have not tested this

20k avatar Apr 02 '18 12:04 20k

@20k you can in MSVC, but it's a huge pain, and if you don't know what you're doing. It took me hours to figure out all the missing deps in this project.

also std::launder() is not supported by msvc

Stateford avatar Apr 02 '18 12:04 Stateford

@idietmoran The std::launder is likely unnecessary, you could replace that line with v = *(T*)&data[prev] and make sure strict aliasing is disabled

What deps are missing? It should only be the three I mentioned above, along with the dep you pull in through submodules

20k avatar Apr 02 '18 12:04 20k

@idietmoran @addrum the std::launder requirement has been removed from that dependency

20k avatar Apr 02 '18 12:04 20k

@20k thanks, getting there! Two different errors now:

C:\workspace\game_window_manager\main.cpp|38|error: 'struct ImGuiStyle' has no member named 'ChildWindowRounding'; did you mean 'WindowRounding'?|
C:\workspace\game_window_manager\main.cpp|171|error: no matching function for call to 'Update(sf::Time)'|

Are you using a different version of IMGUI as the struct here doesn't seem to contain ChildWindowRounding? Not sure about the second error. Sorry for all the q's btw!

addrum avatar Apr 02 '18 14:04 addrum

imgui imgui-smfl smfl and you need freetype

Stateford avatar Apr 02 '18 15:04 Stateford

Ah thanks idietmoran, either my distro bundles freetype or it comes with SFML so I missed that :)

And @addrum it looks like they broke the API since I last used it. You can comment out the first line to temporarily disable that, and i think you can change the second line to Update(window, whatever) instead of just Update(whatever)

When I get some free time i'll update my deps

20k avatar Apr 02 '18 16:04 20k

When I tried to build I believe I was using a different version than you on one of the dependencies. If you could list which ones you are using later on that would awesome.

Stateford avatar Apr 02 '18 18:04 Stateford

I was attempting to update the project to the latest version so that there would be minimal configuration, unfortunately I have identified a severe issue with the latest version of either ImGUI or imgui-sfml which causes horrible stretching when the window resizes

20k avatar Apr 03 '18 02:04 20k

Luckily it turned out to be easy to fix. Thanks for bearing with me guys :) imgui and imgui-sfml are now pulled in manually. In the event that you don't use the cbp build system, you'll need to run "fix_build_system" after pulling in the submodules

20k avatar Apr 03 '18 03:04 20k

@20k nice one cheers! Think you forgot to check in imgui though as it's the only one of the 3 that doesn't pull down anything when you init the submodules (funserialisation and imgui-sfml pull fine)

addrum avatar Apr 04 '18 15:04 addrum

@20k do you have SFML in a specific folder? I've followed this video but used the -2 files instead but still get the following errors: image

Which I think is something to do with how I've linked the libs?

addrum avatar Apr 04 '18 15:04 addrum

the smfl-graphics-d-2.lib are the libraries when built with debug mode

Stateford avatar Apr 04 '18 15:04 Stateford

@addrum Thanks, it appears I messed up my commit

The libs should simply exist in your compilers search directory, make sure the names you're specifying are correct

20k avatar Apr 04 '18 18:04 20k