view game/IDMWindow.java @ 198:b88440f4431a

Allow no-text (null text) buttons.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 24 Apr 2019 14:53:27 +0300
parents 189cd8fe2304
children
line wrap: on
line source

/*
 * Ristipolku IDM window
 * (C) Copyright 2017 Matti 'ccr' Hämäläinen <ccr@tnsp.org>
 */
package game;

import java.awt.*;
import java.awt.event.*;
import java.util.*;



public class IDMWindow extends IDMContainer
{
    private ArrayList<String> messages;

    public IDMWindow()
    {
        messages = new ArrayList<String>();
    }

    public void sendMessage(String msg)
    {
        messages.add(msg);
    }

    public String getMessage()
    {
        if (messages.size() > 0)
            return messages.remove(0);
        else
            return null;
    }
}