-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Draft] Task settings #135
base: master
Are you sure you want to change the base?
Conversation
@evertvorster , please try and run this (python3 python/randr.py) Result should be something like:
|
Hi there! Thanks for looking into this. I think there is a bug in the script, as it detects only one monitor:
For comparison, here is the output of xrandr:
|
I wonder if xrandr is the best way to interrogate for available monitors.... |
Since this is a new venture in settings for Vega Strike, can we agree on a rough list of requirements for the configuration app? Having the settings app separate from the main application is weird, and counter-intuitive. Ideally, the game engine should call the settings app on startup. If the configuration file does not exist, or does not have a valid screen configuration anymore, give the user the choice of which screen and resolution to run on, and save that to the config file, then return that information back to the game engine. Now, you should also be able to call the configuration app from the game menu. When you call it like this, then the configuration app should expose all the configuration options and at the end write that to the configuration file, and return back to the game. It is my humble opinion that this should be in place before we start porting over each of the settings that is possible with the old settings app. We could then incrementally move over settings that makes sense. There are also quite a few settings in the original configuration file that is not settable in the app, and you needed to modify the configuration file directly. Stuff like assigning keys to buttons on the joystick, which axes does what and so on. That might be a good reach goal for sometime in the future. |
It's not yet ready. I'm in the data collecting stage and I have only one monitor so I literally needed your input to see the results are not what I expected.
This is my first attempt. I was sure python would do this easily and it turns out it ain't so. We'll probably need separate code for Windows or use some extra library like SDL. |
Thanks for the explanation. I am quite happy to run and test code. When I see the code doing something that is unexpected, I'll call it a bug and describe it as best as I can. Yes, there will most probably be separate code for Windows and Linux. I agree that the settings app should be in Assets. The argument for having it separate is also a good one. The game UI is very hardcoded and inflexible. |
We're already using SDL2 so let's see if we can get the information from it so we can have a single path for all platforms. Pretty sure SDL2 already has methods to query this stuff. |
This was intended as a temporary measure until we move the settings app into the game itself. I am holding off on that until I can figure out how to pass the window handle from C++ to python. This is not easy but it seems an elegant and challenging solution. However, I'm also working on other things, so it's slow going. |
I found it ! It being the dark art of mixing SDL and TKinter. As @BenjamenMeyer said, SDL2 is a far superior solution for implementing this. I'm keeping this PR open for now, but I hope that we'll have a working PoC in a month or so. |
Provide an alternative to vegasettings
This is a draft PR.
Currently, used only for testing on various systems.