From ed9a2b05a3140cd824b4ca7874b215986cc55aa1 Mon Sep 17 00:00:00 2001 From: potzplitz <127513690+potzplitz@users.noreply.github.com> Date: Mon, 1 Apr 2024 00:09:59 +0200 Subject: [PATCH] optimisations --- rsc/demon-6.png | Bin 0 -> 15054 bytes src/data/SortData.java | 36 ++++++++ src/filestructure/CreateFileStructure.java | 10 +-- src/gui/MainGUI.java | 96 ++++++++++++++++----- src/main/Main.java | 3 - 5 files changed, 114 insertions(+), 31 deletions(-) create mode 100644 rsc/demon-6.png create mode 100644 src/data/SortData.java diff --git a/rsc/demon-6.png b/rsc/demon-6.png new file mode 100644 index 0000000000000000000000000000000000000000..82025697e0697298c1a0f0255114fc964a1600b1 GIT binary patch literal 15054 zcmX|ob8z2JwDu=XW23Rt*jB^FYHZuK)7WO4G`8(;Y}>Z2+u!@%xifptK6`fOnVsE# z_F%&mQ5P*WrPcaz_hmRrPV*q#`0{ahufRBFQqYwCB zJP3UJU;8)v|M9?o;C%%8zm@+i|MdT}yiK5eygRZ?E3(Z(VPDT5tCOZ)=jMugG=Pf^KtcfT@1>Zi01Ons zLl3;YOnrd?kl+FMFTmSv)!V7|+m#(MJn(vM_O^xkcA)fj>-u^e{B{rj_SgXh3B27Q zy`B-jJqRsK!@S)JvrqvAe!$x`(&LR|Pb#1w0NAMlZ$~6=XMekrfreNx9xlAs2P0i+ zAlw$>Z@$#qRWd6zurNcbs!F@MVgUl_iu1y`yK~0I{Ag?bxwev*mF8fgj_21v%;7!&S{n3#C{bW4N}k)NMWLkWI+Ltau^`tgzYsRiU^z}tcY z)iu?T2)O=WKq3Idgh0!PK~8mmM}PsE%8>Oa#MVX-oQ#k{T##kRL?7ZnTNU`>G{j9O z;0%Z9;{aJ&Ojbt>e17a6?lJcFk^B1KYQv%!8R2Fj;V&lvv68?(6<{R*oo56b7XX8b zz!)ts-e1n|&zeUs9!_xtc&Pz^7?2eG{?mO0l>RQQWq~zl zH5OUZDH<(lP1{354W}YOkRLgQmZTxx<64-~+B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UWNWSWWrI2P*sxApyi1cx~BR>Y{zKu`DqGQSU(D7d@ z>jJTSTeHKHvTLxZwyu$=yHd>?&U=XAqe27V?8nAdCZz}mu792UydTg7?H73Q9v>%Y zss1!OXuB=t%o89&U6vG7pk$$sC-Izbm!r#1;qm z_&CfHtwjyyPup{SjUMC-`k3!$SD;Py)S2lW{=E)uQ>VD<*fDy*&UyQY<5(A$BT(gA zlm!#the@*=I{u8w?$qbJ;SEzDf3iN}R=QfDyp)iry29bQZGx@RD{Jpu*uJ4`?Mu|| z1&6W7^Ti{dLW)ND;8Ba61&^&*J}c<{ZmkY;XQei> zZ7&!XkEY9WKdr1mJn>*dR||r(JO5vGb(QQF+NJDu%O7~#hP96Q zQ_DnLsk)-f3M@Kbi3UyCUL}ngO}P@6UDJnlV(OwCJU5nK>bi{20-P}sXNyrxEWDQb zYGnFZ~|vpb-C^(xA_ zhfppfo7wkOf2J`SbI*VejJPtf1wbIP~PeR5l?7vE^GI-p) z^m}~H6Vq#z1r=zOPjE|KB`2c;0}(q8n7nQW7F6rn;?)Q6_7q)y;!X8ft#Fa4RgW6+ zGawSHfJobJl_Qg_gtS|1EE?e;&9dYSp5ZRZ@SLO^8Xr`8V$~kfWM#%s4vrY=CdDuniaDY_SgG_648ylM>PDF(xMk- dpTFD|jOy9rz^_^s`1i#QkQ9>>trXS|{2y_dPOSg{ literal 0 HcmV?d00001 diff --git a/src/data/SortData.java b/src/data/SortData.java new file mode 100644 index 0000000..55f1225 --- /dev/null +++ b/src/data/SortData.java @@ -0,0 +1,36 @@ +package data; + +import java.util.ArrayList; +import java.util.Comparator; + +import database.Sqlite; + +public class SortData { + + private ArrayList sorter = new ArrayList(); + + public ArrayList getSort() { + return sorter; + } + + public void sort() { + + Sqlite sql = new Sqlite("levels"); + sql.queryData("levels"); + + for(int i = 0; i < sql.getPbarr().size(); i++) { + if(sql.getPbarr().get(i) == null) { + sorter.add(Integer.parseInt("0")); + } else { + sorter.add(Integer.parseInt(sql.getPbarr().get(i))); + } + + } + + sorter.sort(Comparator.naturalOrder()); + + System.out.println(sorter.size()); + + } + +} diff --git a/src/filestructure/CreateFileStructure.java b/src/filestructure/CreateFileStructure.java index a8423fb..d2fd023 100644 --- a/src/filestructure/CreateFileStructure.java +++ b/src/filestructure/CreateFileStructure.java @@ -9,19 +9,15 @@ public class CreateFileStructure { public void create() { File file = new File("C:\\ExtremeDemonList\\levels"); - File file2 = new File("C:\\ExtremeDemonList\\completed"); File file3 = new File("C:\\ExtremeDemonList\\database\\sqlite"); File file4 = new File("C:\\ExtremeDemonList\\songs"); File file5 = new File("C:\\ExtremeDemonList\\config"); + File file6 = new File("C:\\ExtremeDemonList\\userdata"); if(!file.isDirectory()) { file.mkdirs(); } - if(!file2.isDirectory()) { - file2.mkdirs(); - } - if(!file3.exists()) { file3.mkdirs(); } @@ -30,6 +26,10 @@ public class CreateFileStructure { file4.mkdirs(); } + if(!file6.exists()) { + file6.mkdirs(); + } + if(!file5.exists()) { file5.mkdirs(); File config = new File("C:\\ExtremeDemonList\\config\\config.json"); diff --git a/src/gui/MainGUI.java b/src/gui/MainGUI.java index e1d1e5e..625f1bd 100644 --- a/src/gui/MainGUI.java +++ b/src/gui/MainGUI.java @@ -18,8 +18,13 @@ import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.URL; import javax.swing.BorderFactory; +import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; @@ -31,6 +36,7 @@ import javax.swing.JScrollPane; import javax.swing.JTextField; import javax.swing.SwingConstants; +import data.SortData; import database.Sqlite; public class MainGUI { @@ -43,28 +49,30 @@ public class MainGUI { public JScrollPane scroll = new JScrollPane(levelpanel); public JTextField search = new JTextField(); public JLabel levelname; + public JLabel percent; public JLabel level = new JLabel("Liste"); public JLabel creator = new JLabel("Creator"); public JLabel separator = new JLabel("_______________________________________________________________________________________________________________"); public JLabel separator2 = new JLabel("_______________________________________________________________________________________________________________"); - public JLabel separator3 = new JLabel("_______________________________________________________________________________________________________________"); public JLabel verifier = new JLabel("Verifier"); public JLabel victorcount = new JLabel("Anzahl Victors"); - public JLabel victor = new JLabel("Victors: "); public JLabel idshow = new JLabel("ID"); public JLabel qualify = new JLabel("Qualifikation"); public JLabel attemptslabel = new JLabel("Attempts"); - public JPanel recordspanel = new JPanel(); - public JScrollPane records = new JScrollPane(recordspanel); public JCheckBox filtercompleted = new JCheckBox("Nach geschafft filtern"); public Button copyid = new Button("Level ID kopieren"); public Button showinfos = new Button("Mehr Infos anzeigen"); + public Button startgame = new Button("Geometry Dash starten"); public JButton settings = new JButton("⚙"); GridLayout gridLayout = new GridLayout(3, 1); private String[] showing = {"Alle anzeigen", "Top 3", "Top 50", "Top 150", "Top 200"}; + private String[] sortlist = {"Nach Plazierung filtern", "Absteigend", "Aufsteigend"}; @SuppressWarnings({ "unchecked", "rawtypes" }) public JComboBox show = new JComboBox(showing); + @SuppressWarnings({ "unchecked", "rawtypes" }) + public JComboBox sortbox = new JComboBox(sortlist); private Elements elements = new Elements(); + private SortData sort = new SortData(); private int completedcount = 0; @@ -74,6 +82,8 @@ public class MainGUI { Sqlite data = new Sqlite("levels"); data.queryData("levels"); + sort.sort(); + gridLayout.setRows(data.getLevelname().size()); @@ -81,6 +91,10 @@ public class MainGUI { main.setLayout(null); main.setResizable(false); main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + + main.setIconImage(new ImageIcon("rsc/demon-6.png").getImage()); + level.setBounds(10, 10, 200, 30); level.setFont(level.getFont().deriveFont(15f)); @@ -98,24 +112,23 @@ public class MainGUI { levelpanel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); levelpanel.setLayout(gridLayout); - victorcount.setBounds(10, 130, 164, 30); + victorcount.setBounds(10, 90, 164, 30); - idshow.setBounds(10, 150, 164, 30); + idshow.setBounds(10, 110, 164, 30); - copyid.setBounds(10, 50, 164, 30); + copyid.setBounds(10, 190, 164, 30); - qualify.setBounds(10, 170, 164, 30); + qualify.setBounds(10, 130, 164, 30); - attemptslabel.setBounds(10, 190, 164, 30); + attemptslabel.setBounds(10, 150, 164, 30); settings.setBounds(1, 1, 60, 60); settings.setFont(settings.getFont().deriveFont(30f)); settings.setBackground(Color.LIGHT_GRAY); - victor.setBounds(1, 296, 164, 30); - records.getVerticalScrollBar().setUnitIncrement(16); + showinfos.setBounds(12, 237, 160, 30); - showinfos.setBounds(12, 247, 160, 30); + startgame.setBounds(12, 560, 160, 30); scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); @@ -126,19 +139,19 @@ public class MainGUI { elements.infopanel().setBounds(700, 61, 184, 600); elements.infopanel().setVisible(false); - separator.setBounds(0, 70, 300, 30); - separator2.setBounds(0 ,198, 400, 30); - separator3.setBounds(0, 283, 300, 30); + separator.setBounds(0, 30, 300, 30); + separator2.setBounds(0 ,160, 400, 30); - creator.setBounds(10, 90, 164, 30); + creator.setBounds(10, 50, 164, 30); - verifier.setBounds(10, 110, 164, 30); + verifier.setBounds(10, 70, 164, 30); search.setBounds(60, 1, 440, 60); - show.setBounds(500, 1, 200, 60); + show.setBounds(500, 1, 200, 30); + + sortbox.setBounds(500, 31, 200, 30); - recordspanel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); @@ -172,7 +185,7 @@ public class MainGUI { uncompleted.setMargin(new Insets(0,0,0,0)); uncompleted.setVisible(false); - JLabel percent = new JLabel("0%"); + percent = new JLabel("0%"); percent.setBounds(130, 10, 100, 30); JTextField attempts = new JTextField("0"); @@ -432,6 +445,7 @@ public class MainGUI { @Override public void itemStateChanged(ItemEvent e) { boolean isSelected = e.getStateChange() == ItemEvent.SELECTED; + scroll.setVisible(false); if (isSelected && !contents.getBackground().equals(Color.decode("#cbffbf"))) { levelpanel.remove(contents); gridLayout.setRows(data.getLevelname().size()); @@ -442,9 +456,11 @@ public class MainGUI { } levelpanel.repaint(); levelpanel.revalidate(); + scroll.setVisible(true); } }); + contents.add(levelname); contents.add(rank); @@ -457,14 +473,33 @@ public class MainGUI { contents.add(lockind); contents.add(percent); levelpanel.add(contents); + } + + sortbox.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + + if(sortbox.getSelectedIndex() == 1) { + //levelpanel.removeAll(); + for(int k = 0; k < sort.getSort().size(); k++) { + //levelpanel.add(); + } + } + + } + + }); scroll.setVisible(true); elements.infopanel().setVisible(true); progress.setVisible(false); info.setVisible(false); currentLevel.setVisible(false); + + } }); thread.start(); @@ -475,6 +510,22 @@ public class MainGUI { public void actionPerformed(ActionEvent e) { SettingsGui gui = new SettingsGui(); gui.showSettings(); + + } + + }); + + startgame.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + + try { + Process process = Runtime.getRuntime().exec("cmd /c start steam://rungameid/322170"); + } catch (IOException e1) { + e1.printStackTrace(); + } + } @@ -484,16 +535,14 @@ public class MainGUI { elements.infopanel().add(level, SwingConstants.CENTER); elements.infopanel().add(separator); elements.infopanel().add(separator2); - elements.infopanel().add(separator3); elements.infopanel().add(creator); elements.infopanel().add(verifier); - elements.infopanel().add(records); elements.infopanel().add(victorcount); elements.infopanel().add(idshow); elements.infopanel().add(qualify); - elements.infopanel().add(victor); elements.infopanel().add(showinfos); elements.infopanel().add(attemptslabel); + // elements.infopanel().add(startgame); main.add(search); main.add(currentLevel); @@ -503,6 +552,7 @@ public class MainGUI { main.add(filtercompleted); main.add(show); main.add(settings); + main.add(sortbox); main.add(elements.infopanel()); main.setVisible(true); } diff --git a/src/main/Main.java b/src/main/Main.java index f831459..94b8ee6 100644 --- a/src/main/Main.java +++ b/src/main/Main.java @@ -10,9 +10,6 @@ import database.Sqlite; import filestructure.CreateFileStructure; import gui.LoadMenu; import preload.PreChecks; -import readsafefile.DecryptXOR; -import readsafefile.ReadAttemptsFromXML; -import readsafefile.SafeFileManager; import settingsfunctions.LoadSettings; public class Main {