feat(ui): 레트로 테마 상수 및 공통 위젯 추가
- RetroTheme: 패딩, 폰트, 애니메이션 상수 정의 - PanelHeader: 재사용 가능한 패널 헤더 위젯 - RarityColorMapper: 레어리티별 색상 매핑
This commit is contained in:
19
lib/src/core/animation/canvas/rarity_color_mapper.dart
Normal file
19
lib/src/core/animation/canvas/rarity_color_mapper.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:asciineverdie/src/core/animation/canvas/ascii_cell.dart';
|
||||
import 'package:asciineverdie/src/core/model/item_stats.dart';
|
||||
|
||||
/// 아이템 희귀도와 애니메이션 색상 간의 매핑
|
||||
///
|
||||
/// Clean Architecture 준수를 위해 model(ItemRarity) → animation(AsciiCellColor)
|
||||
/// 의존성을 animation 레이어에서 처리
|
||||
extension ItemRarityColorMapper on ItemRarity {
|
||||
/// 공격 이펙트 셀 색상 (Phase 9: 무기 등급별 이펙트)
|
||||
///
|
||||
/// common은 기본 positive(시안), 나머지는 등급별 고유 색상
|
||||
AsciiCellColor get effectCellColor => switch (this) {
|
||||
ItemRarity.common => AsciiCellColor.positive,
|
||||
ItemRarity.uncommon => AsciiCellColor.rarityUncommon,
|
||||
ItemRarity.rare => AsciiCellColor.rarityRare,
|
||||
ItemRarity.epic => AsciiCellColor.rarityEpic,
|
||||
ItemRarity.legendary => AsciiCellColor.rarityLegendary,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user