-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIBaseMenu.cs
More file actions
54 lines (50 loc) · 2.1 KB
/
Copy pathIBaseMenu.cs
File metadata and controls
54 lines (50 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using System.Collections.Generic;
using CounterStrikeSharp.API.Core;
namespace MapChooserAPI
{
// Minimal surface to match the other plugin's expectations.
public interface BaseMenu : IMenu
{
/* string Title { get; set; }
List<ItemOption> ItemOptions { get; }
bool ExitButton { get; set; }
int MenuTime { get; set; }
IMenu? PrevMenu { get; set; }
BasePlugin Plugin { get; }
ItemOption AddItem(string display, Action<CCSPlayerController, ItemOption> onSelect, DisableOption disableOption = DisableOption.None);
ItemOption AddItem(string display, DisableOption disableOption);
void Display(CCSPlayerController player, int time);
void DisplayAt(CCSPlayerController player, int firstItem, int time);
void DisplayToAll(int time);
void DisplayAtToAll(int firstItem, int time); */
}
public interface IMenu
{
string Title { get; set; }
List<ItemOption> ItemOptions { get; }
bool ExitButton { get; set; }
int MenuTime { get; set; }
IMenu? PrevMenu { get; set; }
BasePlugin Plugin { get; }
ItemOption AddItem(string display, Action<CCSPlayerController, ItemOption> onSelect, DisableOption disableOption = DisableOption.None, PostSelectAction postSelectAction = PostSelectAction.Nothing);
ItemOption AddItem(string display, DisableOption disableOption = DisableOption.None, PostSelectAction postSelectAction = PostSelectAction.Nothing);
void Display(CCSPlayerController player, int time);
void DisplayAt(CCSPlayerController player, int firstItem, int time);
void DisplayToAll(int time);
void DisplayAtToAll(int firstItem, int time);
}
public enum PostSelectAction
{
Close = 0,
Reset = 1,
Nothing = 2
}
public interface ItemOption
{
public string Text { get; set; }
public DisableOption DisableOption { get; set; }
public PostSelectAction PostSelectAction { get; set; }
public Action<CCSPlayerController, ItemOption>? OnSelect { get; set; }
}
}