Skip to content

Commit 8586b9f

Browse files
committed
anim and menu
1 parent 41d1185 commit 8586b9f

2 files changed

Lines changed: 26 additions & 12 deletions

File tree

scripts/investigation-board.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,6 +2512,20 @@ async function createPhotoNoteFromActor(actor, isUnknown = false) {
25122512
return;
25132513
}
25142514

2515+
// Get displayName using the helper function
2516+
let displayName = getActorDisplayName(actor);
2517+
2518+
// Override if isUnknown is true
2519+
if (isUnknown) {
2520+
displayName = "Unknown";
2521+
}
2522+
2523+
const imagePath = actor.img || "modules/investigation-board/assets/placeholder.webp";
2524+
const extraFlags = {
2525+
image: imagePath,
2526+
...(isUnknown ? { unknown: true } : {})
2527+
};
2528+
25152529
const photoW = game.settings.get(MODULE_ID, "photoNoteWidth") || 225;
25162530
const height = Math.round(photoW / (225 / 290));
25172531

@@ -2540,7 +2554,7 @@ async function createPhotoNoteFromActor(actor, isUnknown = false) {
25402554
core: { sheetClass: "investigation-board.CustomDrawingSheet" }
25412555
},
25422556
ownership: { default: 3 }
2543-
}]);
2557+
}], { skipAutoOpen: true });
25442558

25452559
// Handle interactivity in Investigation Board mode
25462560
if (investigationBoardModeActive && created?.[0]) {
@@ -2603,7 +2617,7 @@ async function createPhotoNoteFromScene(targetScene) {
26032617
core: { sheetClass: "investigation-board.CustomDrawingSheet" }
26042618
},
26052619
ownership: { default: 3 }
2606-
}]);
2620+
}], { skipAutoOpen: true });
26072621

26082622
if (investigationBoardModeActive && created?.[0]) {
26092623
setTimeout(() => {
@@ -2682,7 +2696,7 @@ async function createHandoutNoteFromPage(page) {
26822696
core: { sheetClass: "investigation-board.CustomDrawingSheet" }
26832697
},
26842698
ownership: { default: 3 }
2685-
}]);
2699+
}], { skipAutoOpen: true });
26862700

26872701
if (investigationBoardModeActive && created?.[0]) {
26882702
setTimeout(() => {
@@ -3075,7 +3089,7 @@ Hooks.on("createDrawing", (drawing, options, userId) => {
30753089
if (!noteData) return;
30763090

30773091
// If this is the user who created the note, open the edit dialog
3078-
if (userId === game.user.id) {
3092+
if (userId === game.user.id && !options.skipAutoOpen) {
30793093
setTimeout(() => {
30803094
drawing.sheet.render(true);
30813095
}, 150);
@@ -3356,7 +3370,7 @@ async function createMediaNoteFromSound(sound) {
33563370
core: { sheetClass: "investigation-board.CustomDrawingSheet" }
33573371
},
33583372
ownership: { default: 3 }
3359-
}]);
3373+
}], { skipAutoOpen: true });
33603374

33613375
if (investigationBoardModeActive && created?.[0]) {
33623376
setTimeout(() => {

styles/style.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -795,20 +795,20 @@ body.investigation-board-mode .drawing:not([data-investigation-note="true"]) {
795795

796796
.reel {
797797
position: absolute;
798-
width: 50px;
799-
height: 50px;
800-
border: 4px dashed rgba(255, 255, 255, 0.4);
798+
width: 42px;
799+
height: 42px;
800+
border: 7px dotted rgba(255, 255, 255, 0.4);
801801
border-radius: 50%;
802-
top: 41%;
803-
animation: spin 3s linear infinite;
802+
top: 46%;
803+
animation: spin 3s linear reverse infinite;
804804
}
805805

806806
.reel.left {
807-
left: 31%;
807+
left: 24%;
808808
}
809809

810810
.reel.right {
811-
right: 31%;
811+
right: 24%;
812812
}
813813

814814
@keyframes spin {

0 commit comments

Comments
 (0)