de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
Author Message
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Sun Mar 17, 2013 10:40 am 
Offline
Veteran
User avatar
Um, but now my responses above don't make any sense (where I sing the praises of getSelectedString when you added it way back then)! :(

Anyway, can this be added back in? I'd LOVE to have proper dropdown boxes in SS again.

There are many reasons to want to be able to choose from either multiple buttons (getSelectedValue) OR dropdown boxes (getSelectedString) for user input.

I hate to see this choice/feature removed, for seemingly no reason. :(

Was there a problem with 'getSelectedString' that required it be removed? I can't see a reason not to offer both, otherwise.


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Sun Mar 17, 2013 10:50 am 
Offline
Site Admin
User avatar
Really,"getSelectedString()" never existed. At a time, "getSelectedValue()" was only a dropdown list, then it became dropdown list or button list depending on the size of the window and the size and number of responses.
Perhaps you can extend the texts of choices to be sure to get a dropdown list.

Mainly, the whole system is build to permit the writers to focus on content ; keep in mind that on mobile devices (or web interfaces, or other UI systems on the next 25 years) the graphic controls won't be the same at all, but script will still work.


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Sun Mar 17, 2013 11:21 am 
Offline
Veteran
User avatar
My main issue with this solution is that it seems like you're also saying that it's possible to make getSelectedValue display as a dropdown select box rather than multiple buttons... but I've never got that to work.

Maybe my window is never small enough, or my button text (is that what decides it?) not long enough?

I just tried with one button labeled with "Roses are red, violets are blue, this button text is awfully long" and it STILL displayed the options as buttons, not a dropdown. What would be the reason for that?

Obviously, the best thing in my mind (if you don't want to add a separate dropdown option) would be to add a way to "force" getSelectedValue to show a dropdown box instead of buttons.

As for a focus on content over user interface stuff... I'd respectfully argue that the better and more option-rich the UI, the more likely someone will *want* to create content. For example, many scripts I wanted to write weren't even possible until getSelectedValue gave us more than two buttons. :)

Incidentally, something I was curious about: what/is there a limit on how many "choices" you can have in a single getSelectedValue?


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Sun Mar 17, 2013 11:42 am 
Offline
Site Admin
User avatar
Quote:
I just tried with one button labeled with "Roses are red, violets are blue, this button text is awfully long" and it STILL displayed the options as buttons, not a dropdown. What would be the reason for that?

Not long enough

Quote:
Incidentally, something I was curious about: what/is there a limit on how many "choices" you can have in a single getSelectedValue?

No limit, see fontconfiguration.groovy.
Actually, 6 choices or more : no more buttons.


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Sun Mar 17, 2013 1:45 pm 
Offline
Veteran
User avatar
doti wrote:
Quote:
I just tried with one button labeled with "Roses are red, violets are blue, this button text is awfully long" and it STILL displayed the options as buttons, not a dropdown. What would be the reason for that?

Not long enough


Wow, no wonder I never had the dropdown appear! :o How many characters then before it 'trips' into a dropdown?

Making it 6 options works great, though... looks fantastic, too!


Last edited by Banjo on Sun Mar 17, 2013 2:23 pm, edited 2 times in total.

Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Sun Mar 17, 2013 2:15 pm 
Offline
Site Admin
User avatar
Banjo wrote:
doti wrote:
Quote:
I just tried with one button labeled with "Roses are red, violets are blue, this button text is awfully long" and it STILL displayed the options as buttons, not a dropdown. What would be the reason for that?

Not long enough


Wow, no wonder I never had the dropdown appear! :o How many characters then before it 'trips' into a dropdown?

It depends of the total size of the texts, and of the size of the window


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Sun Mar 17, 2013 2:24 pm 
Offline
Veteran
User avatar
Okay, I figured out a "workaround" that's a bit crude, but works.

It's based on the info that 6 or more options automatically switches over to "dropdown mode":

Code:
def dropdown1 = true;

while (dropdown1) {
def pickoption = getSelectedValue("You can have a dropdown box instead of buttons, but you MUST have more than "+
   "5 choices for this to work.", ["Option 1", "Option 2", "Option 3", "?", "?", "?"])
if(pickoption==0) {
   show("You chose option 1.");
   dropdown1 = false;
}
else
if(pickoption==1) {
   show("You chose option 2.");
   dropdown1 = false;
}
else
if(pickoption==2) {
   show("You chose option 3.");
   dropdown1 = false;
}
}

showButton("Continue");
show(null);
return;

... gives a dropdown with less than six working choices. Note that you can make the "?" choices just "" and have nothing but white space (that does "nothing" when clicked, thanks to the loop) but I thought the ?s looked a bit nicer as there is already one to represent the first invalid choice.

Alternate version (no difference in effect, but may be better depending on how much code you're putting in each option's "true" section):

Code:
def dropdown1 = true;

while (dropdown1) {
def pickoption = getSelectedValue("You can have a dropdown box instead of buttons, but you MUST have more than "+
   "5 choices for this to work.", ["Option 1", "Option 2", "Option 3", "?", "?", "?"])
if(pickoption==0) {
   show("You chose option 1.");
}
else
if(pickoption==1) {
   show("You chose option 2.");
}
else
if(pickoption==2) {
   show("You chose option 3.");
}
if (pickoption<3) {
   dropdown1 = false;
}
}

showButton("Continue");
show(null);
return;

Hope this code helps others who want dropdowns (but less than 6 options) too!

Thanks, Doti, for the info about the 6+ option 'trip' that makes this possible.


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.