OSDN Git Service
(root)
/
kancollesniffer
/
KancolleSniffer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
36a2cde
)
装備のないスロットがあるのをわかるようにする
author
Kazuhiro Fujieda
<fujieda@users.osdn.me>
Mon, 14 Jan 2019 08:40:08 +0000
(17:40 +0900)
committer
Kazuhiro Fujieda
<fujieda@users.osdn.me>
Mon, 14 Jan 2019 08:40:08 +0000
(17:40 +0900)
KancolleSniffer/View/ShipLabel.cs
patch
|
blob
|
history
diff --git
a/KancolleSniffer/View/ShipLabel.cs
b/KancolleSniffer/View/ShipLabel.cs
index
acb63f0
..
c834d6a
100644
(file)
--- a/
KancolleSniffer/View/ShipLabel.cs
+++ b/
KancolleSniffer/View/ShipLabel.cs
@@
-47,8
+47,9
@@
namespace KancolleSniffer.View
private enum SlotStatus
\r
{
\r
Equipped = 0,
\r
private enum SlotStatus
\r
{
\r
Equipped = 0,
\r
- NormalEmpty = 1,
\r
- ExtraEmpty = 2
\r
+ SemiEquipped = 1,
\r
+ NormalEmpty = 2,
\r
+ ExtraEmpty = 4
\r
}
\r
\r
public ShipLabel()
\r
}
\r
\r
public ShipLabel()
\r
@@
-66,8
+67,15
@@
namespace KancolleSniffer.View
var empty = SlotStatus.Equipped;
\r
if (!status.Empty)
\r
{
\r
var empty = SlotStatus.Equipped;
\r
if (!status.Empty)
\r
{
\r
- if (status.Slot.All(item => item.Empty))
\r
+ var slots = status.Slot.Take(status.Spec.SlotNum).ToArray();
\r
+ if (slots.All(item => item.Empty))
\r
+ {
\r
empty |= SlotStatus.NormalEmpty;
\r
empty |= SlotStatus.NormalEmpty;
\r
+ }
\r
+ else if (slots.Any(item => item.Empty))
\r
+ {
\r
+ empty |= SlotStatus.SemiEquipped;
\r
+ }
\r
if (status.SlotEx.Empty)
\r
empty |= SlotStatus.ExtraEmpty;
\r
}
\r
if (status.SlotEx.Empty)
\r
empty |= SlotStatus.ExtraEmpty;
\r
}
\r
@@
-261,14
+269,21
@@
namespace KancolleSniffer.View
{
\r
e.Graphics.DrawRectangle(
\r
Pens.Black,
\r
{
\r
e.Graphics.DrawRectangle(
\r
Pens.Black,
\r
- ClientSize.Width - 3 * ScaleFactor.Width, 1 * ScaleFactor.Height,
\r
- 2 * ScaleFactor.Width, 4 * ScaleFactor.Height);
\r
+ ClientSize.Width - 3 * ScaleFactor.Width, 0,
\r
+ 2 * ScaleFactor.Width, 5 * ScaleFactor.Height);
\r
+ }
\r
+ else if ((_slotStatus & SlotStatus.SemiEquipped) != 0)
\r
+ {
\r
+ e.Graphics.DrawLine(
\r
+ Pens.Black,
\r
+ ClientSize.Width - 1 * ScaleFactor.Width, 0,
\r
+ ClientSize.Width - 1 * ScaleFactor.Width, 5 * ScaleFactor.Height);
\r
}
\r
if ((_slotStatus & SlotStatus.ExtraEmpty) != 0)
\r
{
\r
e.Graphics.DrawRectangle(
\r
Pens.Black,
\r
}
\r
if ((_slotStatus & SlotStatus.ExtraEmpty) != 0)
\r
{
\r
e.Graphics.DrawRectangle(
\r
Pens.Black,
\r
- ClientSize.Width - 3 * ScaleFactor.Width,
7
* ScaleFactor.Height,
\r
+ ClientSize.Width - 3 * ScaleFactor.Width,
8
* ScaleFactor.Height,
\r
2 * ScaleFactor.Width, 3 * ScaleFactor.Height);
\r
}
\r
}
\r
2 * ScaleFactor.Width, 3 * ScaleFactor.Height);
\r
}
\r
}
\r