feat(materials): add campaign materials overlay for sessions

Let GMs manage and show images over the scene from the editor and control panel, with zoom tools, help docs, and full ru/en i18n.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-17 11:05:38 +08:00
parent 195d4be086
commit 61875be857
39 changed files with 2521 additions and 22 deletions
+11 -2
View File
@@ -14,7 +14,7 @@ type ButtonProps = {
/** Компактная кнопка под одну иконку. */
iconOnly?: boolean;
/** Позиция тултипа относительно кнопки. */
tooltipPlacement?: 'top' | 'bottom-left';
tooltipPlacement?: 'top' | 'bottom' | 'bottom-left';
};
export function Button({
@@ -40,6 +40,10 @@ export function Button({
setTipPos({ x: r.right, y: r.bottom });
return;
}
if (tooltipPlacement === 'bottom') {
setTipPos({ x: r.left + r.width / 2, y: r.bottom });
return;
}
setTipPos({ x: r.left + r.width / 2, y: r.top });
}, [disabled, title, tooltipPlacement]);
@@ -55,7 +59,12 @@ export function Button({
.filter(Boolean)
.join(' ');
const tipClass = tooltipPlacement === 'bottom-left' ? styles.tooltipBottomLeft : styles.tooltipTop;
const tipClass =
tooltipPlacement === 'bottom-left'
? styles.tooltipBottomLeft
: tooltipPlacement === 'bottom'
? styles.tooltipBottom
: styles.tooltipTop;
const tip =
title && tipPos && typeof document !== 'undefined'