Skip to content
Merged
Changes from all commits
Commits
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
20 changes: 9 additions & 11 deletions src/main/java/net/rptools/maptool/client/ui/MapToolFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ public MapToolFrame(JMenuBar menuBar) {
currentRenderPanel = zoneRendererPanel;

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

commandPanel = new CommandPanel();

Expand All @@ -423,13 +422,12 @@ public MapToolFrame(JMenuBar menuBar) {
zoneRendererPanel.add(overlayPanel, PositionalLayout.Position.CENTER, 0);
overlayPanel.setVisible(false); // disabled by default

// chat action label should be above overlays, otherwise unclickable when overlays visible
zoneRendererPanel.add(getChatActionLabel(), PositionalLayout.Position.SW, 0);

pointerToolOverlay = new PointerToolOverlay();
zoneRendererPanel.add(pointerToolOverlay, PositionalLayout.Position.CENTER, 0);

// bring chat notifications to the front
zoneRendererPanel.setComponentZOrder(getChatTypingPanel(), 0);
zoneRendererPanel.setComponentZOrder(getChatActionLabel(), 0);

// Put it all together
setJMenuBar(menuBar);
add(BorderLayout.NORTH, toolbarPanel);
Expand Down Expand Up @@ -1707,8 +1705,7 @@ public void setCurrentZoneRenderer(ZoneRenderer renderer) {
zoneRendererPanel.remove(currentRenderer);
}
if (renderer != null) {
zoneRendererPanel.add(
renderer, PositionalLayout.Position.CENTER, zoneRendererPanel.getComponentCount() - 2);
zoneRendererPanel.add(renderer, PositionalLayout.Position.CENTER);
zoneRendererPanel.doLayout();
}
currentRenderer = renderer;
Expand Down Expand Up @@ -1933,10 +1930,6 @@ public void showFullScreenTools() {
zoneRendererPanel.add(initiativePanel, PositionalLayout.Position.SE);
zoneRendererPanel.setComponentZOrder(initiativePanel, 0);

// bring chat notifications to the front
zoneRendererPanel.setComponentZOrder(getChatTypingPanel(), 0);
zoneRendererPanel.setComponentZOrder(getChatActionLabel(), 0);

zoneRendererPanel.revalidate();
zoneRendererPanel.doLayout();
zoneRendererPanel.repaint();
Expand Down Expand Up @@ -1988,6 +1981,11 @@ public void showWindowed() {
menuBar.setVisible(true);
this.setVisible(true);

// hide the chat action label if the chat window is already visible in windowed mode
if (chatActionLabel.isShowing() && isCommandPanelVisible()) {
chatActionLabel.setVisible(false);
}

fullScreenFrame.dispose();
fullScreenFrame = null;
}
Expand Down
Loading