-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a couple more development options (#173)
* Add another dev option Show mapping source plugin * Add dev option to debug token highlights * Allow saving the printed mapping tree to a file * Show dev options correctly when reopening enigma * Add translations for the dev menu * Remove non-breaking space from EntryTreePrinter * Add translation for "source plugin"
- Loading branch information
Showing
7 changed files
with
88 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/DevSection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.quiltmc.enigma.gui.config; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import org.quiltmc.config.api.ReflectiveConfig; | ||
import org.quiltmc.config.api.annotations.Processor; | ||
import org.quiltmc.config.api.values.TrackedValue; | ||
import org.quiltmc.enigma.api.source.DecompiledClassSource; | ||
|
||
public class DevSection extends ReflectiveConfig.Section { | ||
@SerializedName("show_mapping_source_plugin") | ||
public final TrackedValue<Boolean> showMappingSourcePlugin = this.value(false); | ||
|
||
@SerializedName("debug_token_highlights") | ||
@Processor("processDebugTokenHighlights") | ||
public final TrackedValue<Boolean> debugTokenHighlights = this.value(false); | ||
|
||
@SuppressWarnings("unused") | ||
public void processDebugTokenHighlights(TrackedValue.Builder<Boolean> builder) { | ||
builder.callback(trackedValue -> DecompiledClassSource.DEBUG_TOKEN_HIGHLIGHTS = trackedValue.value()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters