PDA

View Full Version : Theme question (Framedef and +)



Roncorps
July 27th, 2012, 19:55
I'm trying to put a custom theme on, but I have some minor question about the framedef.


<framedef name="chatbox">
<bitmap file="graphics/frames/chatbox.png" />
<topleft rect="0,0,18,16" />
<top rect="17,0,494,16" />
<topright rect="505,0,18,16" />
<left rect="0,117,18,674" />
<middle rect="17,16,494,674" />
<right rect="605,15,18,674" />
<bottomleft rect="0,491,17,39" />
<bottom rect="17,691,494,39" />
<bottomright rect="505,491,18,39" />

What does the 0,0,0,0 mean ? I know that it is position/size, but I have played around 4-5 hours on it and I don't know much about which one is which. Easy one eh !

Dakadin
July 27th, 2012, 20:45
Here is what the Ruleset Reference for framedef says:

<offset > ... </offset> A comma separated list of four numbers specifying the left, top, right and bottom offsets to define the nine components of the frame.
<topleft > ... </topleft> The coordinates of the top left component, in the form: x,y,width,height

It is located here: https://www.fantasygrounds.com/refdoc/framedef.xcp

Roncorps
July 27th, 2012, 20:47
Thanks ! I know about the ruleset reference, but didn't know it was showing so much info ... I'm kind of stupid right now to not have looked at it earlier.

Dakadin
July 27th, 2012, 21:00
Nah! Don't feel bad. I think we all go through it at times. ;)

Roncorps
July 27th, 2012, 21:03
Thanks =)

Second question : It say top, middle, left, etc. component, but what if my image is one block ? Can I write only where is the top, left, bottom and right (corner x,y) and make everything else 0 ?

Roncorps
July 27th, 2012, 21:32
I just put everythings to 0,0,0,0 and I add width and height to some element to see which do what. Going slow, but steady.

Roncorps
July 27th, 2012, 21:40
Is there a way to change the x,y of the chatwindow, not graphical, but the textbased and position of the chat log ?

Here the visual. I want to make the chattext stop before going into the graphic.

https://img580.imageshack.us/img580/109/chatboxk.jpg

Dakadin
July 27th, 2012, 23:29
Unfortunately, I haven't played around with framedefs much so I won't be able to help you. Someone else will likely do it though. :)

Roncorps
July 29th, 2012, 02:26
No one for the chatbox setting ?

Dakadin
July 29th, 2012, 04:28
People don't post as much on the weekends probably because they are playing. Hopefully someone can help by Monday or Tuesday.

Zeus
July 29th, 2012, 08:41
To modify the chat window you need to edit the windowclass "chat" in desktop_classe.xml. Look under the <sheetdata> node and locate the various windowcontrols that make up the chat window; off the top of my head these are:


chat (chatwindow)
scrollercontrol (scrollbar)
status indicator (genericontrol)
entry (chat entry)
mode (genericcontrol)
window resize control (genericcontrol)


To make the chatwindow output text fit within the new graphic; you will need to adjust the top/left pixel start position (lower this so the text starts say about 100px further down than at present) of the chat control. To move the chat entry field, adjust the anchoring of the entry control.

Roncorps
July 29th, 2012, 15:47
Thanks DrZeuss. I found about desktop_classes yesterday, when checking everythings. I did touch a little bit to chat entry control, so for that it's good, but when you say "adjust the top/left pixel start position", I didn't see anything about that. There is max size, etc. but no start position ?


