From 96440f27b0a0a76a6b618574b4d1ee4debd95645 Mon Sep 17 00:00:00 2001 From: LucasDelvallet Date: Mon, 9 Feb 2015 20:20:48 +0100 Subject: [PATCH] Old conversation are now grayed out Old conversation are now grayed out for a better lisibility. --- .../activity/ConversationActivity.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java index 8bc394546..dbeb0c423 100644 --- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java +++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java @@ -46,6 +46,9 @@ public final class ConversationActivity private static final int playerPhraseColor = 0; private static final int NPCPhraseColor = 0; private static final int rewardColor = Color.argb(255, 0x99, 0x99, 0x55); + private static final int oldPhraseColor = Color.argb(255,0x5a,0x5a, 0x5a); + private static final int oldPlayerNameColor = Color.argb(255, 0x5d, 0x11, 0x11); + private static final int oldNPCNameColor = Color.argb(255, 0x5d, 0x5d, 0x11); private WorldContext world; private Player player; @@ -206,7 +209,19 @@ public final class ConversationActivity return null; // No reply was found. This is probably an error. } + private void greyAllConversationStatement(){ + for(ConversationStatement conversation : this.conversationHistory ){ + conversation.textColor = oldPhraseColor; + if(conversation.isPlayerActor){ + conversation.nameColor = oldPlayerNameColor; + } else { + conversation.nameColor = oldNPCNameColor; + } + } + } + private void nextButtonClicked() { + greyAllConversationStatement(); RadioButton rb = getSelectedReplyButton(); replyGroup.removeAllViews(); nextButton.setEnabled(false);