refactor: remove isPic argument from cityMessage() notification

Have the decision of whether to show the message in the notification
pane be determined by the message type itself, rather than being
decided by the sender of the message.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@859 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-09-22 00:48:34 +00:00
parent 736754a5ab
commit b18b51d08e
7 changed files with 48 additions and 32 deletions

View file

@ -141,7 +141,7 @@ public class DemandIndicator extends JComponent
}
//implements Micropolis.Listener
public void cityMessage(MicropolisMessage m, CityLocation p, boolean x) { }
public void cityMessage(MicropolisMessage m, CityLocation p) { }
public void citySound(Sound sound, CityLocation p) { }
public void censusChanged() { }
public void evaluationChanged() { }

View file

@ -242,7 +242,7 @@ public class EvaluationPane extends JPanel
}
//implements Micropolis.Listener
public void cityMessage(MicropolisMessage message, CityLocation loc, boolean isPic) {}
public void cityMessage(MicropolisMessage message, CityLocation loc) {}
public void citySound(Sound sound, CityLocation loc) {}
public void censusChanged() {}
public void demandChanged() {}

View file

@ -143,7 +143,7 @@ public class GraphsPane extends JPanel
}
//implements Micropolis.Listener
public void cityMessage(MicropolisMessage message, CityLocation loc, boolean isPic) {}
public void cityMessage(MicropolisMessage message, CityLocation loc) {}
public void citySound(Sound sound, CityLocation loc) {}
public void demandChanged() {}
public void evaluationChanged() {}

View file

@ -1540,11 +1540,11 @@ public class MainWindow extends JFrame
}
//implements Micropolis.Listener
public void cityMessage(MicropolisMessage m, CityLocation p, boolean pictureMessage)
public void cityMessage(MicropolisMessage m, CityLocation p)
{
messagesPane.appendCityMessage(m);
if (pictureMessage && p != null)
if (m.useNotificationPane && p != null)
{
notificationPane.showMessage(engine, m, p.x, p.y);
}