closes #263 : Provide UI hint to user of "skip till end of turn" functionality in game enhancement UI.

master
lodici 2015-05-28 13:26:12 +01:00
parent 87a06d1688
commit 62fcd22a8b
3 changed files with 8 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 877 B

After

Width:  |  Height:  |  Size: 866 B

View File

@ -21,7 +21,7 @@ public class MagicPlayChoice extends MagicChoice {
private static final MagicChoice INSTANCE=new MagicPlayChoice();
private static final String MESSAGE="Play a card or ability.|Press {f} to pass priority.";
private static final String MESSAGE="Play a card or ability.|Press {f} to pass priority.|[Shift+Right, Shift+Space or right click {f} to skip to end of turn.]";
private static final String CONTINUE_MESSAGE="Press {f} to pass priority.";
private static final Collection<Object> PASS_OPTIONS=Collections.<Object>singleton(MagicPlayChoiceResult.SKIP);

View File

@ -38,6 +38,7 @@ public class TextLabel extends JPanel {
private final boolean center;
private Color textColor;
private Color choiceColor;
private boolean isBlueInfo = true;
static {
@ -80,7 +81,7 @@ public class TextLabel extends JPanel {
if (textPart.charAt(0)=='{') {
component = new IconComponent(IconImages.getIcon(TextImages.getIcon(textPart)));
} else if (info) {
component=new TextComponent(textPart,this,FontsAndBorders.FONT0,true);
component=new TextComponent(textPart,this,FontsAndBorders.FONT0,isBlueInfo);
} else {
component=new TextComponent(textPart,this,FontsAndBorders.FONT1,false);
}
@ -109,14 +110,16 @@ public class TextLabel extends JPanel {
} else if (ch=='}') {
addComponent(buildComponent(text.substring(startIndex,index+1),info));
startIndex=index+1;
} else if (ch=='(') {
} else if (ch=='(' || ch=='[') {
addComponent(buildComponent(text.substring(startIndex,index),info));
startIndex=index;
info=true;
} else if (ch==')') {
info = true;
isBlueInfo = ch=='(';
} else if (ch==')'|| ch==']') {
addComponent(buildComponent(text.substring(startIndex,index+1),info));
startIndex=index+1;
info=false;
isBlueInfo = true;
}
}
}