Author Topic: Help with GUI skinning  (Read 232 times)

Tuathanach

  • Associate Developer
  • Hydlaa Citizen
  • *
  • Posts: 206
  • Arch Chancellor of the Knowledge Seekers
    • View Profile
    • Knowledge seekers
Help with GUI skinning
« on: July 01, 2013, 08:13:23 am »
A few questions
Has anyone made a visual xml editor for planeshift?, as it would make modding the xml much easier. I know you can ctrl-alt click the close button to refresh the window in game but I find it a bit awkward and it only works when there is a close button, which the chat window does not have.

Is it possible to have chat buttons over 2 lines?

I have an edited version of container file which works for forges and stock casting but not sacks as I get duplicate lines which makes it look like I get more slots but when you move anything on the duplicate line the line clears see below for pic and code.

Also is it possible to have different sized windows for different types of containers ie. the size below for stock casting and forges etc and a smaller size for sacks



Code: [Select]
<widget_description>
    <widget name="ContainerDescWindow" factory="pawsContainerDescWindow" visible="no" movable="yes" savepositions="yes" style="New Standard GUI">
        <frame x="100" y="100" width="300" height="242" border="yes"/>
        <title resource="Scaling Title Bar" text="Container" align="left" close_button="yes"/>

    <widget name="TakeStackAll" factory="pawsButton" tooltip = "Take and Stack All">
            <frame x="165" y="10" width="36" height="36" />
            <bgimage resource="ButtonPickup" />
        </widget>

<widget name="TakeAll" factory="pawsButton" tooltip = "Take All">
            <frame x="210" y="10" width="36" height="36" />
            <bgimage resource="ButtonPickup" />
        </widget>

        <widget name="View" factory="pawsButton" id="11">
            <frame x="255" y="10" width="36" height="36" />
            <bgimage resource="view" />
        </widget>

        <widget name="SmallInvButton" factory="pawsButton" tooltip="Open Inventory">
            <frame x="165" y="50" width="36" height="36"/>
            <bgimage resource="InventoryBulk" alpha="0"/>
        </widget>

        <widget name="Inventory" factory="pawsButton" id="12" tooltip="Transfer to inventory">
            <frame x="210" y="50" width="36" height="36" />
            <bgimage resource="ExchangeAccept" />
        </widget>

        <widget name="Combine" factory="pawsButton" id="13" tooltip="Combine items in container">
            <frame x="255" y="50" width="36" height="36" />
            <bgimage resource="ButtonCombine" />
        </widget>

        <widget name="ItemImage" factory="pawsWidget" visible="no" >
            <frame x="1" y="10" width="0" height="0" border="no"/>
        </widget>
        <widget name="ItemName" factory="pawsTextBox" >
            <frame x="1" y="1" width="150" height="10"/>
<font name="/planeshift/data/ttf/verdana.ttf" r="200" g="200" b="0" size="9" />
        </widget>
        <widget name="ItemDescription" factory="pawsMultiLineTextBox" >
            <frame x="5" y="20" width="150" height="55" border="no"/>
<font name="/planeshift/data/ttf/verdana.ttf" r="200" g="200" b="0" size="7" />
        </widget>


        <widget name="BulkList" factory="pawsListBox" selectable="0">
            <frame x="5" y="90" width="285" height="145" border="no"/>
            <columns height="36" headings="no" >
                <column width="36" >
                    <widget name="Bulk0" factory="pawsSlot">
                        <frame x="0" y="0" width="36" height="36" />
                    </widget>
                </column>
                <column width="36" >
                    <widget name="Bulk1" factory="pawsSlot">
                        <frame x="0" y="0" width="36" height="36" />
                    </widget>
                </column>
                <column width="36" >
                    <widget name="Bulk2" factory="pawsSlot">
                        <frame x="0" y="0" width="36" height="36" />
                    </widget>
                </column>
                <column width="36" >
                    <widget name="Bulk3" factory="pawsSlot">
                        <frame x="0" y="0" width="36" height="36" />
                    </widget>
                </column>
        <column width="36" >
                    <widget name="Bulk4" factory="pawsSlot">
                        <frame x="0" y="0" width="36" height="36" />
                    </widget>
                </column>
                <column width="36" >
                    <widget name="Bulk5" factory="pawsSlot">
                        <frame x="0" y="0" width="61" height="61" />
                    </widget>
                </column>
<column width="36" >
                    <widget name="Bulk6" factory="pawsSlot">
                        <frame x="0" y="0" width="36" height="36" />
                    </widget>
                </column>
                <column width="36" >
                    <widget name="Bulk7" factory="pawsSlot">
                        <frame x="0" y="0" width="61" height="61" />
                    </widget>
                </column>

       
            </columns>
        </widget>
    </widget>

</widget_description>
Shindroks Crater Project Wiki
Interested contact Myself or Zunna.
We are contactable ingame, by PM or on Discord

Bonifarzia

  • Hydlaa Notable
  • *
  • Posts: 718
    • View Profile
Re: Help with GUI skinning
« Reply #1 on: July 01, 2013, 08:49:56 am »
Has anyone made a visual xml editor for planeshift?
I don't think so. This may be useful, but seems quite complicated to implement.
Is it possible to have chat buttons over 2 lines?
The ones for the chat tabs? Arranging the buttons in two lines should work fine, multiple lines per button is probably not possible.
I have an edited version of container file which works for forges and stock casting but not sacks as I get duplicate lines which makes it look like I get more slots but when you move anything on the duplicate line the line clears see below for pic and code.
This looks like PS#6002 to me, so probably not your fault.
Also is it possible to have different sized windows for different types of containers ie. the size below for stock casting and forges etc and a smaller size for sacks
I don't think so, but at least you can make them resizeable. Personally, I prefer large container windows without scroll bars. Yes, there is empty space, but at least you don't have to scroll for "hidden" content.

