Skip to content

Commit

Permalink
複数選択時の誤フォーカス抑止。
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanasu committed Oct 14, 2023
1 parent 27f6407 commit f25e547
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ export class GameObjectInventoryComponent implements OnInit, OnDestroy {
focusGameObject(gameObject: GameCharacter, e: Event) {
if (!(e.target instanceof HTMLElement)) return;
if (new Set(['input', 'button']).has(e.target.tagName.toLowerCase())) return;
if (e instanceof MouseEvent && e.ctrlKey) return;
if (gameObject.location.name !== 'table' || (!gameObject.isVisible && !this.isGMMode)) return;
EventSystem.trigger('FOCUS_TABLETOP_OBJECT', { x: gameObject.location.x + gameObject.size * 50 / 2, y: gameObject.location.y + gameObject.size * 50 / 2, z: gameObject.posZ + (gameObject.altitude > 0 ? gameObject.altitude * 50 : 0) });
}
Expand Down

0 comments on commit f25e547

Please sign in to comment.