refactor(ui): 화면 UI 정리

- front_screen: 프론트 화면 레이아웃 개선
- settings_screen: 설정 화면 간소화
- new_character_screen: 캐릭터 생성 화면 정리
This commit is contained in:
JiWoong Sul
2026-01-19 19:41:01 +09:00
parent 71740abe8f
commit d5c46ad04a
3 changed files with 41 additions and 47 deletions

View File

@@ -321,8 +321,8 @@ class _ActionButtons extends StatelessWidget {
onPressed: onSettings,
isPrimary: false,
),
// IAP 구매 (광고 제거) - 스토어 사용 가능하고 미구매 상태일 때만 표시
if (removeAdsPrice != null && !isAdRemovalPurchased) ...[
// IAP 구매 (광고 제거) - 스토어 사용 가능할 때 표시 (구매 완료 시 비활성화)
if (removeAdsPrice != null) ...[
const SizedBox(height: 20),
const Divider(color: RetroColors.panelBorderInner, height: 1),
const SizedBox(height: 12),
@@ -330,13 +330,12 @@ class _ActionButtons extends StatelessWidget {
price: removeAdsPrice!,
onPurchase: onPurchaseRemoveAds,
onRestore: onRestorePurchase,
enabled: !isAdRemovalPurchased,
),
],
// 이미 구매된 경우 표시
// 이미 구매된 경우 배지 표시
if (isAdRemovalPurchased) ...[
const SizedBox(height: 20),
const Divider(color: RetroColors.panelBorderInner, height: 1),
const SizedBox(height: 12),
const SizedBox(height: 8),
_PurchasedBadge(),
],
],
@@ -412,11 +411,13 @@ class _IapPurchaseButton extends StatelessWidget {
required this.price,
this.onPurchase,
this.onRestore,
this.enabled = true,
});
final String price;
final VoidCallback? onPurchase;
final VoidCallback? onRestore;
final bool enabled;
void _showPurchaseDialog(BuildContext context) {
showDialog<void>(
@@ -433,23 +434,33 @@ class _IapPurchaseButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
// 비활성화 상태의 색상
final buttonColor = enabled ? RetroColors.gold : RetroColors.textDisabled;
final bgGradient = enabled
? const LinearGradient(
colors: [Color(0xFF4A3B2A), Color(0xFF3D2E1F)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
)
: const LinearGradient(
colors: [Color(0xFF3A3A3A), Color(0xFF2A2A2A)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
);
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// 구매 버튼 (클릭 시 팝업)
Container(
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [Color(0xFF4A3B2A), Color(0xFF3D2E1F)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
border: Border.all(color: RetroColors.gold, width: 2),
gradient: bgGradient,
border: Border.all(color: buttonColor, width: 2),
),
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: () => _showPurchaseDialog(context),
onTap: enabled ? () => _showPurchaseDialog(context) : null,
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16,
@@ -457,7 +468,7 @@ class _IapPurchaseButton extends StatelessWidget {
),
child: Row(
children: [
const Icon(Icons.block, color: RetroColors.gold, size: 24),
Icon(Icons.block, color: buttonColor, size: 24),
const SizedBox(width: 12),
Expanded(
child: Column(
@@ -465,10 +476,10 @@ class _IapPurchaseButton extends StatelessWidget {
children: [
Text(
game_l10n.iapRemoveAds,
style: const TextStyle(
style: TextStyle(
fontFamily: 'PressStart2P',
fontSize: 12,
color: RetroColors.gold,
color: buttonColor,
),
),
const SizedBox(height: 4),
@@ -484,11 +495,7 @@ class _IapPurchaseButton extends StatelessWidget {
),
),
// 화살표 아이콘 (상세 보기)
const Icon(
Icons.arrow_forward_ios,
color: RetroColors.gold,
size: 16,
),
Icon(Icons.arrow_forward_ios, color: buttonColor, size: 16),
],
),
),
@@ -499,7 +506,7 @@ class _IapPurchaseButton extends StatelessWidget {
// 복원 버튼
Center(
child: TextButton(
onPressed: onRestore,
onPressed: enabled ? onRestore : null,
child: Text(
game_l10n.iapRestorePurchase,
style: const TextStyle(
@@ -569,7 +576,10 @@ class _IapPurchaseDialog extends StatelessWidget {
const SizedBox(height: 8),
_BenefitItem(icon: Icons.speed, text: game_l10n.iapBenefit5),
const SizedBox(height: 8),
_BenefitItem(icon: Icons.inventory_2, text: game_l10n.iapBenefit6),
_BenefitItem(
icon: Icons.inventory_2,
text: game_l10n.iapBenefit6,
),
const SizedBox(height: 20),
// 가격 + 구매 버튼
Container(