using System.Collections.Generic;\r
using System.Drawing;\r
using System.Windows.Forms;\r
+using KancolleSniffer.Forms;\r
\r
namespace KancolleSniffer.View.ShipListPanel\r
{\r
Fleet = new ShipLabel.Fleet(new Point(1, 2)),\r
Name = new ShipLabel.Name(new Point(10, 2), ShipNameWidth.ShipList),\r
Hp = new ShipLabel.Hp(new Point(126, 0), ShipListPanel.LineHeight),\r
- Cond = new ShipLabel.Cond(new Point(128, 0), ShipListPanel.LineHeight),\r
- Level = new ShipLabel.Level(new Point(154, 2), height),\r
- Exp = new ShipLabel.Exp(new Point(175, 2), height),\r
+ Cond = new ShipLabel.Cond(new Point(127, 0), ShipListPanel.LineHeight),\r
+ Level = new ShipLabel.Level(new Point(152, 2), height),\r
+ Exp = new ShipLabel.Exp(new Point(174, 2), height),\r
BackPanel = new Panel\r
{\r
Location = new Point(0, y),\r
Size = new Size(ListForm.PanelWidth, ShipListPanel.LineHeight),\r
+ Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top\r
}\r
};\r
+ SetAnchorRight(labels.Hp, labels.Cond, labels.Level, labels.Exp);\r
_labelList.Add(labels);\r
labels.Arrange(_shipListPanel, CustomColors.ColumnColors.BrightFirst(i));\r
+ labels.Scale();\r
_shipListPanel.SetHpPercent(labels.Hp);\r
}\r
\r
+ private void SetAnchorRight(params Control[] controls)\r
+ {\r
+ foreach (var control in controls)\r
+ control.Anchor = AnchorStyles.Top | AnchorStyles.Right;\r
+ }\r
+\r
+ public void Resize(int i, int width)\r
+ {\r
+ var labels = _labelList[i];\r
+ labels.BackPanel.Width = width;\r
+ labels.Hp.AdjustLocation();\r
+ labels.Name.AdjustWidth(Scaler.DownWidth(width) - ListForm.PanelWidth);\r
+ }\r
+\r
public void SetShipStatus(int i)\r
{\r
var s = _shipListPanel.GetShip(i);\r
SetShipType(i);\r
return;\r
}\r
- labels.Set(s);\r
+ labels.Set(s, _shipListPanel.ToolTip);\r
labels.BackPanel.Visible = true;\r
}\r
\r