mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Removed unnecessary methods, changed tests, and moved LimitedCapacityQueue.cs to a more generic namespace.
This commit is contained in:
@ -1,9 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Rulesets.Difficulty.Utils;
|
||||
using osu.Game.Utils;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
@ -12,15 +11,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
private readonly LimitedCapacityQueue<string> messageHistory;
|
||||
|
||||
public IEnumerable<string> GetMessageHistory()
|
||||
{
|
||||
if (HistoryCount == 0)
|
||||
yield break;
|
||||
|
||||
for (int i = HistoryCount - 1; i >= 0; i--)
|
||||
yield return messageHistory[i];
|
||||
}
|
||||
|
||||
public int HistoryCount => messageHistory.Count;
|
||||
|
||||
private int selectedIndex;
|
||||
@ -28,8 +18,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
private string originalMessage = string.Empty;
|
||||
private bool everythingSelected;
|
||||
|
||||
public string GetOldMessage(int index) => messageHistory[HistoryCount - index - 1];
|
||||
|
||||
public HistoryTextBox(int capacity = 100)
|
||||
{
|
||||
messageHistory = new LimitedCapacityQueue<string>(capacity);
|
||||
|
Reference in New Issue
Block a user