Skip to content

Commit 5c54967

Browse files
author
IMS212
committed
Add tooltips, Gradle 7.5
1 parent e9f030f commit 5c54967

5 files changed

Lines changed: 15 additions & 3 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
org.gradle.jvmargs=-Xmx1G
33

44
# Version and packaging info
5-
version=3.0.0-pre3
5+
version=3.0.0-pre4
66
maven_group=net.hypercubemc
77
archives_base_name=Iris-Installer
88

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/java/net/hypercubemc/iris_installer/InstallerMeta.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
public class InstallerMeta {
1717
private final String metaUrl;
18+
private String betaSnippet;
1819
private boolean hasBeta;
1920
private final List<InstallerMeta.Version> versions = new ArrayList<>();
2021

@@ -24,10 +25,15 @@ public InstallerMeta(String url) {
2425

2526
public void load() throws IOException, JSONException {
2627
JSONObject json = readJsonFromUrl(this.metaUrl);
28+
betaSnippet = json.getString("betaVersionSnippet");
2729
hasBeta = json.getBoolean("hasBeta");
2830
json.getJSONArray("versions").toList().forEach(element -> versions.add(new Version((HashMap) element)));
2931
}
3032

33+
public String getBetaSnippet() {
34+
return betaSnippet;
35+
}
36+
3137
public boolean hasBeta() {
3238
return hasBeta;
3339
}

src/main/java/net/hypercubemc/iris_installer/NewInstaller.form

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@
199199
</Property>
200200
<Property name="selected" type="boolean" value="true"/>
201201
<Property name="text" type="java.lang.String" value="Iris Install"/>
202+
<Property name="toolTipText" type="java.lang.String" value="This installs Iris and Sodium by itself, without any mods."/>
202203
</Properties>
203204
<Events>
204205
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="standaloneTypeMouseClicked"/>
@@ -218,6 +219,7 @@
218219
<Font name="sansserif" size="16" style="0"/>
219220
</Property>
220221
<Property name="text" type="java.lang.String" value="Fabric Install"/>
222+
<Property name="toolTipText" type="java.lang.String" value="This installs Iris and Sodium alongside an installation of Fabric."/>
221223
</Properties>
222224
<Events>
223225
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="fabricTypeMouseClicked"/>

src/main/java/net/hypercubemc/iris_installer/NewInstaller.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ public NewInstaller() {
8686

8787
initComponents();
8888

89+
betaSelection.setText("Use " + INSTALLER_META.getBetaSnippet() + " beta version (not recommended)");
90+
8991
// Change outdated version text color based on dark mode
9092
if (!dark) {
9193
Color newTextColor = new Color(154, 136, 63, 255);
@@ -321,6 +323,7 @@ private void initComponents() {
321323
standaloneType.setFont(new java.awt.Font("sansserif", 0, 16)); // NOI18N
322324
standaloneType.setSelected(true);
323325
standaloneType.setText("Iris Install");
326+
standaloneType.setToolTipText("This installs Iris and Sodium by itself, without any mods.");
324327
standaloneType.addMouseListener(new java.awt.event.MouseAdapter() {
325328
public void mouseClicked(java.awt.event.MouseEvent evt) {
326329
standaloneTypeMouseClicked(evt);
@@ -331,6 +334,7 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {
331334
installType.add(fabricType);
332335
fabricType.setFont(new java.awt.Font("sansserif", 0, 16)); // NOI18N
333336
fabricType.setText("Fabric Install");
337+
fabricType.setToolTipText("This installs Iris and Sodium alongside an installation of Fabric.");
334338
fabricType.addMouseListener(new java.awt.event.MouseAdapter() {
335339
public void mouseClicked(java.awt.event.MouseEvent evt) {
336340
fabricTypeMouseClicked(evt);
@@ -460,7 +464,7 @@ private void installButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIR
460464

461465
try {
462466
URL loaderVersionUrl = new URL("https://raw.githubusercontent.com/IrisShaders/Iris-Installer-Maven/master/latest-loader");
463-
String profileName = installAsMod ? "Fabric Loader " : "Iris & Sodium for";
467+
String profileName = installAsMod ? "Fabric Loader " : "Iris & Sodium for ";
464468
VanillaLauncherIntegration.Icon profileIcon = installAsMod ? VanillaLauncherIntegration.Icon.FABRIC : VanillaLauncherIntegration.Icon.IRIS;
465469
String loaderVersion = installAsMod ? Main.LOADER_META.getLatestVersion(false).getVersion() : Utils.readTextFile(loaderVersionUrl);
466470
boolean success = VanillaLauncherIntegration.installToLauncher(getVanillaGameDir(), getInstallDir(), profileName + selectedVersion.name, selectedVersion.name, loaderName, loaderVersion, profileIcon);

0 commit comments

Comments
 (0)