Stopping the cruft from a
show menu command is not straightforward...
// First grab the foreground and background colours, simple enough
if (HasAttribute(game, "defaultbackground")) {
bg = LCase (game.defaultbackground)
}
else {
bg = "white"
}
if (HasAttribute(game, "defaultforeground")) {
fore = LCase (game.defaultforeground)
}
else {
fore = "black"
}
// set the foreground to the same as the background
SetForegroundColour (bg)
// now it gets complicated...
show menu ("Select one:", Split ("One;Two;Three", ";"), true) {
s = "Result = " + result
}
on ready {
SetForegroundColour (fore)
msg (s)
}
When a menu chose is made, Quest shows the question text on one line, and the chosen response on the next. The question response is fine, but if you change the foreground colour inside the block, the response gets displayed in that colur too (I guess quest buffers the output of the block together, but changes the colour straight away).
Thus, you have to use on ready to ensure the block is completed, and then change the colour, and only then can you print stuff from the block.