Author Topic: PAWS Preview in a Browser  (Read 757 times)

redhound

  • Hydlaa Resident
  • *
  • Posts: 97
    • View Profile
PAWS Preview in a Browser
« 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:



The first results of that experiment are on GitHub: https://github.com/roman-yagodin/PlaneShift.SkinTools.
« Last Edit: January 11, 2015, 04:04:19 pm by redhound »

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: PAWS preview in a browser
« Reply #1 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.  :-[

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

redhound

  • Hydlaa Resident
  • *
  • Posts: 97
    • View Profile
Re: PAWS preview in a browser
« Reply #2 on: December 30, 2014, 03:27:47 am »
I hope it would be useful, LigH  :)

Update to the project: added XSD schemas and script to validate PAWS files. Schemas are auto-generated on /planeshift/data/gui contents from released client after some patching.

Tuathanach

  • Associate Developer
  • Hydlaa Citizen
  • *
  • Posts: 206
  • Arch Chancellor of the Knowledge Seekers
    • View Profile
    • Knowledge seekers
Re: PAWS preview in a browser
« Reply #3 on: December 30, 2014, 05:21:22 am »
It does appear very useful, I do need to try it out. :thumbup:
Shindroks Crater Project Wiki
Interested contact Myself or Zunna.
We are contactable ingame, by PM or on Discord

apyj13

  • Traveller
  • *
  • Posts: 26
    • View Profile
Re: PAWS preview in a browser
« Reply #4 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!

redhound

  • Hydlaa Resident
  • *
  • Posts: 97
    • View Profile
Re: PAWS preview in a browser
« Reply #5 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.
« Last Edit: December 30, 2014, 04:19:35 pm by redhound »

redhound

  • Hydlaa Resident
  • *
  • Posts: 97
    • View Profile
Re: PAWS preview in a browser
« Reply #6 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:



Get the recent snapshot package here, see README.md for more details.

Don't hesitate to fill an issue for bug or feature request!

redhound

  • Hydlaa Resident
  • *
  • Posts: 97
    • View Profile
Re: PAWS preview in a browser
« Reply #7 on: January 11, 2015, 04:00:12 pm »
Made first release of PlaneShift.SkinTools. 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 for more details.
« Last Edit: January 11, 2015, 04:02:07 pm by redhound »

MishkaL1138

  • Veteran
  • *
  • Posts: 1175
  • Meh.
    • View Profile
Re: PAWS Preview in a Browser
« Reply #8 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?

"It's all fun and games until someone stabs someone else in the eye."

redhound

  • Hydlaa Resident
  • *
  • Posts: 97
    • View Profile
Re: PAWS Preview in a Browser
« Reply #9 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...