dr_venture
May 1st, 2012, 04:27
I've had multiple players complain that the modifier box in Castles & Crusades is blocking the bottom of the chat window. It currently sits below the Chat panel, justified to the left side of the window. What I'd like to do is slide it a couple hundred pixels to the right - far enough so that on small screens, it sits next to the chat window instead of on top of it. Make sense?
The code appears to live in the 'desktop_classes.xml' file. The code for the box is below. I tried to change the first parameter of the 'base' control's 'bounds' element from '0' to '80' as a test. The result is the PNG for the modifier box successfully moving to the right as expected, but the right half of the PNG is invisible - it's like the PNG is being drawn half outside of some kind of drawing area for the control.
So I'm out of my leage here - before I spend hours randomly poking through X/Y values, does anyone have any tips on how to slide the Mod box over to the right?
Thanks in advance!
<windowclass name="modifierstack">
<script>
function onInit()
ModifierStack.registerControl(self);
end
function onClose()
ModifierStack.registerControl(nil);
end
</script>
<sheetdata>
<genericcontrol name="base">
<bounds>0,5,64,52</bounds>
<icon>modcollector</icon>
<counters>
<icon>modcollector_counter</icon>
<offset>
<x>11</x>
<y>47</y>
</offset>
<spacing>9</spacing>
<hoversize>4</hoversize>
</counters>
<script file="scripts/modifierstack_base.lua" />
</genericcontrol>
<numbercontrol name="modifier">
<bounds>5,0,54,42</bounds>
<font>modcollector</font>
<displaysign />
<keyeditframe>
<name>modstackfocus</name>
<offset>-1,-11,-1,-8</offset>
</keyeditframe>
<droptypes>
<type>number</type>
</droptypes>
<stateframe>
<drophilight>
<name>modstackfocus</name>
<offset>0,-11,0,3</offset>
</drophilight>
</stateframe>
<script file="scripts/modifierstack_modifier.lua" />
</numbercontrol>
<stringcontrol name="label">
<bounds>5,34,54,12</bounds>
<font>modcollectorlabel</font>
<static>Modifier</static>
<center />
<script>
function onDrop(x, y, draginfo)
return window.base.onDrop(x, y, draginfo);
end
</script>
</stringcontrol>
</sheetdata>
</windowclass>
The code appears to live in the 'desktop_classes.xml' file. The code for the box is below. I tried to change the first parameter of the 'base' control's 'bounds' element from '0' to '80' as a test. The result is the PNG for the modifier box successfully moving to the right as expected, but the right half of the PNG is invisible - it's like the PNG is being drawn half outside of some kind of drawing area for the control.
So I'm out of my leage here - before I spend hours randomly poking through X/Y values, does anyone have any tips on how to slide the Mod box over to the right?
Thanks in advance!
<windowclass name="modifierstack">
<script>
function onInit()
ModifierStack.registerControl(self);
end
function onClose()
ModifierStack.registerControl(nil);
end
</script>
<sheetdata>
<genericcontrol name="base">
<bounds>0,5,64,52</bounds>
<icon>modcollector</icon>
<counters>
<icon>modcollector_counter</icon>
<offset>
<x>11</x>
<y>47</y>
</offset>
<spacing>9</spacing>
<hoversize>4</hoversize>
</counters>
<script file="scripts/modifierstack_base.lua" />
</genericcontrol>
<numbercontrol name="modifier">
<bounds>5,0,54,42</bounds>
<font>modcollector</font>
<displaysign />
<keyeditframe>
<name>modstackfocus</name>
<offset>-1,-11,-1,-8</offset>
</keyeditframe>
<droptypes>
<type>number</type>
</droptypes>
<stateframe>
<drophilight>
<name>modstackfocus</name>
<offset>0,-11,0,3</offset>
</drophilight>
</stateframe>
<script file="scripts/modifierstack_modifier.lua" />
</numbercontrol>
<stringcontrol name="label">
<bounds>5,34,54,12</bounds>
<font>modcollectorlabel</font>
<static>Modifier</static>
<center />
<script>
function onDrop(x, y, draginfo)
return window.base.onDrop(x, y, draginfo);
end
</script>
</stringcontrol>
</sheetdata>
</windowclass>