private static final int WAYPOINT_ADD = 1;
private static final int WAYPOINT_EDIT = 2;
@Override
protected void createInstances() {
title = new GenericLabel("Overview Map");
noRenderLabel = new GenericLabel("The overview map will not work until the minimap is enabled.");
minimapEnabled = MinimapConfig.getInstance().isEnabled();
buttonDone = new GenericButton("Done");
buttonZoomIn = new GenericButton("+");
buttonZoomOut = new GenericButton("-");
buttonShowPlayer = new GenericButton("Player");
buttonReset = new GenericButton("Reset View");
buttonSave = new GenericButton("Save to Desktop");
buttonDeathpoints = new GenericCheckBox("Deathpoints");
((GenericCheckBox)buttonDeathpoints).setChecked(MinimapConfig.getInstance().isDeathpoints());
map = new MapWidget(this);
map.setGeometry(0, 0, width, height);
map.scrollTo(map.getPlayerPosition(), false, 0);
if (minimapEnabled == false) {
getScreen().attachWidgets("Spoutcraft", noRenderLabel, buttonDone);
} else {
getScreen().attachWidgets("Spoutcraft", map, title, buttonDone, buttonZoomIn, buttonZoomOut, buttonShowPlayer, buttonReset, buttonSave, buttonDeathpoints);
}
hoverMenu = new GenericScrollArea();
hoverMenu.setBackgroundColor(new Color(0x55ffffff));
hoverMenu.setPriority(RenderPriority.Lowest);
menuTitle = new GenericLabel("What do you want to do?");
buttonWaypoint = new GenericButton("Add Waypoint");
buttonFocus = new GenericButton("Set Focus");
buttonFocus.setTooltip("If a waypoint is in focus, the direction\nto it will be drawn on the minimap.");
buttonCloseMenu = new GenericButton("Close");
hoverMenu.attachWidgets("Spoutcraft", buttonFocus, buttonWaypoint, buttonCloseMenu, menuTitle);