Skip to content

Instantly share code, notes, and snippets.

@dentmaged
Created March 28, 2018 02:01
Show Gist options
  • Select an option

  • Save dentmaged/dd8a44b2c215af210c4df29fadf69b35 to your computer and use it in GitHub Desktop.

Select an option

Save dentmaged/dd8a44b2c215af210c4df29fadf69b35 to your computer and use it in GitHub Desktop.
UIKit
Pointer<Integer> height = new Pointer<Integer>();
TextFieldBlueprint createGridX = new TextFieldBlueprint("Grid X: ", "0", new TextFieldAdapter());
TextFieldBlueprint createGridZ = new TextFieldBlueprint("Grid Z: ", "0", new TextFieldAdapter());
DropdownBlueprint createHeightmaps = new DropdownBlueprint("Heightmap: ", AssetManagerUtils.getHeightmaps(), new DropdownAdapter());
JScrollPane terrainCreatePanel = UIKit.createSubpanel("Terrain", Arrays.asList(createGridX, createGridZ, createHeightmaps, new ButtonBlueprint("Create", new ButtonListener() {
@Override
public void onButtonClick(CustomButton field) {
gameEditor.addTerrain(createHeightmaps.getSelectedItem(), parseInt(createGridX.getText()), parseInt(createGridZ.getText()));
removeSubpanel();
}
})), height);
terrainCreatePanel.setBounds(54, 119, 212, height.get());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment