|
| 1 | +package cc.hyperium.installer.steps; |
| 2 | + |
| 3 | +import cc.hyperium.installer.InstallerMain; |
| 4 | +import cc.hyperium.installer.components.FlatButton; |
| 5 | +import cc.hyperium.installer.components.HScrollBarUI; |
| 6 | +import cc.hyperium.installer.components.VScrollBarUI; |
| 7 | +import cc.hyperium.utils.Colors; |
| 8 | +import cc.hyperium.utils.InstallerUtils; |
| 9 | + |
| 10 | +import javax.swing.*; |
| 11 | +import java.awt.*; |
| 12 | +import java.io.IOException; |
| 13 | + |
| 14 | +/* |
| 15 | + * Created by Cubxity on 09/07/2018 |
| 16 | + */ |
| 17 | +public class PrivacyScreen extends InstallerStep { |
| 18 | + @Override |
| 19 | + public void addComponents(Container c) { |
| 20 | + super.addComponents(c); |
| 21 | + |
| 22 | + JLabel text = new JLabel("Privacy Policy", SwingConstants.CENTER); |
| 23 | + text.setFont(InstallerMain.INSTANCE.getTitle()); |
| 24 | + text.setForeground(Color.WHITE); |
| 25 | + text.setBounds(0, 20, c.getWidth(), 65); |
| 26 | + c.add(text); |
| 27 | + |
| 28 | + JTextArea essay = new JTextArea("Privacy Policy\n\n\n" + |
| 29 | + "What data does Hyperium Collect?" + |
| 30 | + "\n" + |
| 31 | + "When using Hyperium, the client and integrated mods send a few small pieces of information to a remote server in exchange for a temporary token for accessing data from Hypixel. This information includes your Minecraft UUID and username, Minecraft Version, Client Version and specific mod being used. This information is processed and used to determine if the client is out of date or if the client should abort the startup procedure.\n\n" + |
| 32 | + "What we do with the data?\n" + |
| 33 | + "\n" + |
| 34 | + "The data is stored securely for analytic purposes. We will never sell or release the data collected from specific users. All analytic graphs may be viewed on sk1er.club/graphs/hyperium\n" + |
| 35 | + "Last updated: March 17th, 2018\n"); |
| 36 | + essay.setLineWrap(true); |
| 37 | + essay.setWrapStyleWord(true); |
| 38 | + essay.setFont(InstallerMain.INSTANCE.getFont()); |
| 39 | + essay.setForeground(new Color(250, 250, 250)); |
| 40 | + essay.setBackground(Colors.DARK.brighter()); |
| 41 | + |
| 42 | + JScrollPane sp = new JScrollPane(essay, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); |
| 43 | + sp.setBackground(Colors.DARK.brighter()); |
| 44 | + c.add(sp); |
| 45 | + sp.setBounds(c.getWidth() / 4, c.getHeight() / 4, c.getWidth() / 2, c.getHeight() / 2); |
| 46 | + sp.setBorder(BorderFactory.createEmptyBorder()); |
| 47 | + sp.getVerticalScrollBar().setUI(new VScrollBarUI()); |
| 48 | + sp.getVerticalScrollBar().setBackground(Colors.DARK.brighter()); |
| 49 | + Rectangle b = sp.getVerticalScrollBar().getBounds(); |
| 50 | + sp.getVerticalScrollBar().setBounds(b.x + (b.width - 5), b.y, 5, b.height); |
| 51 | + sp.getHorizontalScrollBar().setUI(new HScrollBarUI()); |
| 52 | + sp.getHorizontalScrollBar().setBackground(Colors.DARK.brighter()); |
| 53 | + b = sp.getHorizontalScrollBar().getBounds(); |
| 54 | + sp.getHorizontalScrollBar().setBounds(b.x, b.y + (b.height - 5), b.width, 5); |
| 55 | + UIManager.put("ScrollBar.width", 5); |
| 56 | + |
| 57 | + JButton next = new FlatButton(); |
| 58 | + next.setText("Accept and continue"); |
| 59 | + next.setBounds(c.getWidth() / 2 - 100, c.getHeight() - 40, 200, 22); |
| 60 | + next.addActionListener(e -> InstallerMain.INSTANCE.next()); |
| 61 | + c.add(next); |
| 62 | + } |
| 63 | +} |
0 commit comments