Files
DndGamePlayer/app/renderer/shared/materials/MaterialOverlay.module.css
T
Ivan Fontosh 0cab7ce7ca feat(npcs): free rotate overlays and drop session zoom tools
Drag the top-edge handle to rotate the whole frame with the avatar; remove unused zoom controls from the session NPC window.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 14:22:46 +08:00

145 lines
2.1 KiB
CSS

.root {
position: absolute;
inset: 0;
z-index: 40;
}
.interactive {
pointer-events: auto;
}
.passive {
pointer-events: none;
}
.cursorZoomIn {
cursor: zoom-in;
}
.cursorZoomOut {
cursor: zoom-out;
}
.dim {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.62);
pointer-events: none;
}
.frame {
position: absolute;
z-index: 1;
pointer-events: none;
overflow: visible;
}
.frameEditable {
pointer-events: auto;
cursor: move;
}
.image {
position: absolute;
left: 50%;
top: 50%;
display: block;
object-fit: fill;
border-radius: 6px;
box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
user-select: none;
pointer-events: none;
transform-origin: center center;
}
.handle {
position: absolute;
width: 12px;
height: 12px;
border-radius: 50%;
border: 2px solid #fff;
background: var(--color-accent, #c9a227);
padding: 0;
z-index: 2;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
pointer-events: auto;
}
.handle_nw {
left: -6px;
top: -6px;
cursor: nwse-resize;
}
.handle_ne {
right: -6px;
top: -6px;
cursor: nesw-resize;
}
.handle_sw {
left: -6px;
bottom: -6px;
cursor: nesw-resize;
}
.handle_se {
right: -6px;
bottom: -6px;
cursor: nwse-resize;
}
.close {
position: absolute;
top: 14px;
right: 14px;
z-index: 3;
width: 36px;
height: 36px;
border: none;
border-radius: 10px;
background: rgba(12, 12, 16, 0.72);
color: #fff;
font-size: 24px;
line-height: 1;
cursor: pointer;
display: grid;
place-items: center;
}
.close:hover {
background: rgba(24, 24, 32, 0.9);
}
.frameRotate {
position: absolute;
left: 50%;
top: 0;
z-index: 3;
width: 28px;
height: 28px;
border: none;
border-radius: 8px;
background: rgba(12, 12, 16, 0.78);
color: #fff;
padding: 0;
cursor: grab;
display: grid;
place-items: center;
pointer-events: auto;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
transform: translate(-50%, -50%);
}
.frameRotate:hover {
background: rgba(24, 24, 32, 0.95);
}
.frameRotate:active {
cursor: grabbing;
}
.frameRotateSvg {
display: block;
}