Input window appearance
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.
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.
Input window appearance
1) Is there a way to move an input list under the prompt text like this:
2) Is there a way to make the TEXT box bigger like this:System Info:
MapTool version: 1.3b48
Sun Java (build 1.6.0_11-b03)
WinXP Professional, V. 2002, SP 2
Intel Pentium Dual CPU, T3200 @ 2GHz, 2GB RAM
MapTool version: 1.3b48
Sun Java (build 1.6.0_11-b03)
WinXP Professional, V. 2002, SP 2
Intel Pentium Dual CPU, T3200 @ 2GHz, 2GB RAM
Re: Input window appearance
Have you tried embedding the HTML <br> element into the string?
Re: Input window appearance
I did this:
and got this:
Code: Select all
[h:status=input("AP|Spend,Gain|Spend or Gain an Action Point on this token<br>|RADIO|ORIENT=H SELECT=0")]
[h:abort(status)]
System Info:
MapTool version: 1.3b48
Sun Java (build 1.6.0_11-b03)
WinXP Professional, V. 2002, SP 2
Intel Pentium Dual CPU, T3200 @ 2GHz, 2GB RAM
MapTool version: 1.3b48
Sun Java (build 1.6.0_11-b03)
WinXP Professional, V. 2002, SP 2
Intel Pentium Dual CPU, T3200 @ 2GHz, 2GB RAM
Re: Input window appearance
Have you tried:
?
Or:?
Code: Select all
[h:status=input("AP|Spend,Gain|Spend or Gain an Action Point on this token"+<br>+"|RADIO|ORIENT=H SELECT=0")]
[h:abort(status)]
Or:
Code: Select all
[h:status=input("AP|"+<br>+"Spend,Gain|Spend or Gain an Action Point on this token|RADIO|ORIENT=H SELECT=0")]
[h:abort(status)]
Re: Input window appearance
Nope, his first attempt was correct:
But try adding the <html> tag at the beginning. It would look like:
Btw, plothos, the <br> is straight text and would always be inside quotes of some kind when used in a macro.
Code: Select all
[h:status=input("AP|Spend,Gain|Spend or Gain an Action Point on this token<br>|RADIO|ORIENT=H SELECT=0")]
[h:abort(status)]
Code: Select all
[h:status=input("AP|Spend,Gain|<html>Spend or Gain an Action Point on this token<br>|RADIO|ORIENT=H SELECT=0")]
[h:abort(status)]
Re: Input window appearance
plothos wrote:Have you tried:
?Code: Select all
[h:status=input("AP|Spend,Gain|Spend or Gain an Action Point on this token"+<br>+"|RADIO|ORIENT=H SELECT=0")] [h:abort(status)]
Or:?Code: Select all
[h:status=input("AP|"+<br>+"Spend,Gain|Spend or Gain an Action Point on this token|RADIO|ORIENT=H SELECT=0")] [h:abort(status)]
Using
Code: Select all
[h:status=input("AP|Spend,Gain|Spend or Gain an Action Point on this token"+<br>+"|RADIO|ORIENT=H SELECT=0")]
[h:abort(status)]
[h:status=input("AP|Spend,Gain|Spend or Gain an Action Point on this token"
It reads the quote as the end of the input field instead of the quote that follows SELECT=0
I even tried
Code: Select all
[h:Test="Spend or Gain an Action Point on this token<br>"]
[h:status=input("AP|Spend,Gain|"+Test+"|RADIO|ORIENT=H SELECT=0")]
[h:abort(status)]
System Info:
MapTool version: 1.3b48
Sun Java (build 1.6.0_11-b03)
WinXP Professional, V. 2002, SP 2
Intel Pentium Dual CPU, T3200 @ 2GHz, 2GB RAM
MapTool version: 1.3b48
Sun Java (build 1.6.0_11-b03)
WinXP Professional, V. 2002, SP 2
Intel Pentium Dual CPU, T3200 @ 2GHz, 2GB RAM
Re: Input window appearance
This would place a line break at the end of the label, but this won't push down the text input control.Azhrei wrote:Nope, his first attempt was correct:But try adding the <html> tag at the beginning. It would look like:Code: Select all
[h:status=input("AP|Spend,Gain|Spend or Gain an Action Point on this token<br>|RADIO|ORIENT=H SELECT=0")] [h:abort(status)]
Btw, plothos, the <br> is straight text and would always be inside quotes of some kind when used in a macro.Code: Select all
[h:status=input("AP|Spend,Gain|<html>Spend or Gain an Action Point on this token<br>|RADIO|ORIENT=H SELECT=0")] [h:abort(status)]
The only way to get some flexibility about placing the input where you want it is to use a form in a [dialog(): ]. One problem though is carriage returns are not handled correctly in text areas yet...
Re: Input window appearance
ROFL well it did change SOMETHINGAzhrei wrote:Nope, his first attempt was correct:But try adding the <html> tag at the beginning. It would look like:Code: Select all
[h:status=input("AP|Spend,Gain|Spend or Gain an Action Point on this token<br>|RADIO|ORIENT=H SELECT=0")] [h:abort(status)]
Btw, plothos, the <br> is straight text and would always be inside quotes of some kind when used in a macro.Code: Select all
[h:status=input("AP|Spend,Gain|<html>Spend or Gain an Action Point on this token<br>|RADIO|ORIENT=H SELECT=0")] [h:abort(status)]
The good thing is, this solves the problem I am having on one of my macros where the input prompt text is way too long, making the macro window HUGE. The bad thing is, it doesnt actually fix what I am trying to do here.
I even tried putting the <br> and the <html><br> in the slot next to RADIO, and wound up with a very ticked off macro (it didnt work)
System Info:
MapTool version: 1.3b48
Sun Java (build 1.6.0_11-b03)
WinXP Professional, V. 2002, SP 2
Intel Pentium Dual CPU, T3200 @ 2GHz, 2GB RAM
MapTool version: 1.3b48
Sun Java (build 1.6.0_11-b03)
WinXP Professional, V. 2002, SP 2
Intel Pentium Dual CPU, T3200 @ 2GHz, 2GB RAM
Re: Input window appearance
OK...since the radio button relocation project seems to be a no-go...how about the resized text window?
System Info:
MapTool version: 1.3b48
Sun Java (build 1.6.0_11-b03)
WinXP Professional, V. 2002, SP 2
Intel Pentium Dual CPU, T3200 @ 2GHz, 2GB RAM
MapTool version: 1.3b48
Sun Java (build 1.6.0_11-b03)
WinXP Professional, V. 2002, SP 2
Intel Pentium Dual CPU, T3200 @ 2GHz, 2GB RAM
-
- Dragon
- Posts: 685
- Joined: Wed Sep 03, 2008 12:34 pm
- Location: The Junkyard
Re: Input window appearance
Just roll your own input. Over in user creations I put my stuff if you want a deeper look at how I did it. But basically just use Dialog() and HTML.
Dialog() and Frame() accepts all the regular HTML input options such as radio, checkboxes, selection lists, and even textareas (though they're a bit broken). It submits all the values inside the macro.args property as a string with the props as the input names and the values as the input.
So real quickly you could have...
Then you'd have an ActionPoint macro on the Lib:Token (or on the same token and just change the macroLink). That looks something like this...
For better formatting throw the stuff inside a table.
Dialog() and Frame() accepts all the regular HTML input options such as radio, checkboxes, selection lists, and even textareas (though they're a bit broken). It submits all the values inside the macro.args property as a string with the props as the input names and the values as the input.
So real quickly you could have...
Code: Select all
[Dialog("ActionPoints"):{
<html>
<head><meta name="input" content = "true"></head>
<body>
<form name="Action Points" action="[r: macroLinkText('ActionPoints@Lib:Token', 'none', '', currentToken())]">
Spend or Gain an Action Point on this token<br>
<input type="radio" name="AP" value="1"></input>Spend <input type="radio" name="AP" value="-1"></input>Gain
<input type="submit" name="save" value="Ok"></input>
</form>
</body>
</html>
}]
Code: Select all
[ActionPoints = ActionPoints + getStrProp(macro.args, "AP")]
-
- Giant
- Posts: 197
- Joined: Wed Jul 30, 2008 3:43 pm
Re: Input window appearance
Use the SPAN=TRUE option to suppress the control's prompt text (see the input() documentation):Sylphia wrote:1) Is there a way to move an input list under the prompt text like this:
Code: Select all
[h: input(
"dummyVariable|Spend or Gain an Action Point on this token:||LABEL|SPAN=TRUE",
"choice|Spend,Gain|Action point:|RADIO|ORIENT=H SPAN=TRUE"
)]
Since the radio button group's prompt is embedded in the border when you use SPAN=TRUE, you could possibly eliminate the LABEL entirely.
There isn't a way to make a multiline TEXT control in input().
- lmarkus001
- Great Wyrm
- Posts: 1867
- Joined: Sat Mar 29, 2008 12:30 am
- Location: Layfayette Hill, PA
Re: Input window appearance
Hummm... you can put a table into an input() to format your text... the Cancel in the image is just a table with borders.
Code: Select all
[H: bgImage = macro.args]
[ok = input(
"variableName| " + bgImage + "|<html><head><style type='text/css'> table{ float:center; border-width: 1px; border-spacing: 1px; border-collapse: collapse; }</style></head><body>Press <table><tr><td>Cancel</tr></td></table> if you see a red ? image - - ></body></html> |LABEL|ICON=TRUE",
"junk| (Press Ok if the image is rendered correctly.) | | LABEL | SPAN=TRUE",
"junk| Note that this is a workaround for an image loading bug. | | LABEL | SPAN=TRUE"
)]
Re: Input window appearance
Hey, k.fan! You're back!
Long time, no see! Or perhaps you've been back for a couple days and I just haven't noticed (I don't read every post).
In any case, welcome home!
Long time, no see! Or perhaps you've been back for a couple days and I just haven't noticed (I don't read every post).
In any case, welcome home!
- Mr. Pokeylope
- Giant
- Posts: 118
- Joined: Mon Aug 11, 2008 9:24 pm
Re: Input window appearance
Wow, apparently I started a trend of developers suddenly reappearing after being gone for over half a year.