@@ -2,23 +2,29 @@ package com.gildedgames.launcher.ui.panels; | |||
import com.gildedgames.launcher.ui.LauncherFrame; | |||
import com.gildedgames.launcher.ui.components.FlatButton; | |||
import com.gildedgames.launcher.ui.components.NewsElement; | |||
import com.gildedgames.launcher.ui.components.WindowButton; | |||
import com.gildedgames.launcher.ui.resources.LauncherFonts; | |||
import com.gildedgames.launcher.ui.resources.LauncherIcons; | |||
import com.gildedgames.launcher.ui.resources.LauncherStyles; | |||
import com.skcraft.launcher.swing.SwingHelper; | |||
import net.miginfocom.swing.MigLayout; | |||
import javax.swing.JFrame; | |||
import javax.swing.JLabel; | |||
import javax.swing.JOptionPane; | |||
import javax.swing.JPanel; | |||
import java.awt.Color; | |||
import java.awt.Desktop; | |||
import java.awt.Font; | |||
import java.awt.Point; | |||
import java.awt.event.MouseAdapter; | |||
import java.awt.event.MouseEvent; | |||
import java.awt.event.WindowEvent; | |||
import java.awt.event.*; | |||
import java.io.IOException; | |||
import java.net.URI; | |||
public class TitlebarPanel extends JPanel { | |||
private static final String REPORT_BUG_URL = "https://git.gildedgames.com/GildedGames/Aether-Launcher/issues"; | |||
private final JFrame frame; | |||
public TitlebarPanel(final LauncherFrame frame) { | |||
@@ -26,7 +32,7 @@ public class TitlebarPanel extends JPanel { | |||
Font font = LauncherFonts.OPEN_SANS_REGULAR; | |||
this.setLayout(new MigLayout("align center, insets 0", "12[]12[]push[]12[]12")); | |||
this.setLayout(new MigLayout("align center, insets 0", "12[]12[]push[]24[]12[]12")); | |||
this.setBackground(LauncherStyles.LAUNCHER_BACKGROUND); | |||
JLabel icon = new JLabel(); | |||
@@ -42,6 +48,19 @@ public class TitlebarPanel extends JPanel { | |||
this.add(title); | |||
FlatButton bug = new FlatButton("Report a bug", LauncherFonts.OPEN_SANS_REGULAR.deriveFont(12.0f)); | |||
bug.setStyle(FlatButton.ButtonStyle.TRANSPARENT); | |||
bug.setButtonIcon(LauncherIcons.BUG); | |||
bug.addActionListener(e -> { | |||
try { | |||
Desktop.getDesktop().browse(URI.create(REPORT_BUG_URL)); | |||
} catch (IOException e1) { | |||
SwingHelper.showErrorDialog(this.frame, "Well, this is akward.", "An error occured opening the bug tracker.", e1); | |||
} | |||
}); | |||
this.add(bug); | |||
WindowButton minimizeButton = new WindowButton(LauncherIcons.WINDOW_MINIMIZE); | |||
minimizeButton.addActionListener(e -> frame.setState(JFrame.ICONIFIED)); | |||
@@ -20,6 +20,8 @@ public class LauncherIcons { | |||
public static final ImageIcon SWITCH_USER; | |||
public static final ImageIcon BUG; | |||
public static final ImageIcon WINDOW_MINIMIZE, WINDOW_CLOSE, WINDOW_MAXIMIZE; | |||
public static final ImageIcon WINDOW_ICON; | |||
@@ -32,6 +34,7 @@ public class LauncherIcons { | |||
PLAY = load("com/gildedgames/assets/icons/play.png"); | |||
SWITCH_USER = load("com/gildedgames/assets/icons/switch_user.png"); | |||
BUG = load("com/gildedgames/assets/icons/bug.png"); | |||
WINDOW_MINIMIZE = load("com/gildedgames/assets/icons/minimize.png"); | |||
WINDOW_CLOSE = load("com/gildedgames/assets/icons/close.png"); |
@@ -1,32 +0,0 @@ | |||
These are sample files for a project. | |||
- lightpack/ is one modpack | |||
- monsterpack/ is another modpack | |||
- upload/ is what you'd upload to your website | |||
In upload: | |||
- "latest.json" was written by hand | |||
- "packages.php" automatically generates the package listing, but your web server needs PHP installed to use it | |||
- "packages.json" is what packages.php would have generated, but you can write it by hand instead | |||
- "news.html" is your news page | |||
Commands | |||
======== | |||
The following commands were run to generate the modpack files in upload/ | |||
java -jar ../launcher-builder/build/libs/launcher-builder-4.2.3-SNAPSHOT-all.jar --version 20100223 --input lightpack --output upload --manifest-dest "upload\lightpack.json" --pretty-print | |||
java -jar ../launcher-builder/build/libs/launcher-builder-4.2.3-SNAPSHOT-all.jar --version 20100223 --input monsterpack --output upload --manifest-dest "upload\monsterpack.json" --pretty-print | |||
launcher.properties | |||
=================== | |||
If you had uploaded the contents of upload/ to http://example.com/launcher/, you would make launcher.properties look like this: | |||
newsUrl=http://example.com/launcher/news.html?version=%s | |||
packageListUrl=http://example.com/launcher/packages.php?key=%s | |||
selfUpdateUrl=http://example.com/launcher/latest.json | |||
(note: it uses the .php version here) |
@@ -1,7 +0,0 @@ | |||
You'd put Forge and LiteLoader installers here. | |||
i.e. forge-1.7.10-10.13.0.1208-installer.jar | |||
It should NOT be the Windows version of the installer. | |||
Any installer will work that has a supported "install_profile.json" in its .jar. |
@@ -1,17 +0,0 @@ | |||
{ | |||
"name": "Light Modpack", | |||
"title": "Light Modpack", | |||
"gameVersion": "1.8", | |||
"launch": { | |||
"flags": [ | |||
"-Dfml.ignoreInvalidMinecraftCertificates=true" | |||
] | |||
}, | |||
"userFiles": { | |||
"include": [ | |||
"options.txt", | |||
"optionsshaders.txt", | |||
"mods/VoxelMods/*" | |||
] | |||
} | |||
} |
@@ -1,11 +0,0 @@ | |||
soundCategory_master:1.0 | |||
soundCategory_music:0.0 | |||
soundCategory_record:1.0 | |||
soundCategory_weather:0.1056338 | |||
soundCategory_block:1.0 | |||
soundCategory_hostile:1.0 | |||
soundCategory_neutral:1.0 | |||
soundCategory_player:1.0 | |||
soundCategory_ambient:1.0 | |||
resourcePacks:["Conquest (smaller).zip"] | |||
enableVsync:false |
@@ -1,47 +0,0 @@ | |||
# Configuration file | |||
########################################################################################################## | |||
# Forge | |||
#--------------------------------------------------------------------------------------------------------# | |||
# Sample mod specific control section. | |||
# Copy this section and rename the with the modid for the mod you wish to override. | |||
# A value of zero in either entry effectively disables any chunkloading capabilities | |||
# for that mod | |||
########################################################################################################## | |||
Forge { | |||
# Maximum chunks per ticket for the mod. | |||
I:maximumChunksPerTicket=25 | |||
# Maximum ticket count for the mod. Zero disables chunkloading capabilities. | |||
I:maximumTicketCount=200 | |||
} | |||
########################################################################################################## | |||
# defaults | |||
#--------------------------------------------------------------------------------------------------------# | |||
# Default configuration for forge chunk loading control | |||
########################################################################################################## | |||
defaults { | |||
# Are mod overrides enabled? | |||
B:enabled=true | |||
# The default maximum number of chunks a mod can force, per ticket, | |||
# for a mod without an override. This is the maximum number of chunks a single ticket can force. | |||
I:maximumChunksPerTicket=25 | |||
# The default maximum ticket count for a mod which does not have an override | |||
# in this file. This is the number of chunk loading requests a mod is allowed to make. | |||
I:maximumTicketCount=200 | |||
# The number of tickets a player can be assigned instead of a mod. This is shared across all mods and it is up to the mods to use it. | |||
I:playerTicketCount=500 | |||
# Unloaded chunks can first be kept in a dormant cache for quicker | |||
# loading times. Specify the size (in chunks) of that cache here | |||
I:dormantChunkCacheSize=0 | |||
} | |||
@@ -1,60 +0,0 @@ | |||
# Configuration file | |||
general { | |||
# Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github. | |||
B:disableVersionCheck=false | |||
# Controls the number threshold at which Packet51 is preferred over Packet52, default and minimum 64, maximum 1024 | |||
I:clumpingThreshold=64 | |||
# Set to true to enable the post initialization sorting of crafting recipes using Forge's sorter. May cause desyncing on conflicting recipies. MUST RESTART MINECRAFT IF CHANGED FROM THE CONFIG GUI. | |||
B:sortRecipies=true | |||
# Set this to true to force a crash if more than one block attempts to link back to the same Fluid. Enabled by default. | |||
B:forceDuplicateFluidBlockCrash=true | |||
# Set this to true to remove any Entity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES. | |||
B:removeErroringEntities=false | |||
# Set this to true to remove any TileEntity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES. | |||
B:removeErroringTileEntities=false | |||
# Set this to true to check the entire entity's collision bounding box for ladders instead of just the block they are in. Causes noticable differences in mechanics so default is vanilla behavior. Default: false | |||
B:fullBoundingBoxLadders=false | |||
# Control the range of sky blending for colored skies in biomes. | |||
I:biomeSkyBlendRange < | |||
2 | |||
4 | |||
6 | |||
8 | |||
10 | |||
12 | |||
14 | |||
16 | |||
18 | |||
20 | |||
22 | |||
24 | |||
26 | |||
28 | |||
30 | |||
32 | |||
34 | |||
> | |||
# Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic. | |||
D:zombieBaseSummonChance=0.1 | |||
# Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic. | |||
D:zombieBabyChance=0.05 | |||
# Set to false to attempt to allocate 8 stencil bits when starting the GL display context. | |||
B:enableStencilBits=true | |||
# The spawn fuzz when a player respawns in the world, this is controlable by WorldType, this config option is for the default overworld. | |||
I:defaultSpawnFuzz=20 | |||
B:enableGlobalConfig=false | |||
} | |||
@@ -1,38 +0,0 @@ | |||
#Don't put comments; they get removed | |||
#Fri Nov 14 20:36:13 PST 2014 | |||
super-pickaxe-many-drop-items=true | |||
super-pickaxe-drop-items=true | |||
craftscript-dir=craftscripts | |||
max-brush-radius=10 | |||
scripting-timeout=3000 | |||
no-double-slash=false | |||
butcher-max-radius=-1 | |||
profile=false | |||
max-radius=-1 | |||
default-max-polyhedron-points=-1 | |||
use-inventory-creative-override=false | |||
use-inventory=false | |||
shell-save-type= | |||
allow-extra-data-values=false | |||
wand-item=271 | |||
history-size=15 | |||
register-help=true | |||
butcher-default-radius=-1 | |||
schematic-save-dir=schematics | |||
nav-wand-item=345 | |||
max-polygon-points=20 | |||
default-max-polygon-points=-1 | |||
snapshots-dir= | |||
nav-use-glass=true | |||
use-inventory-override=false | |||
cheat-mode=false | |||
max-changed-blocks=-1 | |||
default-max-changed-blocks=-1 | |||
max-polyhedron-points=20 | |||
allow-symbolic-links=false | |||
use-in-creative=false | |||
disallowed-blocks=6,26,27,28,31,32,34,36,37,38,39,40,46,50,51,55,59,66,69,75,76,93,94,77,81,83,7,14,15,16,56 | |||
log-commands=false | |||
log-file=worldedit.log | |||
max-super-pickaxe-size=5 | |||
nav-wand-distance=50 |
@@ -1,7 +0,0 @@ | |||
{ | |||
"feature": { | |||
"name": "CoolGrass", | |||
"description": "CoolGrass gives you a cool grass.", | |||
"selected": false | |||
} | |||
} |
@@ -1,8 +0,0 @@ | |||
{ | |||
"feature": { | |||
"name": "SomeMinimap", | |||
"description": "SomeMinimap gives you a cool minimap.", | |||
"recommendation": "starred", | |||
"selected": true | |||
} | |||
} |
@@ -1,7 +0,0 @@ | |||
You'd put Forge and LiteLoader installers here. | |||
i.e. forge-1.7.10-10.13.0.1208-installer.jar | |||
It should NOT be the Windows version of the installer. | |||
Any installer will work that has a supported "install_profile.json" in its .jar. |
@@ -1,17 +0,0 @@ | |||
{ | |||
"name": "Monster Modpack", | |||
"title": "Monster Modpack", | |||
"gameVersion": "1.8", | |||
"launch": { | |||
"flags": [ | |||
"-Dfml.ignoreInvalidMinecraftCertificates=true" | |||
] | |||
}, | |||
"userFiles": { | |||
"include": [ | |||
"options.txt", | |||
"optionsshaders.txt", | |||
"mods/VoxelMods/*" | |||
] | |||
} | |||
} |
@@ -1,11 +0,0 @@ | |||
soundCategory_master:1.0 | |||
soundCategory_music:0.0 | |||
soundCategory_record:1.0 | |||
soundCategory_weather:0.1056338 | |||
soundCategory_block:1.0 | |||
soundCategory_hostile:1.0 | |||
soundCategory_neutral:1.0 | |||
soundCategory_player:1.0 | |||
soundCategory_ambient:1.0 | |||
resourcePacks:["Conquest (smaller).zip"] | |||
enableVsync:false |
@@ -1,47 +0,0 @@ | |||
# Configuration file | |||
########################################################################################################## | |||
# Forge | |||
#--------------------------------------------------------------------------------------------------------# | |||
# Sample mod specific control section. | |||
# Copy this section and rename the with the modid for the mod you wish to override. | |||
# A value of zero in either entry effectively disables any chunkloading capabilities | |||
# for that mod | |||
########################################################################################################## | |||
Forge { | |||
# Maximum chunks per ticket for the mod. | |||
I:maximumChunksPerTicket=25 | |||
# Maximum ticket count for the mod. Zero disables chunkloading capabilities. | |||
I:maximumTicketCount=200 | |||
} | |||
########################################################################################################## | |||
# defaults | |||
#--------------------------------------------------------------------------------------------------------# | |||
# Default configuration for forge chunk loading control | |||
########################################################################################################## | |||
defaults { | |||
# Are mod overrides enabled? | |||
B:enabled=true | |||
# The default maximum number of chunks a mod can force, per ticket, | |||
# for a mod without an override. This is the maximum number of chunks a single ticket can force. | |||
I:maximumChunksPerTicket=25 | |||
# The default maximum ticket count for a mod which does not have an override | |||
# in this file. This is the number of chunk loading requests a mod is allowed to make. | |||
I:maximumTicketCount=200 | |||
# The number of tickets a player can be assigned instead of a mod. This is shared across all mods and it is up to the mods to use it. | |||
I:playerTicketCount=500 | |||
# Unloaded chunks can first be kept in a dormant cache for quicker | |||
# loading times. Specify the size (in chunks) of that cache here | |||
I:dormantChunkCacheSize=0 | |||
} | |||
@@ -1,60 +0,0 @@ | |||
# Configuration file | |||
general { | |||
# Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github. | |||
B:disableVersionCheck=false | |||
# Controls the number threshold at which Packet51 is preferred over Packet52, default and minimum 64, maximum 1024 | |||
I:clumpingThreshold=64 | |||
# Set to true to enable the post initialization sorting of crafting recipes using Forge's sorter. May cause desyncing on conflicting recipies. MUST RESTART MINECRAFT IF CHANGED FROM THE CONFIG GUI. | |||
B:sortRecipies=true | |||
# Set this to true to force a crash if more than one block attempts to link back to the same Fluid. Enabled by default. | |||
B:forceDuplicateFluidBlockCrash=true | |||
# Set this to true to remove any Entity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES. | |||
B:removeErroringEntities=false | |||
# Set this to true to remove any TileEntity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES. | |||
B:removeErroringTileEntities=false | |||
# Set this to true to check the entire entity's collision bounding box for ladders instead of just the block they are in. Causes noticable differences in mechanics so default is vanilla behavior. Default: false | |||
B:fullBoundingBoxLadders=false | |||
# Control the range of sky blending for colored skies in biomes. | |||
I:biomeSkyBlendRange < | |||
2 | |||
4 | |||
6 | |||
8 | |||
10 | |||
12 | |||
14 | |||
16 | |||
18 | |||
20 | |||
22 | |||
24 | |||
26 | |||
28 | |||
30 | |||
32 | |||
34 | |||
> | |||
# Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic. | |||
D:zombieBaseSummonChance=0.1 | |||
# Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic. | |||
D:zombieBabyChance=0.05 | |||
# Set to false to attempt to allocate 8 stencil bits when starting the GL display context. | |||
B:enableStencilBits=true | |||
# The spawn fuzz when a player respawns in the world, this is controlable by WorldType, this config option is for the default overworld. | |||
I:defaultSpawnFuzz=20 | |||
B:enableGlobalConfig=false | |||
} | |||
@@ -1,38 +0,0 @@ | |||
#Don't put comments; they get removed | |||
#Fri Nov 14 20:36:13 PST 2014 | |||
super-pickaxe-many-drop-items=true | |||
super-pickaxe-drop-items=true | |||
craftscript-dir=craftscripts | |||
max-brush-radius=10 | |||
scripting-timeout=3000 | |||
no-double-slash=false | |||
butcher-max-radius=-1 | |||
profile=false | |||
max-radius=-1 | |||
default-max-polyhedron-points=-1 | |||
use-inventory-creative-override=false | |||
use-inventory=false | |||
shell-save-type= | |||
allow-extra-data-values=false | |||
wand-item=271 | |||
history-size=15 | |||
register-help=true | |||
butcher-default-radius=-1 | |||
schematic-save-dir=schematics | |||
nav-wand-item=345 | |||
max-polygon-points=20 | |||
default-max-polygon-points=-1 | |||
snapshots-dir= | |||
nav-use-glass=true | |||
use-inventory-override=false | |||
cheat-mode=false | |||
max-changed-blocks=-1 | |||
default-max-changed-blocks=-1 | |||
max-polyhedron-points=20 | |||
allow-symbolic-links=false | |||
use-in-creative=false | |||
disallowed-blocks=6,26,27,28,31,32,34,36,37,38,39,40,46,50,51,55,59,66,69,75,76,93,94,77,81,83,7,14,15,16,56 | |||
log-commands=false | |||
log-file=worldedit.log | |||
max-super-pickaxe-size=5 | |||
nav-wand-distance=50 |
@@ -1,7 +0,0 @@ | |||
{ | |||
"feature": { | |||
"name": "CoolGrass", | |||
"description": "CoolGrass gives you a cool grass.", | |||
"selected": false | |||
} | |||
} |
@@ -1,8 +0,0 @@ | |||
{ | |||
"feature": { | |||
"name": "SomeMinimap", | |||
"description": "SomeMinimap gives you a cool minimap.", | |||
"recommendation": "starred", | |||
"selected": true | |||
} | |||
} |