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 1, 2  Next
Author Message
 Feature Request - drop down lists and/or list boxes
PostPosted: Mon Aug 15, 2011 10:19 am 
Offline
Veteran
User avatar
Even if not possible with SexScripts now, could it ever be possible in scripts thanks to groovy?

http://en.wikipedia.org/wiki/List_box
http://en.wikipedia.org/wiki/Drop-down_list

That is, where the user can select from a list of 'choices' (example: on CyberMistress' main screen).

I understand if this is impossible, but if it is, it would be so awesome to be able to make 'menus' in a script, or give the user the ability to choose from multiple options (example: four dialog responses to a question).

I had to ask, since I begged for something like this (in scripts) for years in CM, to no avail! :)


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Mon Aug 15, 2011 10:38 am 
Offline
Site Admin
User avatar
I understand it is not exactly the same thing, but :
- for 2 responses : use if(getBoolean("Blue or red ?", "Blue", "Red")==true)...
- for more, use if(getBooleans("Color ?", ["Blue", "Red", "Yellow"]).contains("Blue")) ...


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Mon Aug 15, 2011 2:38 pm 
Offline
Veteran
User avatar
I'm very excited that the second option you listed might mean "multiple choice buttons"... does it? Can you please give me an example of a code snippet that I could run to see how it works? I'm not sure how to implement it as it stands... that is, how would I make it show a different text message depending if the user picked blue, red or yellow?

I'd still like maybe someday to see "drop down lists" or something if it can be done... but for now, if your example does what I think it does, I'll be very happy with that! :)


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Mon Aug 15, 2011 3:43 pm 
Offline
Site Admin
User avatar
That's the box that appear in toys or clothes scripts. It is not exactly a dropdown, as it let user choose more than one value, and return an array (things with [] ) : valu chosen.
Script above has been corrected.


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Mon Aug 15, 2011 5:33 pm 
Offline
Veteran
User avatar
Ah, so it's the 'checkbox' script, then? Can it be set so that only one option can be chosen (rather than multiple ones)?

Is there any way a 'multiple choice' could be implemented someday (preferably without a popup, so it's in the main window/screen)? If not in a drop-down box style, perhaps as 'radio buttons' (I think that's what they're called) even?


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Tue Aug 16, 2011 10:19 pm 
Offline
Site Admin
User avatar
The function getSelectedValue() has been added. Sample :
Code:
def color = getSelectedValue("Which color ?", ["Red", "White", "Black"])


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Wed Aug 17, 2011 5:11 am 
Offline
Veteran
User avatar
Wow, thank you!!! That is awesome! Just tested and it seems to work perfectly!

Is there a way to not have the 'cancel' button as an option, though? (that is, force the user to select one of the possible strings)? I like it as an option (useful) but it would be nice if it wasn't always available.


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Wed Aug 17, 2011 8:45 am 
Offline
Site Admin
User avatar
This feature will me changed today (at least to remove this cancel button), please wait for 18/8/2011


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Wed Aug 17, 2011 9:52 am 
Offline
Veteran
User avatar
No rush, mate... I just really appreciate the new feature! As I said, I wanted this in CM for years! :)

The only reason I'd want drop-down/combo box type things is because I was hoping to one day be able to emulate CyberMistress' "main screen" (menu options, etc.) If there is ever a way to add new items to the top menu bar like I've previously, annoyingly nagged about (just kidding!) it would negate this anyway (and would probably be better). It is far from a 'must-have' feature, though!

For any 'regular' script, this new feature (getSelectedString) is perfect! Finally, finally I can make a script that asks the player "Which direction? North, south, east, west?" It may seem funny, but it's bugged me for years that I could never do that with any program! You're a legend, mate! :)


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Wed Aug 17, 2011 7:35 pm 
Offline
Site Admin
User avatar
It is better now, and some others are now in-window (sus some do no more return null, no more cancel button). It returns a number (0... : which option the user chose).
useFile() was also corrected.
I updated the main documentation.


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Thu Aug 18, 2011 5:57 am 
Offline
Veteran
User avatar
OMG! Having *all* those controls now in the main window is AWESOME!!!! THANK YOU!!!! :D

Something I noticed, though (a bug?): when I run a script with getSelectedValue, it works fine... but when I run it a second time without quitting SS... the drop-down box has TWO 'versions' of the correct text (it's 'repeated'). Is this something in my script, or a bug in the new command?

Code:
def color = getSelectedValue("Which color?", ["Red", "White", "Black"])
if(color==0)
   show("You chose red.");
else
if(color==1)
   show("You chose white.");
else
if(color==2)
   show("You chose black.");

(oh, and did 'getSelectedString' get removed? I don't suppose we could keep that as well... so we can have 'multiple buttons' or 'a dropdown list' to choose from when scripting? If not, no worries... I don't want to seem greedy!)


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Thu Aug 18, 2011 8:59 am 
Offline
Site Admin
User avatar
It's a bug, it will be corrected in next release (this week).


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Thu Aug 18, 2011 9:19 am 
Offline
Veteran
User avatar
Cool! Thanks!


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Sun Mar 17, 2013 10:12 am 
Offline
Veteran
User avatar
Help! I can't make 'getSelectedString' work!

Code:
def color = getSelectedString("Which color?", ["Red", "White", "Yellow"]);
if(color ==0) {
   show("You chose red.");
}
else
if(color ==1) {
   show("You chose blue.");
}
else
if(color ==2) {
   show("You chose yellow.");
}

... should work, right? I'm not sure if I've forgotten something or if there's a bug. getString and getSelectedValue work fine (love those multiple buttons!) but I wanted the dropdown effect of getSelectedString! :(

Is this broken since I last used SexScripts?


Top
 Profile Send private message 
 
 Re: Feature Request - drop down lists and/or list boxes
PostPosted: Sun Mar 17, 2013 10:15 am 
Offline
Site Admin
User avatar
Sorry, I corrected above, "getSelectededString()" does not exists.

You can not obtain a dropdown list if it fits into buttons.


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 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:  


cron
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.