Skip to content
Snippets Groups Projects
Commit cfd39c37 authored by Alexis Durgnat's avatar Alexis Durgnat :milky_way:
Browse files

Weather icon in chat

parent 2686cac9
No related branches found
No related tags found
1 merge request!21*poof* final version
...@@ -34,6 +34,8 @@ public final class AppConfig { ...@@ -34,6 +34,8 @@ public final class AppConfig {
/** /**
* Resources * Resources
*/ */
public static final String CHAT_TRAIN_ICON = "/img/train.png";
public static final String CHAT_TRAIN_ICON_SELF = "/img/train_self.png";
public static final String CHAT_MESSAGE_ICON = "/img/bubble.png"; public static final String CHAT_MESSAGE_ICON = "/img/bubble.png";
public static final String CHAT_MESSAGE_ICON_SELF = "/img/bubble_self.png"; public static final String CHAT_MESSAGE_ICON_SELF = "/img/bubble_self.png";
public static final String HELP_MESSAGE_ICON = "/img/help.png"; public static final String HELP_MESSAGE_ICON = "/img/help.png";
......
...@@ -404,9 +404,9 @@ public class MainWindowController implements Initializable { ...@@ -404,9 +404,9 @@ public class MainWindowController implements Initializable {
User sender = joinedJourney.getUser(); User sender = joinedJourney.getUser();
String message = sender.getName() + " voyage !"; String message = sender.getName() + " voyage !";
if (sender.equals(app.getUser().get())) { if (sender.equals(app.getUser().get())) {
drawMessage(message, AppConfig.CHAT_MESSAGE_ICON_SELF, AppConfig.COLOR_BLUE_10_OPACITY); drawMessage(message, AppConfig.CHAT_TRAIN_ICON_SELF, AppConfig.COLOR_BLUE_10_OPACITY);
} else { } else {
drawMessage(message, AppConfig.CHAT_MESSAGE_ICON, AppConfig.COLOR_BLUE_10_OPACITY); drawMessage(message, joinedJourney.getWeatherToDestination(), AppConfig.COLOR_BLUE_10_OPACITY);
} }
}), userFilter::test); }), userFilter::test);
...@@ -415,9 +415,9 @@ public class MainWindowController implements Initializable { ...@@ -415,9 +415,9 @@ public class MainWindowController implements Initializable {
User sender = leftJourney.getUser(); User sender = leftJourney.getUser();
String message = sender.getName() + " a terminé son voyage !"; String message = sender.getName() + " a terminé son voyage !";
if (sender.equals(app.getUser().get())) { if (sender.equals(app.getUser().get())) {
drawMessage(message, AppConfig.CHAT_MESSAGE_ICON_SELF, AppConfig.COLOR_BLUE_10_OPACITY); drawMessage(message, AppConfig.CHAT_TRAIN_ICON, AppConfig.COLOR_BLUE_10_OPACITY);
} else { } else {
drawMessage(message, AppConfig.CHAT_MESSAGE_ICON, AppConfig.COLOR_BLUE_10_OPACITY); drawMessage(message, leftJourney.getWeatherToDestination(), AppConfig.COLOR_BLUE_10_OPACITY);
} }
}), userFilter::test); }), userFilter::test);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment