mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-19 11:59:11 +00:00
Use Collections.addAll
This commit is contained in:
1 parent
57930991ec
commit
c6783e573c
12 files changed
+30
-57
No files matched your search
@@ -6,6 +6,7 @@ import binnie.craftgui.events.EventMouse;
|
||||
import binnie.craftgui.events.EventValueChanged;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class ControlEnumButton<T> extends ControlButton implements IControlValue<T> {
|
||||
@@ -41,9 +42,7 @@ public class ControlEnumButton<T> extends ControlButton implements IControlValue
|
||||
public ControlEnumButton(final IWidget parent, final float x, final float y, final float width, final float height, final T[] values) {
|
||||
super(parent, x, y, width, height, "");
|
||||
this.enumConstants = new ArrayList<>();
|
||||
for (final T value : values) {
|
||||
this.enumConstants.add(value);
|
||||
}
|
||||
Collections.addAll(this.enumConstants, values);
|
||||
if (values.length > 0) {
|
||||
this.currentSelection = values[0];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user