Need a Larger "Input" Macro Window

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
goldensword52
Cave Troll
Posts: 42
Joined: Thu Jul 31, 2014 1:24 am

Need a Larger "Input" Macro Window

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

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Need a Larger "Input" Macro Window

Post by aliasmask »

You can make tabs. This is especially good if you can group your images.

User avatar
goldensword52
Cave Troll
Posts: 42
Joined: Thu Jul 31, 2014 1:24 am

Re: Need a Larger "Input" Macro Window

Post 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?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Need a Larger "Input" Macro Window

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

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: Need a Larger "Input" Macro Window

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

Post Reply

Return to “MapTool”