コミットメタ情報

リビジョンb1e776cc595a805a0f7e7a88b2b1be61632b63d4 (tree)
日時2018-01-27 20:47:41
作者Kazuhiro Fujieda <fujieda@user...>
コミッターKazuhiro Fujieda

ログメッセージ

戦況のレイアウトをさらに見直す

変更サマリ

差分

--- a/KancolleSniffer/BattleResultPanel.cs
+++ b/KancolleSniffer/BattleResultPanel.cs
@@ -165,11 +165,9 @@ namespace KancolleSniffer
165165 SuspendLayout();
166166 var friend = result.Friend;
167167 var enemy = result.Enemy;
168- var fleet = new[] {"第一", "第二", "第三", "第四"};
169- _friendLabels[0][1].Text = fleet[friend.Main[0].Fleet];
170168 for (var i = 0; i < friend.Main.Length; i++)
171169 {
172- var labels = _friendLabels[i + 1];
170+ var labels = _friendLabels[i];
173171 var ship = friend.Main[i];
174172 labels[0].SetHp(ship);
175173 labels[1].SetName(ship, ShipNameWidth.BattleResult);
@@ -177,27 +175,26 @@ namespace KancolleSniffer
177175 }
178176 if (friend.Guard.Length > 0)
179177 {
180- _friendLabels[friend.Main.Length + 1][1].Text = fleet[friend.Guard[0].Fleet];
181- _friendLabels[friend.Main.Length + 1][0].SetHp(null);
178+ _friendLabels[friend.Main.Length][1].Text = "護衛";
179+ _friendLabels[friend.Main.Length][0].SetHp(null);
182180 for (var i = 0; i < friend.Guard.Length; i++)
183181 {
184- var labels = _friendLabels[friend.Main.Length + 2 + i];
182+ var labels = _friendLabels[friend.Main.Length + 1 + i];
185183 var ship = friend.Guard[i];
186184 labels[0].SetHp(ship);
187185 labels[1].SetName(ship, ShipNameWidth.BattleResult);
188186 _toolTip.SetToolTip(labels[1], GetEqipString(ship));
189187 }
190188 }
191- var friendLines = 1 + friend.Main.Length + (friend.Guard.Length > 0 ? friend.Guard.Length + 1 : 0);
189+ var friendLines = friend.Main.Length + (friend.Guard.Length > 0 ? friend.Guard.Length + 1 : 0);
192190 for (var i = friendLines; i < _friendLabels.Count; i++)
193191 {
194192 _friendLabels[i][0].SetHp(null);
195193 _friendLabels[i][1].SetName("");
196194 }
197- _enemyLabels[0][1].Text = "本隊";
198195 for (var i = 0; i < enemy.Main.Length; i++)
199196 {
200- var labels = _enemyLabels[i + 1];
197+ var labels = _enemyLabels[i];
201198 var ship = enemy.Main[i];
202199 labels[0].SetHp(ship);
203200 labels[1].SetName(ShortenName(ship.Name));
@@ -205,11 +202,11 @@ namespace KancolleSniffer
205202 }
206203 if (enemy.Guard.Length > 0)
207204 {
208- _enemyLabels[enemy.Main.Length + 1][0].SetHp(null);
209- _enemyLabels[enemy.Main.Length + 1][1].Text = "護衛";
205+ _enemyLabels[enemy.Main.Length][1].Text = "護衛";
206+ _enemyLabels[enemy.Main.Length][0].SetHp(null);
210207 for (var i = 0; i < enemy.Guard.Length; i++)
211208 {
212- var labels = _enemyLabels[enemy.Main.Length + 2 + i];
209+ var labels = _enemyLabels[enemy.Main.Length + 1 + i];
213210 var ship = enemy.Guard[i];
214211 labels[0].SetHp(ship);
215212 labels[1].SetName(ShortenName(ship.Name));
@@ -217,7 +214,7 @@ namespace KancolleSniffer
217214 string.Join("\r\n", ship.Slot.Select(item => item.Spec.Name)));
218215 }
219216 }
220- var enemyLines = 1 + enemy.Main.Length + (enemy.Guard.Length > 0 ? enemy.Guard.Length + 1 : 0);
217+ var enemyLines = enemy.Main.Length + (enemy.Guard.Length > 0 ? enemy.Guard.Length + 1 : 0);
221218 for (var i = enemyLines; i < _enemyLabels.Count; i++)
222219 {
223220 _enemyLabels[i][0].SetHp(null);
@@ -240,7 +237,9 @@ namespace KancolleSniffer
240237 _enemyLabels[0][1].Location.X + _enemyLabels.Max(labels => labels[1].Size.Width) - 1); // 敵の名前の右端
241238 for (var i = 0; i < lines; i++)
242239 _panelList[i].Width = panelWidth;
243- _infomationPanel.Location = new Point(AutoScrollPosition.X, AutoScrollPosition.Y);
240+ _infomationPanel.Location = new Point(
241+ (int)Round(0 * ShipLabel.ScaleFactor.Width) + AutoScrollPosition.X,
242+ (int)Round(20 * ShipLabel.ScaleFactor.Height) +AutoScrollPosition.Y);
244243 _infomationPanel.Visible = true;
245244 }
246245
@@ -275,20 +274,20 @@ namespace KancolleSniffer
275274 {
276275 _phaseLabel = new Label
277276 {
278- Location = new Point(72, 21),
277+ Location = new Point(4, 4),
279278 Size = new Size(31, 14)
280279 };
281280 _phaseLabel.Click += PhaseLabelClick;
282281 Controls.Add(_phaseLabel);
283282 _rankLabel = new Label
284283 {
285- Location = new Point(111, 22),
284+ Location = new Point(37, 4),
286285 Size = new Size(42, 12)
287286 };
288287 Controls.Add(_rankLabel);
289- for (var i = 0; i < 14; i++)
288+ for (var i = 0; i < 13; i++)
290289 {
291- var y = LineHeight * i + 21;
290+ var y = LineHeight * i + 38;
292291 var panel = new Panel
293292 {
294293 Location = new Point(0, y),
@@ -329,25 +328,23 @@ namespace KancolleSniffer
329328
330329 public InformationPanel()
331330 {
332- const int top = 4;
333- const int left = 1;
334331 Visible = false;
335- Size = new Size(left + 206, top + 15);
332+ Size = new Size(206, 16);
336333 Controls.AddRange(_formation = new[]
337334 {
338335 new Label
339336 {
340- Location = new Point(46, 0),
337+ Location = new Point(46, 2),
341338 Size = new Size(29, 12)
342339 },
343340 new Label
344341 {
345- Location = new Point(74, 0),
342+ Location = new Point(74, 2),
346343 Size = new Size(29, 12)
347344 },
348345 new Label
349346 {
350- Location = new Point(0, 0),
347+ Location = new Point(0, 2),
351348 Size = new Size(48, 12),
352349 TextAlign = ContentAlignment.MiddleCenter
353350 }
@@ -356,24 +353,22 @@ namespace KancolleSniffer
356353 {
357354 new Label
358355 {
359- Location = new Point(162, 0),
356+ Location = new Point(162, 2),
360357 Size = new Size(23, 12),
361358 TextAlign = ContentAlignment.MiddleRight
362359 },
363360 new Label
364361 {
365- Location = new Point(183, 0),
362+ Location = new Point(183, 2),
366363 Size = new Size(23, 12),
367364 TextAlign = ContentAlignment.MiddleRight
368365 },
369366 new Label
370367 {
371- Location = new Point(110, 0),
368+ Location = new Point(110, 2),
372369 Size = new Size(53, 12)
373370 }
374371 });
375- foreach (Control control in Controls)
376- control.Location = new Point(control.Location.X + left, control.Location.Y + top);
377372 // ReSharper disable once VirtualMemberCallInConstructor
378373 BackColor = ShipLabels.ColumnColors[1];
379374 }
旧リポジトリブラウザで表示