Log in

View Full Version : drags from chatwindow processable?



ragamer
March 20th, 2010, 15:22
The situation is the following. The chatwindow is basically the central nexus of information on a session as everyone shows rolls, add results, comments, etc, etc...

...The problem I have is that I want to make the drags you get from it "smarter" so specific drags can ONLY go to specific controls in the rest of my windows.

My plan was analyzing the string format of the message description to alter its type.

The problem I'm finding is the following:


When the control is the chatwindow:
When you inititate a drag operation, onDrag() is called BUT Input.getDragData() returns nil. Which, according to the documentation should mean that no drag'n drop operation is active (which is obviously not the case).


On ANY other control:
When you initiate a drag operation, onDrag() is called, and when you call Input.getDragData() you get a valid dragdata object that you can process and alter to trigger all kind of fancy operations/behaviours.


The other difference is that OnDrag() coming from any control but the chatwindow is called multiple times over the "move" (as the documentation specifically states)... On the chatwindow happens only once.


So is the documentation about Input wrong? Or is this another end-road I met because the "chatwindow" is special and is not really inheriting the properties of "windowcontrol" object? A bug? I'm missing something else?

Moon Wizard
March 20th, 2010, 20:31
I think that the challenge is that chatwindow is a special beast of its own with a long history, since it has been in FG for a very long time. Therefore, it is one of the least customizable components.

One of the ideas I've thought about for the rulesets that I develop is having a separate window with roll information, and only display the relevant results in the chat window. Partly to cut down on information in the chat window that's not really necessary to the game, and partly so that people interested in all the modifier details have a place to look and more detail can be added. Plus, having a separate roll details window let's you have more options for handling behavior such as dragging.

Any change in the behavior of the chatwindow other than what is exposed currently would require development in the FG client.

Cheers,
JPG

ragamer
March 21st, 2010, 01:14
Thanks for the fast answer... I searched before posting on the chatwindow topics, and indeed is a "immobile beast" :)...

...But I didn't found any topic regarding the drags from it, that's why I asked. Because on the rest of the controls drags are quite accessible and easy to "tweak on the fly" and as the Chat ones behave properly when placed on other controls with a lot of information (descriptions included) I wanted to be sure that I wasn't missing any detail.

Your comment about a secondary window is interesting because I was checking the "dropbox" and specially the modifier box code as an alternative and I think I will try to make a "process box" were I can translate drags from the chatbox to the types I'm interested.

...The only problem I have is that I really want to keep a paradigm of "one drag per action you have to solve"... So somehow I need to find a way to trigger actions on the character sheet automatically after the users drop things on the "process box", if they so desire OFC.