v0.6.1a: fixed crash issues relating to the game log
This commit is contained in:
@@ -48,7 +48,7 @@ public class GameLog extends Component implements Signal.Listener<String> {
|
|||||||
recreateLines();
|
recreateLines();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void recreateLines() {
|
private synchronized void recreateLines() {
|
||||||
for (Entry entry : entries) {
|
for (Entry entry : entries) {
|
||||||
lastEntry = PixelScene.renderMultiline( entry.text, 6 );
|
lastEntry = PixelScene.renderMultiline( entry.text, 6 );
|
||||||
lastEntry.hardlight( lastColor = entry.color );
|
lastEntry.hardlight( lastColor = entry.color );
|
||||||
@@ -56,12 +56,12 @@ public class GameLog extends Component implements Signal.Listener<String> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void newLine() {
|
public synchronized void newLine() {
|
||||||
lastEntry = null;
|
lastEntry = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSignal( String text ) {
|
public synchronized void onSignal( String text ) {
|
||||||
|
|
||||||
if (length != entries.size()){
|
if (length != entries.size()){
|
||||||
clear();
|
clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user