i want some thing like this but in lemur
but when I try to do that I have problems in height of button…
please help me to do that.
and this is my code :
Container left = new Container();
float wi = AspectRatio.percentOfwinWidth(p4_w_int, settings);
float hi = AspectRatio.percentOfwinHeight(p4_h_int, settings);
float positionTop = settings.getHeight() - AspectRatio.percentOfwinHeight(Float.parseFloat(p4_mTop), settings);
left.setPreferredSize(new Vector3f(wi, hi, 0));
left.setLocalTranslation(0, positionTop, 0);
app.getGuiNode().attachChild(left);
// button one [show|hide minimap ]
Button minimap_btn = left.addChild(new Button(""));
minimap_btn.addClickCommands(new Command<Button>() {
@Override
public void execute(Button source) {
hideMiniMap();
}
});
minimap_btn.setIcon(new IconComponent("Interface/hud/map.png", 0.2f, 0, 0, 0, false));
// button two
Button pin_btn = left.addChild(new Button(""));
pin_btn.addClickCommands(new Command<Button>() {
@Override
public void execute(Button source) {
toggleMapPoint_right_panel();
}
});
pin_btn.setIcon(new IconComponent("Interface/hud/location.png"));