// This is an immutable string public static final String MY_OBJECT = "My new immutable object"; // Another way of making immutable objects is by using an enum public enum CommandButtonBorders { SYSTEM(Color.RED), // The color red is tied to the SYSTEM buttonborder and immutable ACTION(Color.GREEN), // The color green is tied to the ACTION buttonborder and immutable UPGRADE(Color.BLUE), // The color blue is tied to the UPGRADE buttonborder and immutable BUILD(Color.BLACK); // The color black is tied to the BUILD buttonborder and immutable private Color color; // This is the constructor private CommandButtonBorders(Color color) { this.color = color; } // If you need an enum color you can use the getColor method public getColor() { return color; } } // If you need a buttonborder color in another class private Color col_SystemButtonBorder = CommandButtonBorders.SYSTEM.getColor();
Wait @Acidbrain Where Do You found Those Code So I Can Change it as well?
Originally Posted by: adrianemapmaker
; Identifier for the User as to what kind of button this is
Whenever you see a word in CAPITAL letters in an ini file it usually means that it is immutable.
Originally Posted by: acidbrain
ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow
still am and will always be a noob...:P
The C&C Labs Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies. More Details Close