Skip to content
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

Settings App (GUI) #19

Closed
Torrunt opened this issue Apr 29, 2014 · 9 comments
Closed

Settings App (GUI) #19

Torrunt opened this issue Apr 29, 2014 · 9 comments
Assignees

Comments

@Torrunt
Copy link
Owner

Torrunt commented Apr 29, 2014

Make a separate application for settings using something like GWEN for the GUI. Make it a little more user friendly than editing a text file. It should be separate so the vimage is left as light-weight as possible.

(Note: should also replace the button that opens the config.txt file with a button that opens the vimage_settings.exe)

@Torrunt Torrunt self-assigned this Apr 29, 2014
@arxae
Copy link
Contributor

arxae commented Jun 4, 2014

I'm on this. Only bindings are left.
I did however integrate it into vimage (using gwen). But it only loads when the button is pressed. Is this acceptable?

I think it's better to integrate into the application so there is no need to replicate the config loading code and such. It also uses the same sfml window as you are using now. As i said, the only time it runs the code, is when the user opens the configuration window. This way, it should have no effect on the startup time. I will take some startup metrics later to confirm this.

This is how it currently looks:
wk8u4ly

It is a bit bigger then needed, but i estimated the size needed for all the binding controls.

If this option is unacceptable, then why not just a regular gui? Mono supports winforms as far as i know. It's less hassle then using a gui framework like this.

@Torrunt
Copy link
Owner Author

Torrunt commented Jun 5, 2014

You wouldn't need to replicate any code if you didn't integrate it into the main project. I was thinking of just making a separate project in the same solution then just add links to any code that is needed (ie: Config.cs).

It looks alright so far I guess. What do you mean by it's using the same sfml window? You mean the same window as the opened image? How does that work?

I don't know about using winforms, I've never really messed around with GUI in C# before. I just wanted to try out GWEN some more (only used it a little bit in another project).

@arxae
Copy link
Contributor

arxae commented Jun 5, 2014

Good point, forgot about that.

Yeah, I pass a reference to the opened image window and when the gui opens it just draws over it. When the window is open, all the controls like zooming and such are disabled because you could manipulate the gui in the same way :P

If it's decided to take a regular gui instead. Winforms is supported by mono (except for part of multithreading, which is not needed i suppose). So depending on the current state, it might be able to run on linux too (with or witouth using winforms).

I have pushed the current code (though it is incomplete) to my personal repo if you want to have a look. Implementation might not be perfect yet, but i wanted to get it working fully before making the code pretty

@Torrunt
Copy link
Owner Author

Torrunt commented Jun 5, 2014

I definitely do not want the window to be rendered over the image. It should be a completely different window/instance,

Your forked repo seems a bit messed up. It's missing a bunch of commits and just has all the changes from the missing ones in the latest one. It's also missing the DevILNet.dll and the references to the GWEN dlls are not relative (arxae@d8a8840#diff-a7360fdce95db104483c15eb411027ffR68). I couldn't actually get the Config Window to open, kept on complaining about the Font for some reason.

@arxae
Copy link
Contributor

arxae commented Jun 5, 2014

Yeah i messed up my repo a bit. :P i know about it.

Well then it all depends whether you want to keep it on windows, or try for cross platform. If you are going to stay on windows, it makes more sense to just use a winforms/wpf then going trough the hassle of using another sfml windows/gui library. The font thingy being one of those reasons. The "official" gwen.net binding is a bit broken in that regards.

Choice is up to you. I can do all 3 of them (wpf, winforms or gwen.net). Does vimage runs under mono? I haven't tested. But if it does, and you don't want to break it, only the wpf options falls away.

@Torrunt
Copy link
Owner Author

Torrunt commented Jun 5, 2014

I don't really care about making vimage cross platform, at least not any time soon. At the moment I make use of the Desktop Window Management API (dwmapi.dll) to allow for transparency and the user32.dll for always on top mode. I have no experience with Linux so I'm not even going to try.

I think winforms might be alright. I just made a new branch with a simple form I put together.
https://github.com/Torrunt/vimage/tree/settings-(winform)

vimage_settings1

@arxae
Copy link
Contributor

arxae commented Jun 5, 2014

If you make use of the windows api, the chance is rather small to none anyway. Maybe on wine. But if it's not a priority you can do what you want for windows.

I just saw your branch, made some small changes to the form so it's a bit nicer. I'll make a pull request and you can see for yourself. If you dislike the changes, feel free to discard the request :P

I might make a wpf one one a separate branch later

@Torrunt
Copy link
Owner Author

Torrunt commented Jun 18, 2014

I just finished up work on the settings app and merged it into the main branch. So I'll guess I'll close this issue now.

664e592

@Torrunt Torrunt closed this as completed Jun 18, 2014
@arxae
Copy link
Contributor

arxae commented Jun 18, 2014

I haven't gotten any time to do a wpf version yet, but if i get around to it then i'll just make a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants