mirror of https://github.com/FreeCol/freecol.git
Updating the face of Peter Minuit to be more realisticly colored.
This commit is contained in:
parent
53c96b7a29
commit
5e1479cfcb
Binary file not shown.
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 45 KiB |
Binary file not shown.
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 117 KiB |
|
@ -798,6 +798,17 @@ public final class Canvas extends JDesktopPane {
|
||||||
*/
|
*/
|
||||||
public void removeInGameComponents() {
|
public void removeInGameComponents() {
|
||||||
// remove listeners, they will be added when launching the new game...
|
// remove listeners, they will be added when launching the new game...
|
||||||
|
removeKeyAndMouseListeners();
|
||||||
|
|
||||||
|
for (Component c : getComponents()) {
|
||||||
|
if (c instanceof CanvasMapViewer) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
removeFromCanvas(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void removeKeyAndMouseListeners() {
|
||||||
KeyListener[] keyListeners = getKeyListeners();
|
KeyListener[] keyListeners = getKeyListeners();
|
||||||
for (KeyListener keyListener : keyListeners) {
|
for (KeyListener keyListener : keyListeners) {
|
||||||
removeKeyListener(keyListener);
|
removeKeyListener(keyListener);
|
||||||
|
@ -812,19 +823,14 @@ public final class Canvas extends JDesktopPane {
|
||||||
for (MouseMotionListener mouseMotionListener : mouseMotionListeners) {
|
for (MouseMotionListener mouseMotionListener : mouseMotionListeners) {
|
||||||
removeMouseMotionListener(mouseMotionListener);
|
removeMouseMotionListener(mouseMotionListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Component c : getComponents()) {
|
|
||||||
if (c instanceof CanvasMapViewer) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
removeFromCanvas(c);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map editor initialization.
|
* Map editor initialization.
|
||||||
*/
|
*/
|
||||||
public void startMapEditorGUI() {
|
public void startMapEditorGUI() {
|
||||||
|
removeKeyAndMouseListeners();
|
||||||
|
|
||||||
freeColClient.updateActions();
|
freeColClient.updateActions();
|
||||||
this.parentFrame.setMenuBar(new MapEditorMenuBar(this.freeColClient,
|
this.parentFrame.setMenuBar(new MapEditorMenuBar(this.freeColClient,
|
||||||
new MenuMouseMotionListener(scrolling)));
|
new MenuMouseMotionListener(scrolling)));
|
||||||
|
@ -838,6 +844,8 @@ public final class Canvas extends JDesktopPane {
|
||||||
* In game initializations.
|
* In game initializations.
|
||||||
*/
|
*/
|
||||||
public void initializeInGame() {
|
public void initializeInGame() {
|
||||||
|
removeKeyAndMouseListeners();
|
||||||
|
|
||||||
this.parentFrame.setMenuBar(new InGameMenuBar(this.freeColClient,
|
this.parentFrame.setMenuBar(new InGameMenuBar(this.freeColClient,
|
||||||
new MenuMouseMotionListener(scrolling)));
|
new MenuMouseMotionListener(scrolling)));
|
||||||
addMouseListener(new CanvasMouseListener(this.freeColClient));
|
addMouseListener(new CanvasMouseListener(this.freeColClient));
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue