Page 1 of 1

Need a Larger "Input" Macro Window

Posted: Thu Jun 01, 2017 8:56 pm
by goldensword52
Hello everyone, I'm making a macro for MapTool and I need some advice. My macro is based on the input function, and I want to offer a selection of about ~30-50 images that the user can pick from. Using the "List" option, it is perfectly doable for about 20 images, but adding any more to the list causes the selection box to be too long and go off the screen. If I shrink the images so they all fit, they are too small to see.

It seems like the most obvious solution would be to offer the images in a grid, rather than a single line, but I can't find if this is possible or not. Another option might be to associate each picture with a radio button, as described at the bottom of the page. But again, I can't find any way to make the radio option into a grid instead of a line. If any macro experts out there can help me out, I would be very grateful, thanks in advance.

Re: Need a Larger "Input" Macro Window

Posted: Thu Jun 01, 2017 9:04 pm
by aliasmask
You can make tabs. This is especially good if you can group your images.

Re: Need a Larger "Input" Macro Window

Posted: Thu Jun 01, 2017 10:12 pm
by goldensword52
The problem with tabs, or even multiple lists, is how do I tell the macro which tab or which list to use for the output?

Re: Need a Larger "Input" Macro Window

Posted: Thu Jun 01, 2017 10:51 pm
by aliasmask
Depends on how you do it. You could use the image name or number it based on the list. Btw, you can use a dropdown list. I will create a scroll bar within the list.

Re: Need a Larger "Input" Macro Window

Posted: Thu Jun 08, 2017 2:46 pm
by xavram
I had a similar issue, because I wanted the images in my drop down to be bigger, so players could see the details. But putting all 20+ images into one drop down list made it too big for most resolutions. So here's what I did.

Code: Select all

[h:status=input(
        "entrySpeed|25,30,35,40,45,50,55,60,65,70|Entry Speed|LIST|SELECT=0|VALUE=STRING|SPAN=TRUE",
        "whichList|1st, 2nd, 3rd|Pick image from which drop down|RADIO|SELECT=0|VALUE=STRING|SPAN=TRUE",
        "charImage1|"+imageList1+"|List #1|LIST|SELECT=0 ICON=TRUE ICONSIZE=112|VALUE=STRING|SPAN=TRUE",
        "charImage2|"+imageList2+"|List #2|LIST|SELECT=0 ICON=TRUE ICONSIZE=112|VALUE=STRING|SPAN=TRUE",
        "charImage3|"+imageList3+"|List #3|LIST|SELECT=0 ICON=TRUE ICONSIZE=112|VALUE=STRING|SPAN=TRUE"
)]

[h, if(whichList == 0) : setTokenImage(tableImage(tableName, charImage1 + 1))]
[h, if(whichList == 1) : setTokenImage(tableImage(tableName, charImage2 + 8))]
[h, if(whichList == 2) : setTokenImage(tableImage(tableName, charImage3 + 15))]
This gives 3 seperate drop downs, with a 1/3 of the images in each one and then a set of radio buttons. So the user can say, "I'm using the image selcted in drop down #2", for example.