Skip to content

Commit ccf9e09

Browse files
committed
Expand clickthrough options
1 parent f089f2e commit ccf9e09

7 files changed

Lines changed: 250 additions & 94 deletions

File tree

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ All features can be turned on or off at will using the config screen.
2626

2727
#### Enhanced Editor
2828

29-
- Automatic line wrapping
30-
- Manual line breaks with an optional indicator
31-
- Continuous cursor travel using arrow keys
32-
- Stepped travel using home and end keys
33-
- Multi-line automatic shifting
34-
- Multi-line selection
35-
- Multi-line copy and paste
29+
- Automatic line wrapping.
30+
- Manual line breaks with an optional indicator.
31+
- Continuous cursor travel using arrow keys.
32+
- Stepped travel using home and end keys.
33+
- Multi-line automatic shifting.
34+
- Multi-line selection.
35+
- Multi-line copy and paste.
3636

3737
#### Quick-Action Buttons
3838

@@ -60,10 +60,10 @@ All features can be turned on or off at will using the config screen.
6060
#### Click-Through
6161

6262
- [ClickThrough Plus](https://modrinth.com/project/fJi8nm80) is recommended for use with SignTweaks.
63-
- If ClickThrough Plus is not installed, SignTweaks will use a basic click-through implementation to
64-
allow clicking through signs to most block entities (including chests, furnaces etc.)
63+
- In case it is not available, SignTweaks includes a basic implementation that allows clicking
64+
through wall signs, banners, item frames and paintings to most block entities.
6565

66-
#### Auto Fill
66+
#### Auto-Fill
6767

6868
- Automatically add text to signs when placing.
6969

@@ -73,6 +73,7 @@ The following mods are explicitly incompatible with SignTweaks, due to modifying
7373

7474
- [Chat Calc](https://modrinth.com/project/o2oFdqXS) (`chatcalc`) by Emirlol.
7575
- [Improved Sign Editing](https://modrinth.com/project/EWQifKYI) (`improvedsignediting`) by Serilum.
76+
- [Sign Copy](https://modrinth.com/project/cK4nxndh) (`signcopy`) by TerminalMC.
7677
- [Sign Edit Lite](https://modrinth.com/project/QvdBkyYv) (`signeditlite`) by pintergabor.
7778
- [Sign Tools](https://modrinth.com/project/31HqGqE1) (`signtools`) by DmitryLovin.
7879

changelog.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@
22

33
## 2.2.0
44

5-
- Disabled the enhanced editor toggle button by default.
6-
- Disabled the line break indicator by default.
7-
- Added a 'Revert' GUI button.
8-
- Added an option to disable saving when exiting using the 'Escape' key.
9-
- Added an option to conditionally prevent opening the sign editor.
10-
- Added an option to block movement key input until key release when opening the sign editor.
11-
- Added an option to automatically add text to placed signs.
12-
- Added an option to click through signs to most block entities.
5+
- Rebranded to "Sign Tweaks".
6+
- See description/readme for updated feature-set.
137

148
## 1.2.0
159

common/src/main/java/dev/terminalmc/signtweaks/config/Config.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public static Options options() {
6666

6767
public static class Options {
6868

69+
// General
70+
6971
public static final boolean useEnhancedEditorDefault = true;
7072
public boolean useEnhancedEditor = useEnhancedEditorDefault;
7173

@@ -90,11 +92,21 @@ public static class Options {
9092
public static final EditCondition editConditionDefault = EditCondition.ALWAYS;
9193
public EditCondition editCondition = editConditionDefault;
9294

93-
public static final boolean editWhenPlacingOnBlockEntityDefault = true;
94-
public boolean blockEntitySneakEditOverride = editWhenPlacingOnBlockEntityDefault;
95+
public static final boolean blockEntitySneakEditOverrideDefault = true;
96+
public boolean blockEntitySneakEditOverride = blockEntitySneakEditOverrideDefault;
97+
98+
// ClickThrough
99+
100+
public static final boolean clickThroughSignsDefault = true;
101+
public boolean clickThroughSigns = clickThroughSignsDefault;
102+
103+
public static final boolean clickThroughBannersDefault = false;
104+
public boolean clickThroughBanners = clickThroughBannersDefault;
105+
106+
public static final boolean clickThroughHangingEntitiesDefault = false;
107+
public boolean clickThroughHangingEntities = clickThroughHangingEntitiesDefault;
95108

96-
public static final boolean clickThroughDefault = true;
97-
public boolean clickThrough = clickThroughDefault;
109+
// AutoFill
98110

99111
public static final boolean useAutoFillDefault = false;
100112
public boolean useAutoFill = useAutoFillDefault;

common/src/main/java/dev/terminalmc/signtweaks/gui/screen/ClothScreenProvider.java

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,26 +141,47 @@ static Screen getConfigScreen(Screen parent) {
141141
.build());
142142

143143
general.addEntry(eb.startBooleanToggle(
144-
localized("option", "general.editWhenPlacingOnBlockEntity"),
144+
localized("option", "general.blockEntitySneakEditOverride"),
145145
options.blockEntitySneakEditOverride
146146
)
147147
.setTooltip(localized(
148148
"option",
149-
"general.editWhenPlacingOnBlockEntity.tooltip",
149+
"general.blockEntitySneakEditOverride.tooltip",
150150
localized("option", "general.editCondition"),
151151
localized("option", "general.editCondition." + EditCondition.NOT_SNEAKING)
152152
))
153-
.setDefaultValue(Options.editWhenPlacingOnBlockEntityDefault)
153+
.setDefaultValue(Options.blockEntitySneakEditOverrideDefault)
154154
.setSaveConsumer(val -> options.blockEntitySneakEditOverride = val)
155155
.build());
156156

157-
general.addEntry(eb.startBooleanToggle(
158-
localized("option", "general.clickThrough"),
159-
options.clickThrough
157+
ConfigCategory clickThrough =
158+
builder.getOrCreateCategory(localized("option", "clickThrough"));
159+
160+
clickThrough.addEntry(eb.startBooleanToggle(
161+
localized("option", "clickThrough.clickThroughSigns"),
162+
options.clickThroughSigns
163+
)
164+
.setTooltip(localized("option", "clickThrough.clickThroughSigns.tooltip"))
165+
.setDefaultValue(Options.clickThroughSignsDefault)
166+
.setSaveConsumer(val -> options.clickThroughSigns = val)
167+
.build());
168+
169+
clickThrough.addEntry(eb.startBooleanToggle(
170+
localized("option", "clickThrough.clickThroughBanners"),
171+
options.clickThroughBanners
172+
)
173+
.setTooltip(localized("option", "clickThrough.clickThroughBanners.tooltip"))
174+
.setDefaultValue(Options.clickThroughBannersDefault)
175+
.setSaveConsumer(val -> options.clickThroughBanners = val)
176+
.build());
177+
178+
clickThrough.addEntry(eb.startBooleanToggle(
179+
localized("option", "clickThrough.clickThroughHangingEntities"),
180+
options.clickThroughHangingEntities
160181
)
161-
.setTooltip(localized("option", "general.clickThrough.tooltip"))
162-
.setDefaultValue(Options.clickThroughDefault)
163-
.setSaveConsumer(val -> options.clickThrough = val)
182+
.setTooltip(localized("option", "clickThrough.clickThroughHangingEntities.tooltip"))
183+
.setDefaultValue(Options.clickThroughHangingEntitiesDefault)
184+
.setSaveConsumer(val -> options.clickThroughHangingEntities = val)
164185
.build());
165186

166187
ConfigCategory autoFill = builder.getOrCreateCategory(localized("option", "autoFill"));

0 commit comments

Comments
 (0)