Skip to content

Commit

Permalink
1.2.2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brainage04 committed Jan 26, 2024
1 parent e2db889 commit dee5e6e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ org.gradle.jvmargs=-Xmx2g
baseGroup = com.github.brainage04.togglesprint
mcVersion = 1.8.9
modid = togglesprint
version = 1.2.1
version = 1.2.2
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,12 @@ public static class RealTimeTracker {
public CoreSettings coreSettings;

@Expose
@ConfigOption(name = "24 Hour Format", desc = "Switches to 24-hour format instead of 12.")
@ConfigEditorDropdown(values = {"None", "12-hour", "24-hour"})
public int dateFormat;
@ConfigOption(name = "Time Format", desc = "Switches between 12 and 24 hour format. Select \"None\" to remove the time from this element.")
@ConfigEditorDropdown(values = {"12-hour", "24-hour", "None"})
public int timeFormat;

@Expose
@ConfigOption(name = "Include Date", desc = "Appends today's date to the start of the element.")
@ConfigOption(name = "Include Date", desc = "Appends your computer's date to the start of the element.")
@ConfigEditorBoolean
public boolean includeDate;

Expand All @@ -249,9 +249,9 @@ public static class RealTimeTracker {
@ConfigEditorBoolean
public boolean includeTimezone;

public RealTimeTracker(CoreSettings coreSettings, int dateFormat, boolean includeDate, boolean includeTimezone) {
public RealTimeTracker(CoreSettings coreSettings, int timeFormat, boolean includeDate, boolean includeTimezone) {
this.coreSettings = coreSettings;
this.dateFormat = dateFormat;
this.timeFormat = timeFormat;
this.includeDate = includeDate;
this.includeTimezone = includeTimezone;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ object RealTimeTracker {

if (guiElements.realTimeTracker.includeDate) textArray.add(GUIUtils.primaryChars + SimpleDateFormat("E d/M/y").format(Date()))

when (guiElements.realTimeTracker.dateFormat) {
when (guiElements.realTimeTracker.timeFormat) {
0 -> textArray.add(GUIUtils.primaryChars + SimpleDateFormat("h:mm:ss a").format(Date()))
1 -> textArray.add(GUIUtils.primaryChars + SimpleDateFormat("HH:mm:ss").format(Date()))
2 -> textArray.add(GUIUtils.primaryChars + SimpleDateFormat("h:mm:ss a").format(Date()))
else -> {}
}

Expand Down

0 comments on commit dee5e6e

Please sign in to comment.