<windowclass name="chat">
<frame>chatbox</frame>
<sizelimits>
<minimum>
<width>350</width>
<height>350</height>
</minimum>
<maximum>
<height>800</height>
</maximum>
<dynamic>
<resize>both</resize>
</dynamic>
</sizelimits>
<sheetdata>
<chatwindow name="chat">
<bounds>25,25,-22,-50</bounds>
<droptypes>
<type>dice</type>
<type>number</type>
<type>string</type>
<type>fullattack</type>
<type>attack</type>
<type>damage</type>
<type>init</type>
<type>save</type>
<type>ability</type>
<type>skill</type>
</droptypes>
<stateframe>
<drophilight>
<name>chatboxhilight</name>
<offset>6,5,2,11</offset>
</drophilight>
</stateframe>
<modeframe>
<mode>story</mode>
<name>chatframe_story</name>
<offset>15,10,15,10</offset>
</modeframe>
<modeframe>
<mode>chat</mode>
<name>chatframe_chat</name>
<offset>15,5,5,5</offset>
</modeframe>
<script file="desktop/scripts/chat_window.lua" />
</chatwindow>
<genericcontrol>
<anchored>
<to>chat</to>
<position>insidebottomright</position>
<size>
<width>60</width>
<height>61</height>
</size>
</anchored>
<icon>indicator_chatwait</icon>
<invisible />
<script>
function onUserStateChange(username, statename, state)
if username == "" then
if statename == "typing" then
setVisible(true);
elseif statename == "active" or statename == "idle" then
setVisible(false);
end
end
end

function onInit()
User.onUserStateChange = onUserStateChange;
end
</script>
</genericcontrol>
<chatentry name="entry">
<anchored>
<left>
<anchor>left</anchor>
<offset>25</offset>
</left>
<top>
<anchor>bottom</anchor>
<offset>-32</offset>
</top>
<right>
<anchor>right</anchor>
<offset>-66</offset>
</right>
<bottom>
<anchor>bottom</anchor>
<offset>-14</offset>
</bottom>
</anchored>
<chatwindow>chat</chatwindow>
<font>chatfont</font>
<script file="desktop/scripts/chat_entry.lua" />
</chatentry>
<genericcontrol name="mode">
<anchored>
<left>
<anchor>left</anchor>
<offset>328</offset>
</left>
<top>
<anchor>bottom</anchor>
<offset>-38</offset>
</top>
<size>
<width>43</width>
<height>24</height>
</size>
</anchored>
<icon>chat_speak</icon>
<script file="desktop/scripts/chat_mode.lua" />
</genericcontrol>
</sheetdata>
</windowclass>

Zeus
July 29th, 2012, 20:47
Its the first two numbers in the chat control's <bounds> tag. At present its set to 25,25 thats 25 pixels in from left edge of the parent window and 25 pixels down from the top edge of the parent window.

So, to move it down try adjusting the y (second) value to something like 100. e.g.


<bounds>25,100,-22,-50</bounds>

Roncorps
July 30th, 2012, 00:31
Ok, will try tonight. Thanks a lot Zeuss ! I'm a newb, but I'm happy that this community is very friendly for answering all the low class question =)

Roncorps
July 30th, 2012, 00:43
Done, working. Thanks !

Roncorps
July 30th, 2012, 01:53
Question + : Where is the list of skill that FG load into the skills bar (using PFSRD rule, 2.8.1) ? I've look into all the xml ou lua file that was containing the word skill, but didn't find anything.

Zeus
July 30th, 2012, 08:00
Question + : Where is the list of skill that FG load into the skills bar (using PFSRD rule, 2.8.1) ? I've look into all the xml ou lua file that was containing the word skill, but didn't find anything.


Take a look in scripts/data_common.lua. The skills are defined as a series of tables prefixed with PF_

Roncorps
July 31st, 2012, 04:44
Thanks Dr, got it ! Some info are not that easy to find using common logic !

2 new questions :

1. Where is located the data about "character selection", "table", "modifier", etc. (except CT, because it got his own folder so easy to find), so everythings that is opened with the top right icon ?

2. I've look into all the CT xml to find if it was these file that were controlling the position of the close button, but didn't find any mention of button_close.png. I am blind ?

Thanks !

Edit : Ohhhh ... "Find in files" in Notepad++ is so useful. Gonna use it a lot.