Inheritance
System.Object
PlayerPopups
Assembly: Eco.Gameplay.dll
public static class PlayerPopups : Object
Methods
Declaration
public static Task<bool> ConfirmBox(this Player player, LocString message)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
Declaration
public static Task<bool> ConfirmBoxLoc(this Player player, FormattableString message)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.FormattableString |
message |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
Declaration
public static void Error(this Player player, LocString message)
Parameters
Declaration
public static void ErrorLoc(this Player player, FormattableString message)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.FormattableString |
message |
|
Declaration
public static void ErrorLocStr(this Player player, string message)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.String |
message |
|
Declaration
public static void InfoBox(this Player player, LocString message)
Parameters
Declaration
public static void InfoBoxLoc(this Player player, FormattableString message)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.FormattableString |
message |
|
Declaration
public static void InfoBoxLocStr(this Player player, string message)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.String |
message |
|
Declaration
public static void Msg(this Player player, LocString message, NotificationStyle style)
Parameters
Declaration
public static void MsgLoc(this Player player, FormattableString message, NotificationStyle style)
Parameters
Declaration
public static void MsgLocStr(this Player player, string message, NotificationStyle style)
Parameters
Declaration
public static void OkBox(this Player player, LocString message)
Parameters
Declaration
public static Result OkBox(this Player player, LocString message, bool succeeded)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| LocString |
message |
|
| System.Boolean |
succeeded |
|
Returns
Declaration
public static Task<bool> OkBoxAwaitable(this Player player, LocString message)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
Declaration
public static Task<bool> OkBoxAwaitableLoc(this Player player, FormattableString message)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.FormattableString |
message |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
Declaration
public static void OkBoxLoc(this Player player, FormattableString message)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.FormattableString |
message |
|
Declaration
public static Result OkBoxLoc(this Player player, FormattableString message, bool succeeded)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.FormattableString |
message |
|
| System.Boolean |
succeeded |
|
Returns
Shows a dialog with a dropdown.
Declaration
public static Task<int> OptionBox(this Player player, LocString message, List<string> options)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| LocString |
message |
The text to be shown.
|
| System.Collections.Generic.List<System.String> |
options |
Options to be added to the dropdown.
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Int32> |
Index of the selected item. -1 if the player cancells the dialog.
|
Declaration
public static Task<AccountAndAmount> PopupBuyPlacedItems(this Player player, string description, int numAvailable, float pricePerItem, PlotPos pos, Currency currency)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.String |
description |
|
| System.Int32 |
numAvailable |
|
| System.Single |
pricePerItem |
|
| PlotPos |
pos |
|
| Currency |
currency |
|
Returns
Declaration
public static Task<float> PopupNumberBox(this Player player, string text, string quantityText, string buttonText, int defaultVal, Range range, bool integerOnly)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.String |
text |
|
| System.String |
quantityText |
|
| System.String |
buttonText |
|
| System.Int32 |
defaultVal |
|
| Range |
range |
|
| System.Boolean |
integerOnly |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Single> |
|
Declaration
public static Task<List<object>> PopupSelectFromIndexedOptions(this Player player, LocString title, LocString entryName, LocString entryNamePlural, PlayerPopups.NamedSelection[] options, MultiSelectorPopUpFlags flags)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<System.Object>> |
|
Declaration
public static Task<List<INamed>> PopupSelectFromOptions(this Player player, LocString title, LocString entryName, LocString entryNamePlural, IEnumerable<INamed> options, IEnumerable<INamed> existingSet, MultiSelectorPopUpFlags flags, Nullable<LocString> subtitle = null)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<INamed>> |
|
Declaration
public static void PopupSelectSelectDerivedInstances(this Player player, LocString title, LocString entryName, LocString entryNamePlural, Type baseType, IEnumerable<INamed> existingSet, Action<List<INamed>> callback, MultiSelectorPopUpFlags flags)
Parameters
Declaration
public static void PopupTypePicker(this Player player, LocString title, Type type, Action<List<Type>> callback)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| LocString |
title |
|
| System.Type |
type |
|
| System.Action<System.Collections.Generic.List<System.Type>> |
callback |
|