List Input with Images: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page List Input with Images to list Input with Images: Converting page titles to lowercase) |
m (Taustin moved page list Input with Images to List Input with Images over redirect) |
(No difference)
|
Revision as of 17:43, 15 March 2023
The following is the full code for the Creating a List Input with Names and Images tutorial.
[H: tokenList=getExposedTokenNames()]
[H: imgList = tokenList]
[H: Num = listCount(imgList)]
[h,COUNT(Num),CODE:
{
[h:tokenName=listGet(imgList,roll.count)]
[h,token(tokenName): image=getTokenImage()]
[h:imgList=listReplace(imgList,roll.count,tokenName+" "+image)]
}]
[h:status=input(
"Target|"+imgList+"|Select Target|LIST|SELECT=0 ICON=TRUE ICONSIZE=30",
"newName| |Enter a new name for this token"
)]
[h:abort(status)]
[h:targetName = listGet(tokenList,Target)]
[h:switchToken(targetName)]
[h:token.name=newName]
The token's name has been changed to <i>[r:newName]</i>.