Class MapUiRoot
public sealed class MapUiRoot : MonoBehaviour
- Inheritance
-
object
Object
Component
Behaviour
MonoBehaviour
MapUiRoot
Fields
AttributionOrder
public const int AttributionOrder = 1000
Field Value
- int
public const string ButtonClass = "lans-button"
Field Value
- string
public const string ButtonOnClass = "lans-button--on"
Field Value
- string
public const string CompactButtonClass = "lans-button--compact"
Field Value
- string
CreditClass
public const string CreditClass = "lansmap-credit"
Field Value
- string
LightThemeClass
public const string LightThemeClass = "theme-light"
Field Value
- string
MutedTextClass
public const string MutedTextClass = "lansmap-text--muted"
Field Value
- string
OnMapTextClass
public const string OnMapTextClass = "lansmap-text--onmap"
Field Value
- string
PanelClass
public const string PanelClass = "lansmap-panel"
Field Value
- string
PanelHeavyClass
public const string PanelHeavyClass = "lansmap-panel--heavy"
Field Value
- string
RowClass
public const string RowClass = "lansmap-row"
Field Value
- string
SlotFixedClass
public const string SlotFixedClass = "lansmap-slot-item--fixed"
Field Value
- string
SlotItemClass
public const string SlotItemClass = "lansmap-slot-item"
Field Value
- string
TextClass
public const string TextClass = "lansmap-text"
Field Value
- string
TopmostOrder
public const int TopmostOrder = -1000
Field Value
- int
Properties
BasemapIsDark
public static bool BasemapIsDark { get; set; }
Property Value
- bool
ChromeLayer
public static VisualElement ChromeLayer { get; }
Property Value
- VisualElement
ContentLayer
public static VisualElement ContentLayer { get; }
Property Value
- VisualElement
ContentScale
public static float ContentScale { get; }
Property Value
- float
DarkResolved
public static bool DarkResolved { get; }
Property Value
- bool
DisplaySimulation
public static UiDisplaySimulation? DisplaySimulation { get; set; }
Property Value
- UiDisplaySimulation?
Root
public static VisualElement Root { get; }
Property Value
- VisualElement
RootElement
public VisualElement RootElement { get; }
Property Value
- VisualElement
SafeAreaOverride
public static Rect? SafeAreaOverride { get; set; }
Property Value
- Rect?
Theme
public static MapUiRoot.UiTheme Theme { get; set; }
Property Value
- MapUiRoot.UiTheme
UiScale
public static float UiScale { get; set; }
Property Value
- float
Methods
AddToCorner(MapCorner, VisualElement, int)
public static void AddToCorner(MapCorner corner, VisualElement element, int order = 0)
Parameters
corner MapCorner
element VisualElement
order int
ClearDefaultForCapture()
public static void ClearDefaultForCapture()
Corner(MapCorner)
public static VisualElement Corner(MapCorner corner)
Parameters
corner MapCorner
Returns
- VisualElement
CornerSlot(MapCorner)
public VisualElement CornerSlot(MapCorner corner)
Parameters
corner MapCorner
Returns
- VisualElement
DestroyAllForTests()
public static void DestroyAllForTests()
EnsureRootForCapture()
public static VisualElement EnsureRootForCapture()
Returns
- VisualElement
For(object)
public static MapUiRoot For(object owner)
Parameters
owner object
Returns
- MapUiRoot
IsKeyboardCaptured()
public static bool IsKeyboardCaptured()
Returns
- bool
IsPointerOverUi(Vector2)
public static bool IsPointerOverUi(Vector2 screenTopLeftPx)
Parameters
screenTopLeftPx Vector2
Returns
- bool
IsPointerOverUiMouse()
public static bool IsPointerOverUiMouse()
Returns
- bool
public static bool IsPointerOverUiMouse(IMapInputSource source)
Parameters
source IMapInputSource
Returns
- bool
public static Button MakeButton(string text, Action onClick)
Parameters
text string
onClick Action
Returns
- Button
MakeLabel(string, int, bool)
public static Label MakeLabel(string text, int fontSize = 13, bool bold = false)
Parameters
text string
fontSize int
bold bool
Returns
- Label
PixelsToUi(float)
public static float PixelsToUi(float screenPx)
Parameters
screenPx float
Returns
- float
PlaceInCorner(MapCorner, VisualElement, int)
public void PlaceInCorner(MapCorner corner, VisualElement element, int order = 0)
Parameters
corner MapCorner
element VisualElement
order int
RemoveFromCorner(VisualElement)
public static void RemoveFromCorner(VisualElement element)
Parameters
element VisualElement
RemoveFromMyCorner(VisualElement)
public void RemoveFromMyCorner(VisualElement element)
Parameters
element VisualElement
SafeSizeUi()
public static Vector2 SafeSizeUi()
Returns
- Vector2
ScreenToUi(Vector2)
public static Vector2 ScreenToUi(Vector2 screenTopLeftPx)
Parameters
screenTopLeftPx Vector2
Returns
- Vector2
public static void SetButtonOn(Button b, bool on)
Parameters
b Button
on bool
StylePanel(VisualElement)
public static void StylePanel(VisualElement e)
Parameters
e VisualElement