Tuathanach

  • Associate Developer
  • Hydlaa Citizen
  • *
  • Posts: 206
  • Arch Chancellor of the Knowledge Seekers
    • View Profile
    • Knowledge seekers
Re: Help with GUI skinning
« Reply #2 on: July 01, 2013, 09:03:35 am »
Thanks Bonifarzia

Another thing is it possible to remove borders from the side of windows and only have top border?

The ones for the chat tabs? Arranging the buttons in two lines should work fine, multiple lines per button is probably not possible.
I should of said I plan to have 5 buttons on one line and 5 on the next, it would have made things clearer. below is code I am using but all 10 buttons end up on the same line.
Code: [Select]
<widget name="Chat Tabs" factory="pawsTabWindow">
            <frame x="0" y="0" width="200" height="200" border="no" />
            <attachpoints>
                <attach point="ATTACH_BOTTOM" />
                <attach point="ATTACH_TOP" />
                <attach point="ATTACH_LEFT" />
                <attach point="ATTACH_RIGHT" />
            </attachpoints>

       <widget name="ButtonsBackground" factory="pawsWidget">
                <frame x="0" y="0" width="200" height="50" border="no" />
<bgimage resource="Scaling Field Background" />
              <attachpoints>
                <attach point="ATTACH_TOP" />
                <attach point="ATTACH_BOTTOM" />
                <attach point="ATTACH_LEFT" />
                <attach point="ATTACH_RIGHT" />
        </attachpoints>
        </widget>


 
                <widget name="Main Button" factory="pawsButton" toggle="yes" id="1000" tooltip="Main" shadows="yes" style="Standard Tab">
                    <frame x="0" y="0" width="40" height="20" border="no" />
                    <label text="Main"/>
                <attachpoints>
                    <attach point="ATTACH_TOP" />
                    <attach point="ATTACH_LEFT" />
                </attachpoints>
   
                </widget>
                <widget name="Chat Button" factory="pawsButton" toggle="yes" id="1008" tooltip="Chat" shadows="yes" style="Standard Tab">
                    <label text="Chat"/>
                    <frame x="40" y="0" width="40" height="20" border="no"/>
                <attachpoints>
                    <attach point="ATTACH_TOP" />
                    <attach point="ATTACH_LEFT" />
                </attachpoints>
   
                </widget>
                <widget name="NPC Button" factory="pawsButton" toggle="yes" id="1002" tooltip="NPC" shadows="yes" style="Standard Tab">
                    <frame x="80" y="0" width="40" height="20" border="no" />
                    <label text="NPC"/>
                <attachpoints>
                    <attach point="ATTACH_TOP" />
                    <attach point="ATTACH_LEFT" />
                </attachpoints>
   
                </widget>
                <widget name="Tell Button" factory="pawsButton" toggle="yes" id="1003" tooltip="Whisper" shadows="yes" style="Standard Tab">
                    <frame x="120" y="0" width="40" height="20" border="no" />
                    <label text="Whisper"/>
                <attachpoints>
                    <attach point="ATTACH_TOP" />
                    <attach point="ATTACH_LEFT" />
                </attachpoints>
   
                </widget>
                <widget name="Guild Button" factory="pawsButton" toggle="yes" id="1004" tooltip="Guild" shadows="yes" style="Standard Tab">
                    <frame x="160" y="0" width="40" height="20" border="no" />
                    <label text="Guild"/>
                <attachpoints>
                    <attach point="ATTACH_TOP" />
                    <attach point="ATTACH_LEFT" />
                </attachpoints>
   
                </widget>
                <widget name="Group Button" factory="pawsButton" toggle="yes" id="1005" tooltip="Group" shadows="yes" style="Standard Tab">
                    <frame x="0" y="20" width="40" height="20" border="no" />
                    <label text="Group"/>
     
                </widget>
                <widget name="Alliance Button" factory="pawsButton" toggle="yes" id="1009" tooltip="Alliance" shadows="yes" style="Standard Tab">
                    <frame x="40" y="20" width="40" height="20" border="no" />
                    <label text="Alliance"/>
     
                </widget>
                <widget name="Auction Button" factory="pawsButton" toggle="yes" id="1006" tooltip="Auction" shadows="yes" style="Standard Tab">
                    <frame x="80" y="20" width="40" height="20" border="no" />
                    <label text="Auction"/>
   
                </widget>
                <widget name="System Button" factory="pawsButton" toggle="yes" id="1001" tooltip="System" shadows="yes" style="Standard Tab">
                    <label text="System"/>
                    <frame x="120" y="20" width="40" height="20" border="no" />
   
                </widget>
                 <widget name="Help Button" factory="pawsButton" toggle="yes" id="1007" tooltip="Help" shadows="yes" style="Standard Tab">
                    <label text="Help"/>
                    <frame x="160" y="20" width="40" height="20" border="no" />

               </widget>
« Last Edit: July 01, 2013, 09:46:52 am by Tuathanach »
Shindroks Crater Project Wiki
Interested contact Myself or Zunna.
We are contactable ingame, by PM or on Discord