Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2e2e506
Clear marker list before updating
kwvanderlinde Jul 27, 2025
22afb49
Document which fields are updated (and thus need to be cleared) by ea…
kwvanderlinde Jul 27, 2025
6ddac5f
Merge pull request #5737 from kwvanderlinde/bugfix/5736-marker-update
kwvanderlinde Aug 3, 2025
8cbd6ee
Do not show token popup menu while dragging map
kwvanderlinde Aug 5, 2025
55a2b2f
Merge pull request #5749 from kwvanderlinde/bugfix/5738-token-content…
kwvanderlinde Aug 6, 2025
190f786
Calculate selected token list on demand
kwvanderlinde Aug 13, 2025
c24b166
Remove redundant application of token opacity
kwvanderlinde Aug 28, 2025
f6209cb
Merge pull request #5765 from kwvanderlinde/bugfix/5761-doubled-up-op…
kwvanderlinde Aug 28, 2025
43998fb
Merge pull request #5757 from kwvanderlinde/bugfix/5745-getSelected-r…
kwvanderlinde Aug 28, 2025
6fa926d
Respect the lack of macro button when editing campaign properties
kwvanderlinde Sep 3, 2025
4e01ffb
Privatize MacroEditorDialog fields and remove commented code
kwvanderlinde Sep 3, 2025
1f5ddb0
Merge pull request #5770 from kwvanderlinde/bugfix/5760-default-value…
bubblobill Sep 3, 2025
2c5b36d
In HTMLContent, all raw HTML strings do not have bridge or base URL
kwvanderlinde Sep 3, 2025
4a71a92
Fixup the HTML when constructing `HtmlDocument`
kwvanderlinde Sep 3, 2025
a4ee42a
Merge pull request #5771 from kwvanderlinde/bugfix/5755-cachelib
kwvanderlinde Sep 4, 2025
155bf29
Apply correct clipping
kwvanderlinde Sep 10, 2025
76011ee
Fix FacingArrowRenderer-preCheck timer
kwvanderlinde Sep 16, 2025
6db85d6
Fix renderFog-hardFow timer
kwvanderlinde Sep 16, 2025
5b4fb0f
ZoneRenderer should not check GDX panel visibility directly
kwvanderlinde Sep 16, 2025
5498bda
Remove LibGDX renderer
kwvanderlinde Sep 16, 2025
1e31eb7
Merge pull request #5776 from kwvanderlinde/bugfix/5762-visible-over-fow
kwvanderlinde Sep 16, 2025
b904c3b
Merge pull request #5781 from kwvanderlinde/bugfix/5780-1.18-performance
kwvanderlinde Sep 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ public static final class Toggle {
"Preferences.developer.debugTokenDragging.label",
"Preferences.developer.debugTokenDragging.tooltip",
false);
public static final Preference<Boolean> EnableLibGdxRendererToggleButton =
store.defineBoolean(
"enableLibGDXRendererToggleButton",
"Preferences.developer.enableLibGDXRendererToggleButton.label",
"Preferences.developer.enableLibGDXRendererToggleButton.tooltip",
false);

