PlaneShift

Development => PlaneShift Mods => Topic started by: redhound on December 29, 2014, 08:59:34 am

Title: PAWS Preview in a Browser
Post by: redhound on December 29, 2014, 08:59:34 am
I was thinking long about some kind of pawseditor alternative to preview skin parts before testing them in psclient, and recently experimented with XSLT support for PAWS. The idea is to transform PAWS XML file by XSLT script into the HTML with inline CSS styles for PAWS presentation markup, starting at least with widget placement.

By example:

Code: [Select]
<widget name="MyWidget">
   <frame x="10" y="20" width="35" height="15" />
   ...
</widget>

Should transform to:

Code: [Select]
<div class="widget" name="MyWidget" style="left:10px;top:20px;width:35px;height:15px">
   MyWidget
   ...
</div>

Inventory window layout in Firefox:

(https://raw.githubusercontent.com/roman-yagodin/PlaneShift.SkinTools/master/images/screen_inventory.png)

The first results of that experiment are on GitHub: https://github.com/roman-yagodin/PlaneShift.SkinTools (https://github.com/roman-yagodin/PlaneShift.SkinTools).
Title: Re: PAWS preview in a browser
Post by: LigH on December 29, 2014, 09:38:54 am
\\o// Very useful!

I thought about a form designer interface like some Visual Studio IDE once ... but never even started that.  :-[
Title: Re: PAWS preview in a browser
Post by: redhound on December 30, 2014, 03:27:47 am
I hope it would be useful, LigH  :)

Update to the project: added XSD schemas (https://github.com/roman-yagodin/PlaneShift.SkinTools/tree/master/schema) and script to validate PAWS files. Schemas are auto-generated on /planeshift/data/gui contents from released client after some patching (http://www.hydlaaplaza.com/flyspray/index.php?project=2&task_id=6740).
Title: Re: PAWS preview in a browser
Post by: Tuathanach on December 30, 2014, 05:21:22 am
It does appear very useful, I do need to try it out. :thumbup:
Title: Re: PAWS preview in a browser
Post by: apyj13 on December 30, 2014, 02:20:12 pm
I've been using this today, and it's been extremely helpful with small alignment tweaks so that I don't have to restart PS every time just to see where something lines up.  Thanks sharing it!
Title: Re: PAWS preview in a browser
Post by: redhound on December 30, 2014, 04:07:40 pm
I'm glad this helps you, apyj13!
Just note that it cannot count values (like borders), defined in the styles.xml.
Title: Re: PAWS preview in a browser
Post by: redhound on December 30, 2014, 04:18:47 pm
Another update to the project: added separate XSL transformation to preview imagelist.xml resources in the browser:

(https://raw.githubusercontent.com/roman-yagodin/PlaneShift.SkinTools/master/images/screen_imagelist.png)

Get the recent snapshot package here (https://github.com/roman-yagodin/PlaneShift.SkinTools/archive/master.zip), see README.md (https://github.com/roman-yagodin/PlaneShift.SkinTools/blob/master/README.md) for more details.

Don't hesitate to fill an issue (https://github.com/roman-yagodin/PlaneShift.SkinTools/issues) for bug or feature request!
Title: Re: PAWS preview in a browser
Post by: redhound on January 11, 2015, 04:00:12 pm
Made first release of PlaneShift.SkinTools (https://github.com/roman-yagodin/PlaneShift.SkinTools/releases). Most notable changes:

1. Added scripts to build skin package and deploy it to local PS client installs.
2. Updated directory structure / file names to better integration with a skin source (all resources in the pst dir, all scripts have pst- prefixes).
3. Scripts now used shared config, so rename pst-params.template to pst-params and set values in it according to your environment.
4. XSL transformations for widgets and imagelist were merged into the single pst/xslt/default.xslt file, so it's the only file what should be referenced in the <xsl:stylesheet> entries.

Please see README.md (https://github.com/roman-yagodin/PlaneShift.SkinTools/blob/master/README.md) for more details.
Title: Re: PAWS Preview in a Browser
Post by: MishkaL1138 on June 18, 2015, 07:34:11 am
Few questions here:

- With the advent of UEngine, have you thought whether PAWS will still be the standard for GUI skins?
- Can I use it on a Mac? Also, is the process for using it in a Mac any different than from what it was intended to at first?
- Can you see why kids love the taste of Cinnamon Toast Crunch?
Title: Re: PAWS Preview in a Browser
Post by: redhound on June 18, 2015, 08:02:06 am
- With the advent of UEngine, have you thought whether PAWS will still be the standard for GUI skins?

I don't know - do UE have its own UI library?.. I think PAWS could be implemented over it without too much fuss.

- Can I use it on a Mac? Also, is the process for using it in a Mac any different than from what it was intended to at first?

AFAIK Safari support XSLT transforms, so you should be able to use it for preview of UI widgets & imagelist. It's only helper scripts written for Linux.

- Can you see why kids love the taste of Cinnamon Toast Crunch?

Children always love to make noise, ya know...