mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-18 00:59:35 -04:00
Clean up useless code
This commit is contained in:
parent
85f90be216
commit
17aa7614a8
@ -27,26 +27,9 @@ public class ControlDrawer extends ControlButton {
|
|||||||
public ControlDrawer(ControlLayout layout, ControlDrawerData drawerData) {
|
public ControlDrawer(ControlLayout layout, ControlDrawerData drawerData) {
|
||||||
super(layout, drawerData.properties);
|
super(layout, drawerData.properties);
|
||||||
|
|
||||||
buttons = new ArrayList<>(/*drawerData.buttonProperties.size()*/);
|
buttons = new ArrayList<>(drawerData.buttonProperties.size());
|
||||||
mLayout = layout;
|
mLayout = layout;
|
||||||
this.drawerData = drawerData;
|
this.drawerData = drawerData;
|
||||||
|
|
||||||
|
|
||||||
//Filter unwanted values before instantiating the button
|
|
||||||
for(int i=0; i < drawerData.buttonProperties.size(); ++i){
|
|
||||||
drawerData.buttonProperties.set(i, filterProperties(drawerData.buttonProperties.get(i)));
|
|
||||||
|
|
||||||
addButton(drawerData.buttonProperties.get(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private ControlData filterProperties(ControlData properties){
|
|
||||||
properties.isDynamicBtn = false;
|
|
||||||
properties.setWidth(drawerData.properties.getWidth());
|
|
||||||
properties.setHeight(drawerData.properties.getHeight());
|
|
||||||
|
|
||||||
return properties;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user