Skip to content

Commit

Permalink
11.01 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ironmonk88 committed Jun 16, 2023
1 parent 0187b5b commit 658e5bb
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 117 deletions.
202 changes: 103 additions & 99 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,99 +1,103 @@
# Version 10.2

Fixed an issue where the toolbar wouldn't stay minimised

Added the option to have the settings per scene or one setting overall.

Added the option to select an actor to focus on, rather than just a token. So you can switch scenes and it will still follow the appropriate token.

Added the option to set the screen size pased on the party. So it will maintain a viewport that all tokens the display player has limited or greater access to will show.

Fixed issue with initial positioning.

Added the option to click on the screen or vision headers to select what type of view. Instead of having to right click to get the menu up.

Fixed an issue with the toolbar wandering slightly to the right.

Fixed issue with combat tracker never disappearing when requested to not be shown.

Fixed issue with the size of the toolbat in Call of Cthulu

Fixed issue with common display button in the minimal ui interface

Removed the error message that a token doesn't have vision on a scene.

Fixed issue with auto closing an image popout when opened from the Image Popout instead of a Journal.

Added key bindings for closing journals or closing images.

# Version 10.1

Totally updated the interface.
You can now show a control bar that lets you select if you want the display screen to mirror, the GM, mirror the current combatant, or mirror a specific token.
You can also set which token has control focus on it. The one the current GM has selected, the current combatant, or a specific token.

You can toggle if you want either the screen or focus to be active by clicking on the image, and you can change the type of each by right clicking.

The settings to turn a player into the common display is now in the settings. And the toggle on the toolbar opens up the window with all the controls.

You can also toggle a player being the Common Display by right clicking on the player name in the player list and selecting "Show As Common Display"

You can also clear all images and all journals from buttons on the control window, and you can set shared images to clear after a certain number of seconds.

# Version 1.0.14

Added v10 support.

# Version 1.0.12

Added support for levels 3D and chat videos, thank you vexofp for the code update

Added support for scaling the combat tracker, thank you vexofp

# Version 1.0.11

Fixed some v9 styling changes that was preventing the chat log from being revealed.

# Version 1.0.10

Adding v9 support, which boils down to hotkey support and changes with how the layer is registered

# Version 1.0.9

Added combat carosel support

Automatically popout the combat display if the common display is reloaded and there's an active combat

Added option to limit the number of combatants displayed when displaying all combatants, and scrolling the active combatant to the top.

Added option to close all open journal entries.

# Version 1.0.8
Added option to show all combatants not just the active one.

Added update so that Enhanced Journal Slideshows will be displayed.

# Version 1.0.7
Added option to include Assistant GM players in the list of players that can be used for the Common Display.

# Version 1.0.6
Merged code to support token selection mirroring. Thank you Jixxus for the code.

# Version 1.0.5
Fixed issues with the layer

# Version 1.0.4
Changes to support 0.8.x

# Version 1.0.3
Fixed issue where the chat window wasn't hiding after a refresh

# Version 1.0.2
Added support for Health Estimate

# Version 1.0.1
Added hotkey support for changing Mirror Screen setting

Adding support for Image Hover module

Changed the design so instead of adding a comma separated list of player names in the config settings, I added a window to be able to change all the settings on the fly. So you can turn the display settings on and off while running the game. You can also turn off screen mirroring for specific displays, and clear images for specific displays. This update will also remember if the player was set as a display last session and disable the UI immediately when loading. It should provide a cleaner experience.
# Version 11.01

Adding support for v11

# Version 10.2

Fixed an issue where the toolbar wouldn't stay minimised

Added the option to have the settings per scene or one setting overall.

Added the option to select an actor to focus on, rather than just a token. So you can switch scenes and it will still follow the appropriate token.

Added the option to set the screen size pased on the party. So it will maintain a viewport that all tokens the display player has limited or greater access to will show.

Fixed issue with initial positioning.

Added the option to click on the screen or vision headers to select what type of view. Instead of having to right click to get the menu up.

Fixed an issue with the toolbar wandering slightly to the right.

Fixed issue with combat tracker never disappearing when requested to not be shown.

Fixed issue with the size of the toolbat in Call of Cthulu

Fixed issue with common display button in the minimal ui interface

Removed the error message that a token doesn't have vision on a scene.

Fixed issue with auto closing an image popout when opened from the Image Popout instead of a Journal.

Added key bindings for closing journals or closing images.

# Version 10.1

Totally updated the interface.
You can now show a control bar that lets you select if you want the display screen to mirror, the GM, mirror the current combatant, or mirror a specific token.
You can also set which token has control focus on it. The one the current GM has selected, the current combatant, or a specific token.

You can toggle if you want either the screen or focus to be active by clicking on the image, and you can change the type of each by right clicking.

The settings to turn a player into the common display is now in the settings. And the toggle on the toolbar opens up the window with all the controls.

You can also toggle a player being the Common Display by right clicking on the player name in the player list and selecting "Show As Common Display"

You can also clear all images and all journals from buttons on the control window, and you can set shared images to clear after a certain number of seconds.

# Version 1.0.14

Added v10 support.

# Version 1.0.12

Added support for levels 3D and chat videos, thank you vexofp for the code update

