Skip to content

Commit

Permalink
merge dev
Browse files Browse the repository at this point in the history
  • Loading branch information
thelsing committed May 31, 2024
1 parent 4acb74c commit 22420bb
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 15 deletions.
3 changes: 1 addition & 2 deletions src/main/java/net/rptools/maptool/client/AppActions.java
Original file line number Diff line number Diff line change
Expand Up @@ -2955,8 +2955,7 @@ protected void executeAction() {
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
chooser.setFileFilter(MapTool.getFrame().getFoundryModuleFilter());

if (chooser.showOpenDialog(MapTool.getFrame()) == JFileChooser.APPROVE_OPTION)
{
if (chooser.showOpenDialog(MapTool.getFrame()) == JFileChooser.APPROVE_OPTION) {
File file = chooser.getSelectedFile();
try {
new FoundryModuleImporter(file).importVTT();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ private String macroButtonPropertiesToString(MacroButtonProperties mbp, String d
* @return MacroButtonProperties
* @throws ParserException If missing label or permission failure;
*/
private MacroButtonProperties macroButtonPropertiesFromJSON(
private static MacroButtonProperties macroButtonPropertiesFromJSON(
MacroButtonProperties mbp, String propString, JsonElement json) throws ParserException {
if (json == null) json = JSONMacroFunctions.getInstance().asJsonElement(propString);
JsonObject jobj = json.getAsJsonObject();
Expand Down Expand Up @@ -1226,7 +1226,7 @@ private JsonObject macroButtonPropertiesToJSON(MacroButtonProperties mbp) {
* @param val The input string.
* @return the boolean value of the input string.
*/
private boolean boolVal(String val) {
private static boolean boolVal(String val) {
if ("true".equalsIgnoreCase(val)) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ public class PreferencesDialog extends JDialog {

/** Text field for the frame rate cap for rendering. */
private final JTextField frameRateCapTextField;

private final JTextField deepLApiKeyTextField;

/** ComboBox for the render performance optimization level. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@
</grid>
</children>
</grid>
<grid id="f8e61" layout-manager="GridLayoutManager" row-count="5" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="f8e61" layout-manager="GridLayoutManager" row-count="6" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="5" left="5" bottom="5" right="5"/>
<constraints>
<tabbedpane title-resource-bundle="net/rptools/maptool/language/i18n" title-key="Label.accessibility"/>
Expand Down Expand Up @@ -959,7 +959,7 @@
</component>
<vspacer id="f517b">
<constraints>
<grid row="4" 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="5" 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>
<hspacer id="20d6e">
Expand All @@ -980,7 +980,7 @@
<grid id="85d76" layout-manager="GridLayoutManager" row-count="13" 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="3" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="4" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none" title-resource-bundle="net/rptools/maptool/language/i18n" title-key="Preferences.label.access.tokenLabel">
Expand Down Expand Up @@ -1212,6 +1212,25 @@
</component>
</children>
</grid>
<component id="54e30" class="javax.swing.JLabel">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="net/rptools/maptool/language/i18n" key="Preferences.label.deeplapikey"/>
</properties>
</component>
<component id="407e" class="javax.swing.JTextField">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="100" height="-1"/>
</grid>
</constraints>
<properties>
<name value="deepLApiKeyTextField"/>
<text value=""/>
</properties>
</component>
</children>
</grid>
<grid id="70c12" layout-manager="GridLayoutManager" row-count="1" column-count="6" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
Expand Down Expand Up @@ -2336,7 +2355,7 @@
<editable value="false"/>
<horizontalAlignment value="4"/>
<name value="jvmXmxTextField"/>
<scrollOffset value="1"/>
<scrollOffset value="15"/>
<selectionEnd value="2"/>
<selectionStart value="2"/>
<text value="4G"/>
Expand All @@ -2351,7 +2370,7 @@
<editable value="false"/>
<horizontalAlignment value="4"/>
<name value="jvmXmsTextField"/>
<scrollOffset value="1"/>
<scrollOffset value="15"/>
<selectionEnd value="2"/>
<selectionStart value="2"/>
<text value="4G"/>
Expand All @@ -2375,7 +2394,7 @@
<editable value="false"/>
<horizontalAlignment value="4"/>
<name value="jvmXssTextField"/>
<scrollOffset value="1"/>
<scrollOffset value="17"/>
<selectionEnd value="2"/>
<selectionStart value="2"/>
<text value="4M"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.rometools.utils.Strings;
import java.awt.*;
import java.awt.geom.Area;
import java.awt.geom.GeneralPath;
Expand All @@ -39,6 +38,7 @@
import net.rptools.maptool.model.*;
import net.rptools.maptool.model.Zone.Layer;
import net.rptools.parser.ParserException;
import org.apache.logging.log4j.util.Strings;
import org.javatuples.Pair;
import org.jetbrains.annotations.NotNull;

Expand All @@ -52,6 +52,7 @@ public class FoundryModuleImporter {

/** Width of the Light source icon. */
private static final int LIGHT_WIDTH = 20;

/** Height of the Light source icon. */
private static final int LIGHT_HEIGHT = 20;

Expand Down
5 changes: 4 additions & 1 deletion src/main/java/net/rptools/maptool/model/Token.java
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,10 @@ public int getHeight() {

public boolean isMarker() {
return getLayer().isMarkerLayer()
&& (!StringUtil.isEmpty(notes) || !StringUtil.isEmpty(gmNotes) || portraitImage != null || hasMacros(true));
&& (!StringUtil.isEmpty(notes)
|| !StringUtil.isEmpty(gmNotes)
|| portraitImage != null
|| hasMacros(true));
}

public String getPropertyType() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/rptools/maptool/util/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;
import net.rptools.maptool.client.AppPreferences;
import net.rptools.maptool.client.MapTool;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2958,7 +2958,7 @@ EditTokenDialog.button.movecbltoggle.tooltip=Include Cover Vision Blocking Layer
EditTokenDialog.button.movefrommap.tooltip=Move or Copy selected blocking layer from Map
EditTokenDialog.button.movetomap.tooltip=Move or Copy selected blocking layer to Map
Label.label=Label:
Preferences.label.deeplapikey=DeepL Api Key
Preferences.label.deeplapikey=DeepL API key


# StatSheet
Expand All @@ -2975,4 +2975,5 @@ 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.
Preferences.label.tokens.stack.hide=Hide Token stack indicator
Preferences.label.tokens.stack.hide.tooltip=Token Layer stack inidicator will be hidden
Preferences.label.tokens.stack.hide.tooltip=Token Layer stack inidicator will be hidden
Preferences.label.deeplapikey=DeepL API key

0 comments on commit 22420bb

Please sign in to comment.