mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-15 03:31:30 +01:00
Fix missing scrollbars in Admin Player List window (#40525)
* Fix missing scrollbars in Admin Player List window
* Revert "Fix missing scrollbars in Admin Player List window"
This reverts commit c5aea1a055.
* Invalidate cached item height when item generation callback changes
This commit is contained in:
@@ -28,7 +28,16 @@ public class ListContainer : Control
|
||||
/// Called when creating a button on the UI.
|
||||
/// The provided <see cref="ListContainerButton"/> is the generated button that Controls should be parented to.
|
||||
/// </summary>
|
||||
public Action<ListData, ListContainerButton>? GenerateItem;
|
||||
public Action<ListData, ListContainerButton>? GenerateItem
|
||||
{
|
||||
get => _generateItem;
|
||||
set {
|
||||
_generateItem = value;
|
||||
// Invalidate _itemHeight so we recalculate the size of children the next
|
||||
// time PopulateList() is called
|
||||
_itemHeight = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="BaseButton.OnPressed"/>
|
||||
public Action<BaseButton.ButtonEventArgs, ListData>? ItemPressed;
|
||||
@@ -59,6 +68,7 @@ public class ListContainer : Control
|
||||
private bool _updateChildren = false;
|
||||
private bool _suppressScrollValueChanged;
|
||||
private ButtonGroup? _buttonGroup;
|
||||
public Action<ListData, ListContainerButton>? _generateItem;
|
||||
|
||||
public int ScrollSpeedY { get; set; } = 50;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user