Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *
- * Decompiled with CFR 0_123.
- */
- package DesertMiner;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Font;
- import java.awt.LayoutManager;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import javax.swing.JButton;
- import javax.swing.JComboBox;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JPanel;
- import javax.swing.border.Border;
- import javax.swing.border.EmptyBorder;
- public class Gui {
- final int COPPER_ROCK = 7453;
- final int TIN_ROCK = 7485;
- final int IRON_ROCK = 7488;
- final int COAL_ROCK = 7489;
- final int GOLD_ROCK = 7468;
- final int MITHRIL_ROCK = 7459;
- final int ADDY_ROCK = 7460;
- private JFrame gui;
- private String selectedPickaxe = "Bronze";
- private String selectedOre = "Copper";
- private boolean started = false;
- public boolean getStarted() {
- return this.started;
- }
- public String getPick() {
- return this.selectedPickaxe;
- }
- public String getOre() {
- return this.selectedOre;
- }
- public int getPickId() {
- if (this.getPick().equalsIgnoreCase("Bronze")) {
- return 1;
- }
- if (this.getPick().equalsIgnoreCase("Iron")) {
- return 1;
- }
- if (this.getPick().equalsIgnoreCase("Steel")) {
- return 1;
- }
- if (this.getPick().equalsIgnoreCase("Black")) {
- return 1;
- }
- if (this.getPick().equalsIgnoreCase("Mithril")) {
- return 1;
- }
- if (this.getPick().equalsIgnoreCase("Addy")) {
- return 1;
- }
- if (this.getPick().equalsIgnoreCase("Dragon")) {
- return 1;
- }
- return 0;
- }
- public int getOreId() {
- if (this.getOre().equalsIgnoreCase("Copper")) {
- return 7453;
- }
- if (this.getOre().equalsIgnoreCase("Tin")) {
- return 7485;
- }
- if (this.getOre().equalsIgnoreCase("Iron")) {
- return 7488;
- }
- if (this.getOre().equalsIgnoreCase("Coal")) {
- return 7489;
- }
- if (this.getOre().equalsIgnoreCase("Gold")) {
- return 7468;
- }
- if (this.getOre().equalsIgnoreCase("Mithril")) {
- return 7459;
- }
- if (this.getOre().equalsIgnoreCase("Addy")) {
- return 7460;
- }
- return 0;
- }
- public void createGui() {
- this.gui = new JFrame("Desert Miner Version: 1.0");
- this.gui.setResizable(false);
- this.gui.setDefaultCloseOperation(3);
- this.gui.setBounds(100, 100, 302, 239);
- JPanel contentPane = new JPanel();
- contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
- this.gui.setContentPane(contentPane);
- contentPane.setLayout(null);
- JLabel lblNewLabel = new JLabel("Please select a pickaxe:");
- lblNewLabel.setFont(new Font("Tahoma", 0, 14));
- lblNewLabel.setBounds(10, 11, 155, 44);
- contentPane.add(lblNewLabel);
- JLabel lblNewLabel_1 = new JLabel("Please select an ore:");
- lblNewLabel_1.setFont(new Font("Tahoma", 0, 14));
- lblNewLabel_1.setBounds(10, 77, 155, 31);
- contentPane.add(lblNewLabel_1);
- JButton startButton = new JButton("Start");
- startButton.addActionListener(e -> {
- this.started = true;
- this.gui.setVisible(false);
- }
- );
- startButton.setFont(new Font("Tahoma", 0, 14));
- startButton.setBounds(79, 158, 120, 31);
- contentPane.add(startButton);
- JComboBox<String> pickaxeSelector = new JComboBox<String>(new String[]{"Bronze", "Iron", "Steel", "Black", "Mithril", "Addy", "Rune", "Dragon"});
- pickaxeSelector.addActionListener(e -> {
- String string = this.selectedPickaxe = pickaxeSelector.getSelectedItem().toString();
- }
- );
- pickaxeSelector.setBounds(175, 25, 101, 20);
- contentPane.add(pickaxeSelector);
- JComboBox<String> oreSelector = new JComboBox<String>(new String[]{"Copper", "Tin", "Iron", "Coal", "Gold", "Mithril", "Addy"});
- oreSelector.addActionListener(e -> {
- String string = this.selectedOre = oreSelector.getSelectedItem().toString();
- }
- );
- oreSelector.setBounds(175, 84, 101, 20);
- contentPane.add(oreSelector);
- this.gui.setVisible(true);
- }
- public void destroyGui() {
- this.gui.setVisible(false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement