From 3ce8cd3068e58abb6c6c2124490bb546d68f6faa Mon Sep 17 00:00:00 2001 From: Jacocococo <63549689+Jacocococo@users.noreply.github.com> Date: Tue, 28 Jul 2020 17:24:07 +0200 Subject: [PATCH] Update DarkMode.java --- src/com/jacoco/mcdata/DarkMode.java | 75 +---------------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/src/com/jacoco/mcdata/DarkMode.java b/src/com/jacoco/mcdata/DarkMode.java index 1ce88ae..aac5a5f 100644 --- a/src/com/jacoco/mcdata/DarkMode.java +++ b/src/com/jacoco/mcdata/DarkMode.java @@ -1,15 +1,5 @@ package com.jacoco.mcdata; -import java.awt.Button; -import java.awt.Dialog; -import java.awt.Dimension; -import java.awt.Font; -import java.awt.Label; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; @@ -22,69 +12,6 @@ import com.jacoco.mcdata.files.Config; public class DarkMode { - - public static int br; - public static int bg; - public static int bb; - - public static int tr; - public static int tg; - public static int tb; - - public static void setValues(int br, int bg, int bb, int tr, int tg, int tb, String mode) throws IOException { - new Gui(br, bg, bb, tr, tg, tb, mode); - } - - public static void error() { - - Dialog d = new Dialog(Gui.gui); - d.setLayout(null); - - // coordinates - int x = 500; - int y = 200; - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int centerX = screenSize.width/2; - int centerY = screenSize.height/3; - - // labels - Font title = new Font("TimesRoman", Font.BOLD, 30); - Label head = new Label("Restart Required"); - head.setFont(title); - head.setSize(500, 50); - head.setLocation((x/2-100), 50); - d.add(head); - - Font p = new Font("TimesRoman", Font.PLAIN, 15); - Label detail = new Label("If you want to update the theme, you need to restart the program"); - detail.setFont(p); - detail.setSize(500, 20); - detail.setLocation(x/2-175, 100); - d.add(detail); - - // ok button - Button ok = new Button("Ok"); - ok.setBounds(50, 30, 100, 30); - ok.setLocation((x/2-50)+10, 130); - d.add(ok); - ok.addActionListener(new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - d.setVisible(false); - } - }); - - // make dialog work - d.addWindowListener(new WindowAdapter() { - public void windowClosing(WindowEvent e) { - d.setVisible(false); - } - }); - - d.setBounds(centerX-x/2, centerY, x, y); - d.setVisible(true); - } @SuppressWarnings("unchecked") public static void setMode(String color) { @@ -115,4 +42,4 @@ public static void setMode(String color) { pw.flush(); pw.close(); } -} \ No newline at end of file +}