update
This commit is contained in:
@@ -601,6 +601,7 @@ class _BattleScreenState extends State<BattleScreen> {
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.high,
|
||||
),
|
||||
),
|
||||
if (!isSkip) const SizedBox(width: 12),
|
||||
@@ -755,6 +756,7 @@ class _BattleScreenState extends State<BattleScreen> {
|
||||
height: 32,
|
||||
color: ThemeConfig.textColorWhite, // Tint icon white
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.high,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -39,20 +39,29 @@ class InventoryScreen extends StatelessWidget {
|
||||
_buildStatItem(
|
||||
"HP",
|
||||
"${player.hp}/${player.totalMaxHp}",
|
||||
color: ThemeConfig.statHpColor,
|
||||
),
|
||||
_buildStatItem("ATK", "${player.totalAtk}"),
|
||||
_buildStatItem("DEF", "${player.totalDefense}"),
|
||||
_buildStatItem("Shield", "${player.armor}"),
|
||||
_buildStatItem(
|
||||
"Gold",
|
||||
"${player.gold} G",
|
||||
color: ThemeConfig.statGoldColor,
|
||||
"ATK",
|
||||
"${player.totalAtk}",
|
||||
color: ThemeConfig.statAtkColor,
|
||||
),
|
||||
_buildStatItem(
|
||||
"DEF",
|
||||
"${player.totalDefense}",
|
||||
color: ThemeConfig.statDefColor,
|
||||
),
|
||||
_buildStatItem("Shield", "${player.armor}"),
|
||||
_buildStatItem(
|
||||
"Luck",
|
||||
"${player.totalLuck}",
|
||||
color: ThemeConfig.statLuckColor,
|
||||
),
|
||||
_buildStatItem(
|
||||
"Gold",
|
||||
"${player.gold} G",
|
||||
color: ThemeConfig.statGoldColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -94,12 +103,14 @@ class InventoryScreen extends StatelessWidget {
|
||||
color: item != null
|
||||
? ThemeConfig.equipmentCardBg
|
||||
: ThemeConfig.emptySlotBg,
|
||||
shape: item != null &&
|
||||
shape:
|
||||
item != null &&
|
||||
item.rarity != ItemRarity.magic
|
||||
? RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color:
|
||||
ItemUtils.getRarityColor(item.rarity),
|
||||
color: ItemUtils.getRarityColor(
|
||||
item.rarity,
|
||||
),
|
||||
width: 2.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(4.0),
|
||||
@@ -125,12 +136,15 @@ class InventoryScreen extends StatelessWidget {
|
||||
left: 4,
|
||||
top: 4,
|
||||
child: Opacity(
|
||||
opacity: item != null ? 0.5 : 0.2, // Increase opacity slightly for images
|
||||
opacity: item != null
|
||||
? 0.5
|
||||
: 0.2, // Increase opacity slightly for images
|
||||
child: Image.asset(
|
||||
ItemUtils.getIconPath(slot),
|
||||
width: 40,
|
||||
height: 40,
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.high,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -151,8 +165,10 @@ class InventoryScreen extends StatelessWidget {
|
||||
item?.name ?? "Empty",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: ThemeConfig.fontSizeSmall,
|
||||
fontWeight: ThemeConfig.fontWeightBold,
|
||||
fontSize:
|
||||
ThemeConfig.fontSizeSmall,
|
||||
fontWeight:
|
||||
ThemeConfig.fontWeightBold,
|
||||
color: item != null
|
||||
? ItemUtils.getRarityColor(
|
||||
item.rarity,
|
||||
@@ -237,12 +253,14 @@ class InventoryScreen extends StatelessWidget {
|
||||
left: 4,
|
||||
top: 4,
|
||||
child: Opacity(
|
||||
opacity: 0.5, // Adjusted opacity for image visibility
|
||||
opacity:
|
||||
0.5, // Adjusted opacity for image visibility
|
||||
child: Image.asset(
|
||||
ItemUtils.getIconPath(item.slot),
|
||||
width: 40,
|
||||
height: 40,
|
||||
fit: BoxFit.contain,
|
||||
filterQuality: FilterQuality.high,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -260,7 +278,8 @@ class InventoryScreen extends StatelessWidget {
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: ThemeConfig.fontSizeSmall,
|
||||
fontWeight: ThemeConfig.fontWeightBold,
|
||||
fontWeight:
|
||||
ThemeConfig.fontWeightBold,
|
||||
color: ItemUtils.getRarityColor(
|
||||
item.rarity,
|
||||
),
|
||||
@@ -289,7 +308,10 @@ class InventoryScreen extends StatelessWidget {
|
||||
color: ThemeConfig.emptySlotBg,
|
||||
),
|
||||
child: const Center(
|
||||
child: Icon(Icons.add_box, color: ThemeConfig.textColorGrey),
|
||||
child: Icon(
|
||||
Icons.add_box,
|
||||
color: ThemeConfig.textColorGrey,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -306,7 +328,13 @@ class InventoryScreen extends StatelessWidget {
|
||||
Widget _buildStatItem(String label, String value, {Color? color}) {
|
||||
return Column(
|
||||
children: [
|
||||
Text(label, style: const TextStyle(color: ThemeConfig.textColorGrey, fontSize: 12)),
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(
|
||||
color: ThemeConfig.textColorGrey,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
value,
|
||||
style: TextStyle(
|
||||
@@ -358,7 +386,10 @@ class InventoryScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.attach_money, color: ThemeConfig.statGoldColor),
|
||||
const Icon(
|
||||
Icons.attach_money,
|
||||
color: ThemeConfig.statGoldColor,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text("Sell (${item.price} G)"),
|
||||
],
|
||||
@@ -402,7 +433,9 @@ class InventoryScreen extends StatelessWidget {
|
||||
child: const Text("Cancel"),
|
||||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(backgroundColor: ThemeConfig.statGoldColor),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: ThemeConfig.statGoldColor,
|
||||
),
|
||||
onPressed: () {
|
||||
provider.sellItem(item);
|
||||
Navigator.pop(ctx);
|
||||
@@ -430,7 +463,9 @@ class InventoryScreen extends StatelessWidget {
|
||||
child: const Text("Cancel"),
|
||||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(backgroundColor: ThemeConfig.btnActionActive),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: ThemeConfig.btnActionActive,
|
||||
),
|
||||
onPressed: () {
|
||||
provider.discardItem(item);
|
||||
Navigator.pop(ctx);
|
||||
@@ -481,7 +516,10 @@ class InventoryScreen extends StatelessWidget {
|
||||
if (oldItem != null)
|
||||
Text(
|
||||
"Replaces ${oldItem.name}",
|
||||
style: const TextStyle(fontSize: 12, color: ThemeConfig.textColorGrey),
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: ThemeConfig.textColorGrey,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_buildStatChangeRow("Max HP", currentMaxHp, newMaxHp),
|
||||
@@ -575,7 +613,9 @@ class InventoryScreen extends StatelessWidget {
|
||||
int diff = newVal - oldVal;
|
||||
Color color = diff > 0
|
||||
? ThemeConfig.statDiffPositive
|
||||
: (diff < 0 ? ThemeConfig.statDiffNegative : ThemeConfig.statDiffNeutral);
|
||||
: (diff < 0
|
||||
? ThemeConfig.statDiffNegative
|
||||
: ThemeConfig.statDiffNeutral);
|
||||
String diffText = diff > 0 ? "(+$diff)" : (diff < 0 ? "($diff)" : "");
|
||||
|
||||
return Padding(
|
||||
@@ -586,8 +626,15 @@ class InventoryScreen extends StatelessWidget {
|
||||
Text(label),
|
||||
Row(
|
||||
children: [
|
||||
Text("$oldVal", style: const TextStyle(color: ThemeConfig.textColorGrey)),
|
||||
const Icon(Icons.arrow_right, size: 16, color: ThemeConfig.textColorGrey),
|
||||
Text(
|
||||
"$oldVal",
|
||||
style: const TextStyle(color: ThemeConfig.textColorGrey),
|
||||
),
|
||||
const Icon(
|
||||
Icons.arrow_right,
|
||||
size: 16,
|
||||
color: ThemeConfig.textColorGrey,
|
||||
),
|
||||
Text(
|
||||
"$newVal",
|
||||
style: const TextStyle(fontWeight: ThemeConfig.fontWeightBold),
|
||||
@@ -627,7 +674,10 @@ class InventoryScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(top: 2.0, bottom: 2.0),
|
||||
child: Text(
|
||||
stats.join(", "),
|
||||
style: const TextStyle(fontSize: ThemeConfig.fontSizeSmall, color: ThemeConfig.statAtkColor),
|
||||
style: const TextStyle(
|
||||
fontSize: ThemeConfig.fontSizeSmall,
|
||||
color: ThemeConfig.statAtkColor,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
@@ -636,7 +686,10 @@ class InventoryScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(bottom: 2.0),
|
||||
child: Text(
|
||||
effectTexts.join("\n"),
|
||||
style: const TextStyle(fontSize: ThemeConfig.fontSizeTiny, color: ThemeConfig.rarityLegendary),
|
||||
style: const TextStyle(
|
||||
fontSize: ThemeConfig.fontSizeTiny,
|
||||
color: ThemeConfig.rarityLegendary,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user