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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
hav
Wanderer


Joined: 05 Oct 2004
Posts: 61
Location: Riga, Latvia

PostPosted: Tue Oct 05, 2004 4:29 pm   

%prompt default value toggle
 
I have a button that prompts for variable dmode. it used to be a simple #pr dmode
@dmode has two common values ab and ab2 and a few less used ones, empty among them, so
I made a toggle for default value. I click a button and only have to hit enter to toggle.
#prompt lacks functionality, so i used %prompt. looks something like this
#VAR dmodeold @dmode
#IF (@dmode=ab) {#VAR dmode %prompt( ab2, "Enter value for: dmode")} {#IF (@dmode=ab2) {#VAR dmode %prompt( ab, "Enter value for: dmode")} {#VAR dmode %prompt( @dmode, "Enter value for: dmode")}}
#IF ((@dmodeold!="") AND (@dmode="")) {#VAR dmode @dmodeold}
it works, however as mentioned before, although not a common option, but sometimes i want the variable empty. one thing would be to assume lets say ~ means I want it empty and add #IF (@dmode="~") {#VAR dmode ""}. It's however less intuitive, when i'd need to clear variable in a hurry i'd have to remember which char is empty char. Any way to discern between clearing prompt window and pressing okay, and pressing cancel for %prompt function?
anyhow here's to hopes next version of zmud #prompt gets default value and/or %prompt gets cancel value parameters.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Tue Oct 05, 2004 7:17 pm   
 
Take A look at #YESNO
#YESNO "Options" {Default:test=default} {New:#PROMPT test {New value of test}} {Null:test=""}

But yes a deafault option for prompt would be nice feel free to idea it!
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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