HTML UI

Ideas and suggestions for how to improve the Warzone 2100 base game only. Ideas for mods go in Mapping/Modding instead. Read sticky posts first!
User avatar
Square
Trained
Trained
Posts: 76
Joined: 06 Jan 2009, 15:45

HTML UI

Post by Square »

Hey there,
I've got an Idea, that might be interesting to the devs. I hope nobody mentioned it before, and I ignored it :hmm:

The Idea is, basically, to replace the current user interface with a HTML & CSS template. Since HTML & CSS are very easy to understand and to learn, it could be a simple replacement of the current UI.
You can change/update the user interface really quickly and edit it to your needs. You can create themes for the UI, etc.

All we need would be a rendering engine ;) Webkit is available under the GNU License and Gecko is open source as well...
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: HTML UI

Post by KukY »

Nice idea... UI with HTML, CSS and JS...
If that would become true, I would make tons of themes :D
User avatar
Square
Trained
Trained
Posts: 76
Joined: 06 Jan 2009, 15:45

Re: HTML UI

Post by Square »

I created a sample file for the german version of WZ:
wzhtml.zip
You do not have the required permissions to view the files attached to this post.
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: HTML UI

Post by KukY »

Square wrote:I created a sample file for the german version of WZ:
wzhtml.zip
IMO, just heading tags would be better then an unordered list, and since you used transparency on the boxes you should have used relative positioning for contents to avoid transparency inheriting. And there are some more things unlogical to me, which could have been done in a simplier way.
User avatar
Square
Trained
Trained
Posts: 76
Joined: 06 Jan 2009, 15:45

Re: HTML UI

Post by Square »

ya, that's just a rough sketch
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany

Re: HTML UI

Post by m1ndgames »

i like the idea, if only someone would re-code the ui :D
User avatar
noccy
Trained
Trained
Posts: 45
Joined: 01 Aug 2010, 22:21
Location: Karlstad, Sweden

Re: HTML UI

Post by noccy »

This is a really good idea :) Tho why stick with HTML and CSS? As Lua support is being added, I think a closer and more easily realizable alternative would be to take the "WoW approach" and implement a simple XML-based interface using Lua for scripting. Both ideas would render the same results. The difference would be that the HTML alternative would require the devs to implement an entire HTML parser and form the UI around the existing HTML specifications, while the XML option would allow the interface code to be shaped by the actual requirements such as creating elements for windows, buttons and labels :)
noccy.com | xmpp: noccy(at)chillat.net | xfire: noccy80
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: HTML UI

Post by KukY »

noccy wrote:This is a really good idea :) Tho why stick with HTML and CSS? As Lua support is being added, I think a closer and more easily realizable alternative would be to take the "WoW approach" and implement a simple XML-based interface using Lua for scripting. Both ideas would render the same results. The difference would be that the HTML alternative would require the devs to implement an entire HTML parser and form the UI around the existing HTML specifications, while the XML option would allow the interface code to be shaped by the actual requirements such as creating elements for windows, buttons and labels :)
Well, I think HTML and CSS is a better idea because their styling possibilites are endless! Then the game could place in some stuff into elements.
User avatar
noccy
Trained
Trained
Posts: 45
Joined: 01 Aug 2010, 22:21
Location: Karlstad, Sweden

Re: HTML UI

Post by noccy »

KukY wrote:Well, I think HTML and CSS is a better idea because their styling possibilites are endless! Then the game could place in some stuff into elements.
It would be endless when it comes to changing the colors of your text or drawing a background. They would be less endless when it comes to everything else since HTML is a presentation language, and thus only defines the appearance. With XML you could use the same nested tag style but also add your own magic to the mix:

Code: Select all

<bw:frame id="transport" width="160" height="240" padding="5" style="dialog">
   <bw:frame width="150">
      <bw:button action="launchTransport()" icon="icons/ui/launch.svg" align="left" width="24" height="16" />
      <bw:button action="close('transport')" icon="icons/ui/close.svg" align="right" width="16" height="16" />
   </bw:frame>
    ...
</bw:frame>
This would beside making the code more obvious also allow it to be somewhat related with the user interface code in betawidget (hence bw) and make the parsing effective. What betawidget display element would f.ex. a DIV element relate to?

I'm not trying to rain on your parade here, just giving some feedback from my own experiences, especially when it comes to creating WoW interfaces and the likes :) Besides, from what I understand betawidget already has Lua support and the SVG support is on its way. As SVG is based on XML, all the tools will already be present that is needed to create a XML/LUA based UI, while writing an entire CSS3-compliant HTML renderer would take way too long :)
noccy.com | xmpp: noccy(at)chillat.net | xfire: noccy80