Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Orang
Apprentice


Joined: 22 Jul 2004
Posts: 118
Location: USA

PostPosted: Tue Aug 05, 2008 3:46 pm   

Button resizing
 
I made this button for a script, and it works fine, except for it won't fit the button ID on it completely. I looked at the help but it doesn't really explain how to do this. I just want it to be resized enough to fit the id on there. Here's the code:

Code:
#alias buttonchange {#if (@isStealthOn = 0) {#unbutton 1;#gag;#button 1 Width100 {Stealth~: off} {stealth}} {#unbutton 1;#gag;#button 1 Width100 {Stealth~: on} {nostealth}}} {}


Thank you.
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Tue Aug 05, 2008 4:20 pm   
 
Edit the button in the PE and change the dimensions of it.
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Tue Aug 05, 2008 4:23 pm   
 
hmm Just do this...

#BUTTON 1 {Stealth~: %if(@isStealthOn,on,off)}

Thats untested, but Im assuming it would work.

There is no need to delete and remake your button just to change the value of it.
Reply with quote
Orang
Apprentice


Joined: 22 Jul 2004
Posts: 118
Location: USA

PostPosted: Tue Aug 05, 2008 9:10 pm   
 
Thanks. That worked
Reply with quote
Orang
Apprentice


Joined: 22 Jul 2004
Posts: 118
Location: USA

PostPosted: Tue Aug 05, 2008 9:16 pm   
 
But how do I change the width of it so it can fit "Stealth: off"? (that is, how do I do that from the #button command, not the PE).
Thanks again.
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Tue Aug 05, 2008 9:17 pm   
 
why do you need to do it from the #BUTTON command? theres no reason to make this button via script... Make it in the package editor with that value and let it stay... It should change depending on the state of @isStealthOn
Reply with quote
Orang
Apprentice


Joined: 22 Jul 2004
Posts: 118
Location: USA

PostPosted: Tue Aug 05, 2008 9:19 pm   
 
Toxic wrote:
why do you need to do it from the #BUTTON command? theres no reason to make this button via script... Make it in the package editor with that value and let it stay... It should change depending on the state of @isStealthOn


Because this is part of a much larger script that I have saved as a .txt file.
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Tue Aug 05, 2008 9:21 pm   
 
As a txt file? Are you writing this for CMUD? because you can't import .txt files into cmud.
Reply with quote
Orang
Apprentice


Joined: 22 Jul 2004
Posts: 118
Location: USA

PostPosted: Tue Aug 05, 2008 9:23 pm   
 
Yes you can. Click on editor, open file, then click "send". I do it all the time.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Aug 06, 2008 2:47 am   
 
Well, using that way you can't use most of the new CMUD features, since they are only available in the XML... Why not use XML for your script?
Reply with quote
Orang
Apprentice


Joined: 22 Jul 2004
Posts: 118
Location: USA

PostPosted: Wed Aug 06, 2008 2:51 am   
 
I have now idea even how to begin learning XML. Confused
Plus I didn't know it was that important to know it.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Aug 06, 2008 3:15 am   
 
It's not important to know it. You don't need to know it. (In CMUD) it's just a method of storing settings. But you can export to it and import from it and it will contain other propeties of settings that are not in the txt file.
Reply with quote
Orang
Apprentice


Joined: 22 Jul 2004
Posts: 118
Location: USA

PostPosted: Wed Aug 06, 2008 3:19 am   
 
How do I use it?
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Aug 06, 2008 1:46 pm   
 
Create your settings in cmud then highlight and right click and chose export selection to xml (or something like that, forgot exact wording). Then if you want to look at it, get something like notepad++ to view it. But if your just trying to distribute to others... send it out in that form and they can import it via file/import xml.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Aug 06, 2008 3:56 pm   
 
Or you can even use standard notepad (but it's not as good).
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net