Added support for scaling the combat tracker, thank you vexofp

# Version 1.0.11

Fixed some v9 styling changes that was preventing the chat log from being revealed.

# Version 1.0.10

Adding v9 support, which boils down to hotkey support and changes with how the layer is registered

# Version 1.0.9

Added combat carosel support

Automatically popout the combat display if the common display is reloaded and there's an active combat

Added option to limit the number of combatants displayed when displaying all combatants, and scrolling the active combatant to the top.

Added option to close all open journal entries.

# Version 1.0.8
Added option to show all combatants not just the active one.

Added update so that Enhanced Journal Slideshows will be displayed.

# Version 1.0.7
Added option to include Assistant GM players in the list of players that can be used for the Common Display.

# Version 1.0.6
Merged code to support token selection mirroring. Thank you Jixxus for the code.

# Version 1.0.5
Fixed issues with the layer

# Version 1.0.4
Changes to support 0.8.x

# Version 1.0.3
Fixed issue where the chat window wasn't hiding after a refresh

# Version 1.0.2
Added support for Health Estimate

# Version 1.0.1
Added hotkey support for changing Mirror Screen setting

Adding support for Image Hover module

Changed the design so instead of adding a comma separated list of player names in the config settings, I added a window to be able to change all the settings on the fly. So you can turn the display settings on and off while running the game. You can also turn off screen mirroring for specific displays, and clear images for specific displays. This update will also remember if the player was set as a display last session and disable the UI immediately when loading. It should provide a cleaner experience.
19 changes: 11 additions & 8 deletions module.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"title": "Monk's Common Display",
"description": "Set up a display without all the ui so that it can be displayed on an alternate screen",
"version": "10.2",
"version": "11.01",
"socket": true,
"authors": [
{
"name": "IronMonk",
"discord": "ironmonk88#4075",
"patreon": "https://www.patreon.com/ironmonk",
"ko-fi": "https://ko-fi.com/ironmonk88"
"flags": {
"github": "ironmonk88",
"patreon": "ironmonk",
"ko-fi": "ironmonk88"
}
}
],
"languages": [
Expand All @@ -26,16 +29,16 @@
"css/monks-common-display.css"
],
"url": "https://github.com/ironmonk88/monks-common-display",
"download": "https://github.com/ironmonk88/monks-common-display/archive/10.2.zip",
"download": "https://github.com/ironmonk88/monks-common-display/archive/11.01.zip",
"manifest": "https://github.com/ironmonk88/monks-common-display/releases/latest/download/module.json",
"bugs": "https://github.com/ironmonk88/monks-common-display/issues",
"allowBugReporter": true,
"id": "monks-common-display",
"compatibility": {
"minimum": "10",
"verified": "10"
"minimum": "11",
"verified": "11"
},
"name": "monks-common-display",
"minimumCoreVersion": "10",
"compatibleCoreVersion": "10"
"minimumCoreVersion": "11",
"compatibleCoreVersion": "11"
}
24 changes: 14 additions & 10 deletions monks-common-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ export let combatposition = () => {
return game.settings.get("monks-common-display", "combat-position");
};

export let patchFunc = (prop, func, type = "WRAPPER") => {
if (game.modules.get("lib-wrapper")?.active) {
libWrapper.register("monks-common-display", prop, func, type);
} else {
const oldFunc = eval(prop);
eval(`${prop} = function (event) {
return func.call(this, oldFunc.bind(this), ...arguments);
}`);
}
}

function registerLayer() {
/*
CONFIG.Canvas.layers.monkscommondisplay = { group: "interface", layerClass: MonksCommonDisplayLayer };
Expand Down Expand Up @@ -53,7 +64,7 @@ export class MonksCommonDisplay {
MonksCommonDisplay.registerHotKeys();

if (game.modules.get("lib-wrapper")?.active) {
libWrapper.ignore_conflicts("monks-common-display", "monks-active-tiles", "ActorDirectory.prototype._onClickDocumentName");
libWrapper.ignore_conflicts("monks-common-display", "monks-active-tiles", "ActorDirectory.prototype._onClickEntryName");
}

//this is so the screen starts up with the correct information, it'll be altered once the players are actually loaded
Expand Down Expand Up @@ -155,7 +166,7 @@ export class MonksCommonDisplay {
}
}

let clickDocumentName = async function (wrapped, ...args) {
let clickEntryName = async function (wrapped, ...args) {
let event = args[0];
if (!!MonksCommonDisplay.selectToken) {
event.preventDefault();
Expand All @@ -176,14 +187,7 @@ export class MonksCommonDisplay {
wrapped(...args);
}

if (game.modules.get("lib-wrapper")?.active) {
libWrapper.register("monks-common-display", "ActorDirectory.prototype._onClickDocumentName", clickDocumentName, "MIXED");
} else {
const oldClickActorName = ActorDirectory.prototype._onClickDocumentName;
ActorDirectory.prototype._onClickDocumentName = function (event) {
return clickDocumentName.call(this, oldClickActorName.bind(this), ...arguments);
}
}
patchFunc("ActorDirectory.prototype._onClickEntryName", clickEntryName, "MIXED");

/*
let showEntry = async function (...args) {
Expand Down

0 comments on commit 658e5bb

Please sign in to comment.