GUI Programming
Moderator: Moderators
GUI Programming
I would like to make a program (or framework/programming language) that, within less then 24 hours of programming/preparation allows me to make an executable that takes an text(preferably xml or other structured data format) file as a parameter and use it to present a GUI on Windows (and preferably Linux) that has no "window handler"... use create a text file and then launch another program with parameters...
yes this could be used to create a Spring single-player interface and that is my intention... but as I am chronically bad at completing projects I felt it was a good idea to post it here so I didn't get anyone's hopes up.
I found TCL/TK ... would that do what I want?
yes this could be used to create a Spring single-player interface and that is my intention... but as I am chronically bad at completing projects I felt it was a good idea to post it here so I didn't get anyone's hopes up.
I found TCL/TK ... would that do what I want?
-
luckywaldo7
- Posts: 1398
- Joined: 17 Sep 2008, 04:36
Re: GUI Programming
+1 to Qt, also gl with this endeavor (:
Re: GUI Programming
The GUI is only a faction of a single-player frontend. You also need all the logic to handle the actions when you push the buttons. And the SP problem can't be solved in 24hr with a one size fit all single player interface. Have you tried the ingame frontend I made? Please try this: Install that and double-click the gundam head icon it'll dump on your desktop.yes this could be used to create a Spring single-player interface and that is my intention...
Re: GUI Programming
if it should eventually run on other OS, it should be in Python or Java. therefore, i give a -1 to QT.
I never used an XML to GUI thing, but i know that Java has it (not sure... JavaFX?), and i can't imagine that Python does not (or something similar/more easy). starting a new project from scratch with C++ these days: please no!
especially for someone that is not primarily a coder. even if he never had to write C++, it is best to stay as far away from it as possible.
I never used an XML to GUI thing, but i know that Java has it (not sure... JavaFX?), and i can't imagine that Python does not (or something similar/more easy). starting a new project from scratch with C++ these days: please no!
especially for someone that is not primarily a coder. even if he never had to write C++, it is best to stay as far away from it as possible.
Re: GUI Programming
Use Lua! Build your interface out of chili.
Then you can have have a single player interface that is "full screen", "not a separate lobby", "configurable by Spring modders", just like some people said it be should in the other thread.
Then you can have have a single player interface that is "full screen", "not a separate lobby", "configurable by Spring modders", just like some people said it be should in the other thread.
Re: GUI Programming
That's just cause you didn't consider pySide/pyQT python bindings to Qt I hopehoijui wrote:if it should eventually run on other OS, it should be in Python or Java. therefore, i give a -1 to QT.
nor would any sane person if you ask me. Unless the coder never sees the xml that is ofc, as one wouldn't with certain RAD tools.hoijui wrote:I never used an XML to GUI thing...
Seriously though, have a look at how QtQuick Guis are defined. The syntax is basically JS, but you can still do your heavy logic from the python/c++ side if you want and with QtDesigner you don't even need to know that much to get your feet wet. (sidenote, hoijui, the video I showed you the other day is QtQuick)
Re: GUI Programming
what i mean is, use a platform independent language, and platform independent libraries. a QT binding for python ... sounds like it still depends on platform specific libs, which brings problems with distributing and bug fixing (bugs happening only on OS A, used by the user, and not on OS B, used by the dev). If python does not have a good enough GUI lib its self, use Java, as it does have it.
i hate it when people decide on using libX cause it has a few cool shiny decorative features, while libY would instead be using a more sane concept at its core.
i hate it when people decide on using libX cause it has a few cool shiny decorative features, while libY would instead be using a more sane concept at its core.
Re: GUI Programming
Hmm, I don't get your point entirely here. How can any code not depend on the availability of platform dependent libs? If you're alluding Java doesn't, is this case really different from the requirement of having a JRE available on your target platform that can handle the GUI? I mean it's been quite a while since I've used java for GUI stuff, but I'm under the impression it still varies what windowing system you can use between platforms.hoijui wrote:sounds like it still depends on platform specific libs, which brings problems with distributing and bug fixing (bugs happening only on OS A, used by the user, and not on OS B, used by the dev)
Meaning what exactly?SinbadEV wrote:that has no "window handler"
Re: GUI Programming
imo one of the best ideas as then people could quickly modify the SP thing to fit their needs. (like add in a game specific background animation or something)zwzsg wrote:Use Lua! Build your interface out of chili.
Downside would be that SP interface would have to be bundled with the mod (?)
ie to add a new button or mission you must update the whole game..
This would work for some games but not for BA or XTA who update slower.
Or would a "BA singleplayer" mutator work?
Also can spring restart itself with a different mod?
That would be pretty win.
will that not be different depending on OS too?launch another program with parameters
Re: GUI Programming
@koshi
what you are referring to sounds like AWT, which was super-seeded by Swing in ~ 1997 as the main GUI toolkit. the look can be changed by a function call, and the standard ones consist of the common platform native ones plus .. i think 1 or 2 java specific ones. all of them are available on all platforms, and look and work exactly the same everywhere. if python does not have something like that, QT bindings is fine.. guess QT should also be quite stable. :D
what you are referring to sounds like AWT, which was super-seeded by Swing in ~ 1997 as the main GUI toolkit. the look can be changed by a function call, and the standard ones consist of the common platform native ones plus .. i think 1 or 2 java specific ones. all of them are available on all platforms, and look and work exactly the same everywhere. if python does not have something like that, QT bindings is fine.. guess QT should also be quite stable. :D
Re: GUI Programming
Heh, 1997 you say? I could've sworn it was more recent. I do remember generics were only very recently introduced into the language standard then.
Anyhow, SinbadEV, don't you have any language preference at all? Imo learning a new toolkit and a new language at the same time isn't the best idea even for a seasoned programmer.
Anyhow, SinbadEV, don't you have any language preference at all? Imo learning a new toolkit and a new language at the same time isn't the best idea even for a seasoned programmer.
Re: GUI Programming
Already done. Look at the AppLauncher I made for P.U.R.E:
(yes, you can disable the border)
It takes an XML file that defines the buttons and references the images.

It's implemented in C# 1.1 and works under Mono (except for scrolling) last time I tested it.
edit: if you decide to re-invent the wheel, I can send you the source. Python + Tk or PyGame would've been a better platform since Tk has better cross-platform behavior. Also, the entire Python framework can be compiled into a single Exe along with your app, unlike C# that requires the user to have .NET or Mono installed, hence my use of the paleolithic 1.1 version.
(yes, you can disable the border)
It takes an XML file that defines the buttons and references the images.

It's implemented in C# 1.1 and works under Mono (except for scrolling) last time I tested it.
edit: if you decide to re-invent the wheel, I can send you the source. Python + Tk or PyGame would've been a better platform since Tk has better cross-platform behavior. Also, the entire Python framework can be compiled into a single Exe along with your app, unlike C# that requires the user to have .NET or Mono installed, hence my use of the paleolithic 1.1 version.
Re: GUI Programming
in java 1.5, September 2004, about 2.5 years after C# was announced.koshi wrote:Heh, 1997 you say? I could've sworn it was more recent. I do remember generics were only very recently introduced into the language standard then.
comparatively recently, yeah. :D
... i know how you feel. getting old sucks!
Re: GUI Programming
Like I demonstrated with KP and GRTS, using an ingame Lua menu as a SP interface lets you have a game scene in background. Pretty cool, and it's how tons of commercial game do it.Like add in a game specific background animation or something.
Not a downside once you realised any meaningful single player interface has to be tailored to each game specifics anyway.Downside would be that SP interface would have to be bundled with the mod
I made one. Then I realised depending on another file is a liability, so I just included all files into the archive. See there.Or would a "BA singleplayer" mutator work?
Yes.Also can spring restart itself with a different mod?
Re: GUI Programming
True. But unless it is included from the start (like in KP & gundamRTS) it would be confusing for noobs, having to download a mutator or even basically the same files twice.Not a downside once you realised any meaningful single player interface has to be tailored to each game specifics anyway.Downside would be that SP interface would have to be bundled with the mod
Still I think this kind of SP (+ the mission tab in lobbies) is the way to go. Is your SP thing able to start missions made with the mission editor? (the ca one)
Re: GUI Programming
@Pxtl
Yeah, that's basically what I'm going for...
@zwzsg
Your in-games interface is actually probably a better option on many levels... I am going to have to think about this some more.
@koshi
To be honest I really just want to use a language that isn't stupid... so python is out of the question... C#/Mono, Perl or Javascript would probably be my preferred development languages as those are the ones I have experience in... but I know none of those are ideally suited for cross platform GUI development so I was thinking of branching out.
All that said, an in-game GUI is probably the best option providing it can be started reliably from the command line so I'll be looking at zwzsg's stuff first and trying to see if I can make it look the way I want it to... I'd prefer a launcher because I like to not have to load up all of spring before being able to pick a map etc... and I could create one for games without having to create a mutator or new version or whatever.
Yeah, that's basically what I'm going for...
@zwzsg
Your in-games interface is actually probably a better option on many levels... I am going to have to think about this some more.
@koshi
To be honest I really just want to use a language that isn't stupid... so python is out of the question... C#/Mono, Perl or Javascript would probably be my preferred development languages as those are the ones I have experience in... but I know none of those are ideally suited for cross platform GUI development so I was thinking of branching out.
All that said, an in-game GUI is probably the best option providing it can be started reliably from the command line so I'll be looking at zwzsg's stuff first and trying to see if I can make it look the way I want it to... I'd prefer a launcher because I like to not have to load up all of spring before being able to pick a map etc... and I could create one for games without having to create a mutator or new version or whatever.
Re: GUI Programming
This QT stuff looks like exactly what I'm looking for... I haven't figured out how but apparently I can do almost everything with javascript and QML... then I suppose I'll need a "tiny" piece of C++ written for each target OS to do the actual "launching"

