 |
darmir Sorcerer

Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Wed Oct 27, 2010 10:01 pm
Button Borders / And States Bug |
I just noticed that I created a button and positioned it in the bottom toolbar, There a two things I don't see and I should
1) I done see the top border of the button.
2) I changed the border color of the button to red. It shows up red in the editor but not on the display.
See image
 |
|
_________________ Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Last edited by darmir on Thu Oct 28, 2010 9:10 pm; edited 1 time in total |
|
|
 |
DraxDrax Apprentice
Joined: 22 Mar 2009 Posts: 149
|
Posted: Wed Oct 27, 2010 10:40 pm |
Each of the button states is able to have its own color settings. I see that the captions match, but could you be modifying the colors for a different state than the one currently being displayed in the bottom right corner?
|
|
|
 |
darmir Sorcerer

Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Wed Oct 27, 2010 11:32 pm |
DraxDrax wrote: |
Each of the button states is able to have its own color settings. I see that the captions match, but could you be modifying the colors for a different state than the one currently being displayed in the bottom right corner? |
DraxDrax, look at the screenshot this is before a state is selected when you goto the state all of the above fields are gone except for the caption, button colors and mouse buttons.
So I dug in a little deeper to look at the states and if I change the button to any one of the states the border color does work. There still is the issue of the top of the button not being displayed. |
|
_________________ Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian) |
|
|
 |
Moo Apprentice
Joined: 10 Apr 2009 Posts: 145
|
Posted: Thu Oct 28, 2010 12:03 am |
Turn on the Auto Size perhaps? Or reduce the height of the button?
|
|
|
 |
darmir Sorcerer

Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Thu Oct 28, 2010 12:11 am |
Moo wrote: |
Turn on the Auto Size perhaps? Or reduce the height of the button? |
I've done both of those things. If I turn on Auto Size the words don't show up all of the way... |
|
_________________ Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian) |
|
|
 |
DraxDrax Apprentice
Joined: 22 Mar 2009 Posts: 149
|
Posted: Thu Oct 28, 2010 12:12 am |
The state of your button is being controlled by the @speech variable and the variable is being controlled by the button. That means that if @speech = 1 when you start Cmud the button state will = 1 as well. So even if you haven't manually clicked on your button it might already have a different state.
If you type 'speech=2' in to cmud, or have that line in a script, the state of your button will become 2 as well. If setting the variable this way causes the button state to change, the new state for the button will execute as though you had clicked it yourself. This can be very useful!
Not displaying the entire button appears to be a bug with the way Cmud automatically sizes toolbars when it is dealing with buttons that are anchored to the bottom rather than the top of the toolbar. Zugg will want to know about and fix that.
If you anchor it to the top, it'll work fine. Or, if you'd like to keep it anchored to the bottom, you might try this jury rigged solution that will force the toolbar to be at least as large as the 'top' position of a new button, which will format it appropriately for your multistate button. Note that 'top' and 'bottom' in this case is the top or bottom of the toolbar itself, not the top or bottom of your Cmud session window:
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<button type="Separator" autosize="false" width="0" height="0" autopos="false" left="0" top="24" toolbar="2" priority="380" copy="yes">
<value>// Forces the toolbar to be at least as tall as the 'top' position of this separator</value>
</button>
</cmud>
|
|
|
|
 |
darmir Sorcerer

Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Thu Oct 28, 2010 1:22 am |
Moved to other more relevant thread
|
|
_________________ Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian) |
|
|
 |
|
|