public static List<Preference<Boolean>> getOptions() {
return store.getDefinedPreferences().stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ public void mousePressed(MouseEvent e) {

@Override
public void mouseReleased(MouseEvent e) {
final boolean isDraggingMap = isDraggingMap();

super.mouseReleased(e);

mouseButtonDown = false;
Expand Down Expand Up @@ -563,7 +565,7 @@ public void mouseReleased(MouseEvent e) {
}

// POPUP MENU
if (SwingUtilities.isRightMouseButton(e) && tokenDragOp == null && !isDraggingMap()) {
if (SwingUtilities.isRightMouseButton(e) && tokenDragOp == null && !isDraggingMap) {
final var selectionModel = renderer.getSelectionModel();
if (tokenUnderMouse != null && !selectionModel.isSelected(tokenUnderMouse.getId())) {
if (!SwingUtil.isShiftDown(e)) {
Expand All @@ -585,7 +587,6 @@ public void mouseReleased(MouseEvent e) {
return;
}
}
super.mouseReleased(e);
}

// //
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/net/rptools/maptool/client/tool/StampTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ public void mousePressed(MouseEvent e) {

@Override
public void mouseReleased(MouseEvent e) {
final boolean isDraggingMap = isDraggingMap();

super.mouseReleased(e);

if (isShowingTokenStackPopup) {
Expand Down Expand Up @@ -446,7 +448,7 @@ public void mouseReleased(MouseEvent e) {
return;
}
// POPUP MENU
if (SwingUtilities.isRightMouseButton(e) && tokenDragOp == null && !isDraggingMap()) {
if (SwingUtilities.isRightMouseButton(e) && tokenDragOp == null && !isDraggingMap) {
final var selectionModel = renderer.getSelectionModel();
if (tokenUnderMouse != null && !selectionModel.isSelected(tokenUnderMouse.getId())) {
if (!SwingUtil.isShiftDown(e)) {
Expand All @@ -469,7 +471,6 @@ public void mouseReleased(MouseEvent e) {
return;
}
}
super.mouseReleased(e);
}

// //
Expand Down
39 changes: 0 additions & 39 deletions src/main/java/net/rptools/maptool/client/ui/MapToolFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@
*/
package net.rptools.maptool.client.ui;

import com.badlogic.gdx.backends.jogamp.JoglAwtApplicationConfiguration;
import com.badlogic.gdx.backends.jogamp.JoglSwingCanvas;
import com.google.common.eventbus.Subscribe;
import com.jidesoft.docking.DefaultDockableHolder;
import com.jidesoft.docking.DockableFrame;
import com.jidesoft.docking.DockingManager;
import com.jogamp.opengl.awt.GLJPanel;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.BufferedImage;
Expand Down Expand Up @@ -96,7 +93,6 @@
import net.rptools.maptool.client.ui.zone.PointerOverlay;
import net.rptools.maptool.client.ui.zone.PointerToolOverlay;
import net.rptools.maptool.client.ui.zone.ZoneMiniMapPanel;
import net.rptools.maptool.client.ui.zone.gdx.GdxRenderer;
import net.rptools.maptool.client.ui.zone.renderer.ZoneRenderer;
import net.rptools.maptool.events.MapToolEventBus;
import net.rptools.maptool.language.I18N;
Expand Down Expand Up @@ -159,8 +155,6 @@ public class MapToolFrame extends DefaultDockableHolder implements WindowListene
/** Contains the zoneRenderer, as well as all overlays. */
private final JPanel zoneRendererPanel;

private GLJPanel gdxPanel;

private JPanel currentRenderPanel;

/** Contains the overlays that should be displayed in front of everything else. */
Expand Down Expand Up @@ -416,11 +410,9 @@ public MapToolFrame(JMenuBar menuBar) {
zoneRendererPanel = new JPanel(new PositionalLayout(5));
zoneRendererPanel.setBackground(Color.black);
currentRenderPanel = zoneRendererPanel;
initGdx();

zoneRendererPanel.add(getChatTypingPanel(), PositionalLayout.Position.NW);
zoneRendererPanel.add(getChatActionLabel(), PositionalLayout.Position.SW);
zoneRendererPanel.add(gdxPanel, PositionalLayout.Position.CENTER);

commandPanel = new CommandPanel();

Expand Down Expand Up @@ -472,37 +464,6 @@ public MapToolFrame(JMenuBar menuBar) {
setChatTypingLabelColor(AppPreferences.chatNotificationColor.get());
}

private void initGdx() {
var config = new JoglAwtApplicationConfiguration();
// config.foregroundFPS = 300;
// config.backgroundFPS = 10;
// config.title = "maptool";
// config.width = 640;
// config.height = 480;
// config.samples = 1;
// var config = new LwjglApplicationConfiguration();
config.foregroundFPS = 10000;
config.vSyncEnabled = false;

var joglSwingCanvas = new JoglSwingCanvas(GdxRenderer.getInstance(), config);
// var joglSwingCanvas = new LwjglAWTCanvas(GdxRenderer.getInstance(), config);

gdxPanel = joglSwingCanvas.getGLCanvas();
gdxPanel.setVisible(false);
gdxPanel.setOpaque(false);
// gdxPanel.setLayout(new PositionalLayout(5));
}

public void switchRenderers() {
var isVisible = gdxPanel.isVisible();
gdxPanel.setVisible(!isVisible);
// currentRenderer.setVisible(isVisible);
}

public GLJPanel getGdxPanel() {
return gdxPanel;
}

public ChatNotificationTimers getChatNotificationTimers() {
return chatTyperTimers;
}
Expand Down
17 changes: 0 additions & 17 deletions src/main/java/net/rptools/maptool/client/ui/ToolbarPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import java.util.Enumeration;
import java.util.Hashtable;
import javax.swing.*;
import net.rptools.maptool.client.DeveloperOptions;
import net.rptools.maptool.client.MapTool;
import net.rptools.maptool.client.functions.MediaPlayerAdapter;
import net.rptools.maptool.client.swing.SwingUtil;
Expand Down Expand Up @@ -167,8 +166,6 @@ public ToolbarPanel(Toolbox tbox) {
tokenSelectionButtonAll.setSelected(true);
// Jamz: End panel

add(createGdxButton(Icons.TOOLBAR_LIBGDX));

// the "Select Map" button
mapselect = createZoneSelectionButton();
add(mapselect);
Expand Down Expand Up @@ -541,20 +538,6 @@ private JToggleButton createMuteButton(
return button;
}

private JToggleButton createGdxButton(final Icons icon) {
final JToggleButton button = new JToggleButton();
button.addActionListener(
e -> {
MapTool.getFrame().switchRenderers();
});

button.setIcon(RessourceManager.getBigIcon(icon));
button.setVisible(DeveloperOptions.Toggle.EnableLibGdxRendererToggleButton.get());
DeveloperOptions.Toggle.EnableLibGdxRendererToggleButton.onChange(button::setVisible);

return button;
}

private JToggleButton createTokenSelectionButton(
final Icons icon, final Icons offIcon, String tooltip, TokenSelection tokenSelection) {
final JToggleButton button = new JToggleButton();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ private record HtmlDocumentContent(
document.outputSettings().charset(StandardCharsets.US_ASCII);
}

public HtmlDocumentContent(
String str, boolean isJavaBridgeInjected, boolean isBaseUrlInjected) {
this(Jsoup.parse(str), isJavaBridgeInjected, isBaseUrlInjected);
public HtmlDocumentContent(String str) {
this(Jsoup.parse(HTMLPanelInterface.fixHTML(str)), false, false);
}

public String str() {
Expand Down Expand Up @@ -176,7 +175,7 @@ private HTMLContent(Content content) {
* @return an HTMLContent object
*/
public static HTMLContent htmlFromString(@Nonnull String html) {
return new HTMLContent(new HtmlDocumentContent(html, false, false));
return new HTMLContent(new HtmlDocumentContent(html));
}

/**
Expand Down Expand Up @@ -333,7 +332,7 @@ public HTMLContent fetchContent() throws IOException {
var assetType = Asset.Type.fromMediaType(mediaType);

if (assetType == Asset.Type.HTML) {
return new HTMLContent(new HtmlDocumentContent(html, false, false));
return new HTMLContent(new HtmlDocumentContent(html));
}
return new HTMLContent(new StringContent(html));
}
Expand All @@ -343,7 +342,7 @@ public HTMLContent fetchContent() throws IOException {
if (asset != null) {
if (asset.isStringAsset()) {
if (asset.getType() == Asset.Type.HTML) {
return new HTMLContent(new HtmlDocumentContent(asset.getDataAsString(), false, false));
return new HTMLContent(new HtmlDocumentContent(asset.getDataAsString()));
}
return new HTMLContent(new StringContent(asset.getDataAsString()));
} else {
Expand Down
Loading
Loading