PDA

View Full Version : Odd problem with position tag



Brenn
May 12th, 2008, 01:59
I'm trying to use the position tag to set the default window locations for the various shortcut menu items to appear. It is working on everything but the tokenbag and the encounterlist.

Here is the relevant stuff for the encounterlist:


<windowclass name="encounterlist">
<frame>scrollboxfortabs</frame>
<softclose />
<placement>
<size>
<width>275</width>
<height>350</height>
</size>
<position>
<x>305</x>
<y>5</y>
</position>
</placement>

...remainder omitted for brevity...


Anyone else have problems with this tag?

Works great except on the previous two items...

I haven't tried it on the stock d20 stuff yet, but these items thus far have been copied from stock and only modified with the aforementioned tag.

Foen
May 12th, 2008, 06:11
FG saves window positions and sizes in the CampaignRegistry.lua file in your campaign folder. This allows your preferred sizes/locations to be saved, but also stops the hard-wired sizes/locations from applying.

If this is your problem, then deleting the CampaignRegistry.lua file might help. It doesn't usually contain much else (other than combat tracker contents).

Cheers

Stuart

Brenn
May 12th, 2008, 11:03
No that wasn't it, but that is good information to know. Thanks Stuart!

kalmarjan
May 12th, 2008, 19:22
I'm trying to use the position tag to set the default window locations for the various shortcut menu items to appear. It is working on everything but the tokenbag and the encounterlist.

Here is the relevant stuff for the encounterlist:


<windowclass name="encounterlist">
<frame>scrollboxfortabs</frame>
<softclose />
<placement>
<size>
<width>275</width>
<height>350</height>
</size>
<position>
<x>305</x>
<y>5</y>
</position>
</placement>

...remainder omitted for brevity...


Anyone else have problems with this tag?

Works great except on the previous two items...

I haven't tried it on the stock d20 stuff yet, but these items thus far have been copied from stock and only modified with the aforementioned tag.


Your problem lies with the object you are trying to move. The token case is not called up from the encounterlist class. Try to use the tokenbag, or some other incarnation, if memory serves me correctly.

Savage_JasonS

Brenn
May 12th, 2008, 20:34
Your problem lies with the object you are trying to move. The token case is not called up from the encounterlist class. Try to use the tokenbag, or some other incarnation, if memory serves me correctly.

Savage_JasonS

I'm trying to move the encounterlist also, I just posted it's code and not the tokenbag's because they are essentially identical in regards to the tag.

unimatrixzero
May 12th, 2008, 22:07
Hi
You may be trying to position the new icon/class outside of the defined 'panel'. Have you checked your panel dimensions in the desktop_panels.xml?
regards
Uni

Brenn
May 12th, 2008, 22:52
There are no panels defined for those items (in stock or mine) that I'm aware of. They define a panel for the area the shortcuts are placed in, but not the actual window instances themselves. No, this is just peculiar behavior of a couple of instances, while others work as advertised. Not extremely critical to me since the user can move them around anyway, but, regardless, not working in mine (but it does work in a ruleset that I've copied from stock code on both of those items). I guess I've deleted something that broke them :? I'm confused.

Brenn
May 12th, 2008, 23:06
The problem was what Stuart originally said it was... Guess when I flew to the folder to delete the campaign registry, I landed in the wrong folder. The idiot in me strikes again ;)

joshuha
May 13th, 2008, 00:30
When developing a ruleset I tend to comment out the section in the scripts/windowmanager.lua


function onInit()
--Interface.onWindowOpened = onWindowOpened;
--Interface.onWindowClosed = onWindowClosed;
end


This ensures while developing things open in the default positions so you can test things like the above out.

Foen
May 13th, 2008, 06:03
I'm glad Brenn got his problem sorted, but that is also a good tip from Joshuha.

And congrats on 1k posts Joshuha!

Stuart