Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bubblobill committed Oct 28, 2023
1 parent ec86070 commit 548b690
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public class PreferencesDialog extends JDialog {
private final JCheckBox tokensStartSnapToGridCheckBox;
private final JCheckBox tokensSnapWhileDraggingCheckBox;
private final JCheckBox hideMousePointerWhileDraggingCheckBox;
private final JCheckBox hideTokenStackIndicatorCheckBox;
private final JCheckBox newMapsVisibleCheckBox;
private final JCheckBox newTokensVisibleCheckBox;
private final JCheckBox tokensStartFreeSizeCheckBox;
Expand Down Expand Up @@ -323,6 +324,7 @@ public PreferencesDialog() {
tokensStartSnapToGridCheckBox = panel.getCheckBox("tokensStartSnapToGridCheckBox");
tokensSnapWhileDraggingCheckBox = panel.getCheckBox("tokensSnapWhileDragging");
hideMousePointerWhileDraggingCheckBox = panel.getCheckBox("hideMousePointerWhileDragging");
hideTokenStackIndicatorCheckBox = panel.getCheckBox("hideTokenStackIndicator");
newMapsVisibleCheckBox = panel.getCheckBox("newMapsVisibleCheckBox");
newTokensVisibleCheckBox = panel.getCheckBox("newTokensVisibleCheckBox");
stampsStartFreeSizeCheckBox = panel.getCheckBox("stampsStartFreeSize");
Expand Down Expand Up @@ -657,6 +659,10 @@ public void focusLost(FocusEvent e) {
e ->
AppPreferences.setHideMousePointerWhileDragging(
hideMousePointerWhileDraggingCheckBox.isSelected()));
hideTokenStackIndicatorCheckBox.addActionListener(
e ->
AppPreferences.setHideTokenStackIndicator(
hideTokenStackIndicatorCheckBox.isSelected()));
newMapsVisibleCheckBox.addActionListener(
e -> AppPreferences.setNewMapsVisible(newMapsVisibleCheckBox.isSelected()));
newTokensVisibleCheckBox.addActionListener(
Expand Down Expand Up @@ -1134,6 +1140,7 @@ private void setInitialState() {
tokensSnapWhileDraggingCheckBox.setSelected(AppPreferences.getTokensSnapWhileDragging());
hideMousePointerWhileDraggingCheckBox.setSelected(
AppPreferences.getHideMousePointerWhileDragging());
hideTokenStackIndicatorCheckBox.setSelected(AppPreferences.getHideTokenStackIndicator());
newMapsVisibleCheckBox.setSelected(AppPreferences.getNewMapsVisible());
newTokensVisibleCheckBox.setSelected(AppPreferences.getNewTokensVisible());
stampsStartFreeSizeCheckBox.setSelected(AppPreferences.getObjectsStartFreesize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<properties/>
<border type="none"/>
<children>
<grid id="b641a" layout-manager="GridLayoutManager" row-count="16" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="b641a" layout-manager="GridLayoutManager" row-count="17" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="2" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="true"/>
Expand Down Expand Up @@ -323,14 +323,33 @@
</constraints>
<properties>
<name value="hideMousePointerWhileDragging"/>
<selected value="false"/>
<text value="&#9;"/>
</properties>
</component>
<vspacer id="a9eb4">
<constraints>
<grid row="15" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
<grid row="16" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="60bed" class="javax.swing.JLabel">
<constraints>
<grid row="15" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="net/rptools/maptool/language/i18n" key="Preferences.label.tokens.stack.hide"/>
<toolTipText resource-bundle="net/rptools/maptool/language/i18n" key="Preferences.label.tokens.stack.hide.tooltip"/>
</properties>
</component>
<component id="93234" class="javax.swing.JCheckBox">
<constraints>
<grid row="15" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<name value="hideTokenStackIndicator"/>
<text value="&#9;"/>
</properties>
</component>
</children>
</grid>
<grid id="f38d9" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
Expand Down Expand Up @@ -966,7 +985,7 @@
<tabbedpane title-resource-bundle="net/rptools/maptool/language/i18n" title-key="Label.application"/>
</constraints>
<properties>
<visible value="true"/>
<visible value="false"/>
</properties>
<border type="none"/>
<children>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2820,4 +2820,6 @@ advanced.roll.variableNotNumber = Variable {0} is not a number.
advanced.roll.unknownProperty = Unknown Property {0}.
advanced.roll.propertyNotNumber = Property {0} is not a number.
advanced.roll.noTokenInContext = No token in context.
advanced.roll.inputNotNumber = Input {0} is not a number.
advanced.roll.inputNotNumber = Input {0} is not a number.
Preferences.label.tokens.stack.hide=Hide Token stack indicator
Preferences.label.tokens.stack.hide.tooltip=Token Layer stack inidicator will be hidden

0 comments on commit 548b690

Please sign in to comment.