PDA

View Full Version : Chat window issues



zapgun
March 6th, 2008, 15:32
Hi folks,

I'm just curious if the problems I seem to be having with modifying the chat window are common and already known issues, or something new that needs to be reported.

I was attempting to move the chatwindow location and anchor it to the bottom of the game window, however the issue seems to be that no matter what I do, the "dropzone" area attached to the chatwindow remains in a specific spot in the upper portion of the main game window and cannot be moved. This makes it pretty much impossible to "cleanly" move the chat window.

Has anyone done this successfully?

Thanks,

Zap

Hamish
March 7th, 2008, 21:18
There have been several attempts to do something with the chatbox. Move, resize, etc.... Not very succesful though.

Here are 2 topics you might find interesting.
https://www.fantasygrounds.com/forums/showthread.php?t=7526
https://www.fantasygrounds.com/forums/showthread.php?t=7812

joshuha
March 7th, 2008, 21:20
I will have to look at it again but pretty sure I have done this before. The issue is that there are really multiple controls that have to be moved. The overlay box is a control by itself and if the chatbox is resized that overlay to catch the dice has to be resized/moved as well.

Hamish
March 7th, 2008, 21:22
I never knew about that overlay. Can you just point us to where it's defined?

joshuha
March 7th, 2008, 21:35
Hmm looking at it more its just an embedded frame and should move with it.

So you are moving the coordinates under desktop_panel and the dice throwing area does not move with it?

I moved it 100 pixels to the right and everything worked fine.

zapgun
March 7th, 2008, 21:37
Anchor it to the bottom, then resize your desktop, you'll find the dice area does not move.

zapgun
March 7th, 2008, 21:39
Sorry.. should probably answer *all* your questions.. yes I'm moving the panel and have turned it into an anchored area.

zapgun
March 7th, 2008, 21:45
OK.. moved computers where I can get access to the code.. let me show you what I have so far:


in desktop panels:



<panel name="chat" modes="host,client">
<class>chat</class>
<anchored>
<top>
<anchor>top</anchor>
<offset>90</offset>
</top>
<bottom>
<anchor>bottom</anchor>
<offset>-120</offset>
</bottom>
<left>
<anchor>left</anchor>
<offset>15</offset>
</left>
<size>
<width>390</width>
</size>
</anchored>
</panel>


....and in desktop classes (I realize the state graphic's position for the 'chat_ooc', etc. hasn't been moved yet in this example).



<windowclass name="chat">
<frame>chatbox</frame>
<sheetdata>
<chatwindow name="chat">
<anchored>
<top>
<anchor>top</anchor>
<offset>15</offset>
</top>
<bottom>
<anchor>bottom</anchor>
<offset>-60</offset>
</bottom>
<left>
<anchor>left</anchor>
<offset>17</offset>
</left>
<size>
<width>356</width>
</size>
</anchored>
<droptypes>
<type>dice</type>
<type>number</type>
<type>string</type>
<type>fullattack</type>
</droptypes>
<stateframe>
<drophilight>
<name>chatboxhilight</name>
<offset>6,5,2,11</offset>
</drophilight>
</stateframe>
<script file="scripts/chat_chat.lua" />
</chatwindow>
<genericcontrol>
<anchored>
<to>chat</to>
<position>insidetopright</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>
<bottom>
<anchor>bottom</anchor>
<offset>-15</offset>
</bottom>
<left>
<anchor>left</anchor>
<offset>17</offset>
</left>
<size>
<width>310</width>
<height>20</height>
</size>
</anchored>
<state position="345,610" speak="chat_speak" emote="chat_emote" action="chat_action" ooc="chat_ooc"

story="chat_story" />
<chatwindow>chat</chatwindow>
<font>chatfont</font>
<script file="scripts/chat_entry.lua" />
</chatentry>
</sheetdata>
</windowclass>


EDIT: Was a bounds in there for the chat entry line that shouldn't have been.. removed.

I just recreated this code after giving it up.. so its a bit rough.. but should give you an idea of what the issues are.

Also notice that if you have a decent sized monitor (mine has a height of 1080px), the anchor at the bottom (which should be -120 from the bottom when in full screen), seems to mysteriously move up. - like the chat has a maximum size for some reason. Not sure why the anchor does not go all the way to the bottom past a certain maximum desktop height.

zapgun
March 7th, 2008, 21:49
What it seems to boil down to is that the chatwindow object cannot be moved or resized once it is created. :( I also don't see an easy way to move the chatentry state icons using an anchor, which would be required for it to stay at the bottom (maybe that could that be accomplished by wrapping it in a window or something?)