src/main/java/tanks/gui/Scoreboard.java
public Scoreboard changeAttribute(String attributeName, double value)
    {
        switch (attributeName)
        {
            case "titleColR":
                this.titleColR = value;
                break;
            case "titleColG":
                this.titleColG = value;
                break;
            case "titleColB":
                this.titleColB = value;
                break;
            case "titleFontSize":
                this.titleFontSize = value;
                break;
            case "namesFontSize":
                this.namesFontSize = value;
                break;
            default:
                System.err.println("Invalid attribute name: " + attributeName);
                break;
        }

        Game.eventsOut.add(new EventChangeScoreboardAttribute(this.remoteScoreboard.id, attributeName, value));
        return this;
    }
/** Use this function to change an attribute of a scoreboard.<br>
     You could change the variables directly, but side effects may occur if you do so.<br>

     @param attributeName Can be "titleColR", "titleColG", "titleColB", "titleFontSize", "namesFontSize", which each edit their own variables.
     @param value Can be any double.
     @return itself
     */
Use this function to change an attribute of a scoreboard.
You could change the variables directly, but side effects may occur if you do so.
Use this function to change an attribute of a scoreboard . You could change the variables directly but side effects may occur if you do so .
public Scoreboard changeAttribute(String attributeName, double value)
    {
        switch (attributeName)
        {
            case "titleColR":
                this.titleColR = value;
                break;
            case "titleColG":
                this.titleColG = value;
                break;
            case "titleColB":
                this.titleColB = value;
                break;
            case "titleFontSize":
                this.titleFontSize = value;
                break;
            case "namesFontSize":
                this.namesFontSize = value;
                break;
            default:
                System.err.println("Invalid attribute name: " + attributeName);
                break;
        }
        Game.eventsOut.add(new EventChangeScoreboardAttribute(this.remoteScoreboard.id, attributeName, value));
        return this;
    }
public Scoreboard changeAttribute ( String attributeName , double value ) { switch ( attributeName ) { case "titleColR" : this . titleColR = value ; break ; case "titleColG" : this . titleColG = value ; break ; case "titleColB" : this . titleColB = value ; break ; case "titleFontSize" : this . titleFontSize = value ; break ; case "namesFontSize" : this . namesFontSize = value ; break ; default : System . err . println ( "Invalid attribute name: " + attributeName ) ; break ; } Game . eventsOut . add ( new EventChangeScoreboardAttribute ( this . remoteScoreboard . id , attributeName , value ) ) ; return this ; }
Use this function to change an attribute of a scoreboard.<br>
You could change the variables directly, but side effects may occur if you do so.<br>
Use this function to change an attribute of a scoreboard . <br > You could change the variables directly but side effects may occur if you do so . <br >