Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
radialmenu.c File Reference

Go to the source code of this file.

Enumerations

enum  RadialMenuControlType { MOUSE , CONTROLLER }

Functions

void ~RadialMenu ()
void ActivateControllerTimeout (bool state)
float GetAngleInDegrees (float rad_angle)
static RadialMenu GetInstance ()
int GetItemCardsCount ()
float GetMouseDistance ()
float GetMousePointerAngle ()
Widget GetObjectByDegAngle (float deg_angle)
void GetParentCenter (out float center_x, out float center_y)
float GetParentMinSize ()
float GetRadius ()
void HideRadialSelector ()
bool IsUsingController ()
bool IsUsingMouse ()
bool IsWidgetInitialized ()
float NormalizeInvertAngle (float angle)
override bool OnMouseButtonUp (Widget w, int x, int y, int button)
void OnWidgetScriptInit (Widget w)
void RadialMenu ()
void Refresh (bool hide_selector=true)
void RegisterClass (UIScriptedMenu class_name)
void SetControlType (RadialMenuControlType type)
void SetExecuteDistOffset (float execute_dist_offset)
void SetItemCardRadiusOffset (float item_card_radius_offset)
void SetOffsetFromTop (float offset_from_top)
void SetRadiusOffset (float radius_offset)
void SetWidgetInitialized (bool state)
void SetWidgetProperties (string delimiter_layout)
void ShowRadialSelector (Widget selected_item)
void UpdataControllerInput ()
void Update ()

Variables

const float CONTROLLER_DESELECT_TIMEOUT = 1000
const float CONTROLLER_TILT_TRESHOLD_EXECUTE = 1.0
const float CONTROLLER_TILT_TRESHOLD_SELECT = 0.8
int last_time = -1
float m_AngleRadOffset
UAIDWrapper m_BackInputWrapper
float m_ControllerAngle
float m_ControllerTilt
int m_ControllerTimout
RadialMenuControlType m_ControlType
string m_DelimiterLayout
float m_ExecuteDistanceOffset
static ref RadialMenu m_Instance
bool m_IsControllerTimoutEnabled = true
float m_ItemCardRadiusOffset
Widget m_ItemCardsContainer
float m_OffsetFromTop
enum RadialMenuControlType m_Parent
ref map< Widget, floatm_RadialItemCards
Widget m_RadialSelector
int m_RadialSelectorDisabledColor
ImageWidget m_RadialSelectorImage
int m_RadialSelectorOriginalColor
ImageWidget m_RadialSelectorPointerImage
float m_RadiusOffset
ref UIScriptedMenu m_RegisteredClass
Widget m_SelectedObject
UAIDWrapper m_SelectInputWrapper
ref Timer m_UpdateTimer
bool m_WidgetInitialized
const float MOUSE_SAFE_ZONE_RADIUS = 120
static const string RADIAL_DELIMITER_CONTAINER = "RadialDelimiterContainer"
static const string RADIAL_ITEM_CARD_CONTAINER = "RadialItemCardContainer"
static const string RADIAL_SELECTOR = "RadialSelector"
static const string RADIAL_SELECTOR_IMAGE = "SelectorImage"
static const string RADIAL_SELECTOR_POINTER = "SelectorPointer"

Enumeration Type Documentation

◆ RadialMenuControlType

Enumerator
MOUSE 
CONTROLLER 

Definition at line 1 of file radialmenu.c.

Function Documentation

◆ ~RadialMenu()

void ~RadialMenu ( )
protected

Definition at line 113 of file radialmenu.c.

◆ ActivateControllerTimeout()

void ActivateControllerTimeout ( bool state)
protected

Definition at line 214 of file radialmenu.c.

References m_IsControllerTimoutEnabled.

◆ GetAngleInDegrees()

float GetAngleInDegrees ( float rad_angle)
protected

Definition at line 498 of file radialmenu.c.

References Math::RAD2DEG.

Referenced by GetObjectByDegAngle(), Refresh(), ShowRadialSelector(), and Update().

◆ GetInstance()

RadialMenu GetInstance ( )
staticprotected

Definition at line 117 of file radialmenu.c.

References m_Instance, and RadialMenu().

◆ GetItemCardsCount()

int GetItemCardsCount ( )
protected

Definition at line 357 of file radialmenu.c.

References m_ItemCardsContainer.

Referenced by Refresh().

◆ GetMouseDistance()

float GetMouseDistance ( )
protected

Definition at line 482 of file radialmenu.c.

References vector::Distance(), GetMousePos(), GetParentCenter(), and Vector().

Referenced by Update().

◆ GetMousePointerAngle()

float GetMousePointerAngle ( )
protected

Definition at line 464 of file radialmenu.c.

References Math::Atan2(), GetMousePos(), and GetParentCenter().

Referenced by Update().

◆ GetObjectByDegAngle()

Widget GetObjectByDegAngle ( float deg_angle)
protected

Definition at line 421 of file radialmenu.c.

References GetAngleInDegrees(), m_AngleRadOffset, and m_RadialItemCards.

Referenced by Update().

◆ GetParentCenter()

void GetParentCenter ( out float center_x,
out float center_y )
protected

Definition at line 386 of file radialmenu.c.

References m_Parent.

Referenced by GetMouseDistance(), and GetMousePointerAngle().

◆ GetParentMinSize()

float GetParentMinSize ( )
protected

Definition at line 403 of file radialmenu.c.

References m_Parent, and Math::Min().

Referenced by GetRadius().

◆ GetRadius()

float GetRadius ( )
protected

Definition at line 372 of file radialmenu.c.

References Math::AbsFloat(), GetParentMinSize(), and m_RadiusOffset.

Referenced by Refresh(), and AreaDamageTriggerBase::SetExtents().

◆ HideRadialSelector()

void HideRadialSelector ( )
protected

Definition at line 346 of file radialmenu.c.

References m_RadialSelector.

Referenced by Refresh(), and Update().

◆ IsUsingController()

bool IsUsingController ( )
protected

Definition at line 158 of file radialmenu.c.

References m_ControlType.

Referenced by Update().

◆ IsUsingMouse()

bool IsUsingMouse ( )
protected

Definition at line 148 of file radialmenu.c.

References m_ControlType.

Referenced by Update().

◆ IsWidgetInitialized()

bool IsWidgetInitialized ( )
protected

Definition at line 173 of file radialmenu.c.

References m_WidgetInitialized.

◆ NormalizeInvertAngle()

float NormalizeInvertAngle ( float angle)
protected

Definition at line 628 of file radialmenu.c.

Referenced by UpdataControllerInput().

◆ OnMouseButtonUp()

override bool OnMouseButtonUp ( Widget w,
int x,
int y,
int button )
protected

Definition at line 669 of file radialmenu.c.

References g_Game, m_RegisteredClass, m_SelectedObject, x, and y.

◆ OnWidgetScriptInit()

◆ RadialMenu()

◆ Refresh()

◆ RegisterClass()

void RegisterClass ( UIScriptedMenu class_name)
protected

Definition at line 181 of file radialmenu.c.

References class_name, m_RegisteredClass, and m_UpdateTimer.

◆ SetControlType()

void SetControlType ( RadialMenuControlType type)
protected

Definition at line 139 of file radialmenu.c.

References g_Game, m_ControlType, and m_RegisteredClass.

◆ SetExecuteDistOffset()

void SetExecuteDistOffset ( float execute_dist_offset)
protected

Definition at line 196 of file radialmenu.c.

References m_ExecuteDistanceOffset.

◆ SetItemCardRadiusOffset()

void SetItemCardRadiusOffset ( float item_card_radius_offset)
protected

Definition at line 208 of file radialmenu.c.

References m_ItemCardRadiusOffset.

◆ SetOffsetFromTop()

void SetOffsetFromTop ( float offset_from_top)
protected

Definition at line 202 of file radialmenu.c.

References m_OffsetFromTop.

◆ SetRadiusOffset()

void SetRadiusOffset ( float radius_offset)
protected

Definition at line 190 of file radialmenu.c.

References m_RadiusOffset.

◆ SetWidgetInitialized()

void SetWidgetInitialized ( bool state)
protected

Definition at line 168 of file radialmenu.c.

References m_WidgetInitialized.

◆ SetWidgetProperties()

void SetWidgetProperties ( string delimiter_layout)
protected

Definition at line 219 of file radialmenu.c.

References m_DelimiterLayout.

◆ ShowRadialSelector()

void ShowRadialSelector ( Widget selected_item)
protected

◆ UpdataControllerInput()

Variable Documentation

◆ CONTROLLER_DESELECT_TIMEOUT

const float CONTROLLER_DESELECT_TIMEOUT = 1000
protected

Definition at line 39 of file radialmenu.c.

Referenced by Update().

◆ CONTROLLER_TILT_TRESHOLD_EXECUTE

const float CONTROLLER_TILT_TRESHOLD_EXECUTE = 1.0
protected

Definition at line 41 of file radialmenu.c.

◆ CONTROLLER_TILT_TRESHOLD_SELECT

const float CONTROLLER_TILT_TRESHOLD_SELECT = 0.8
protected

Definition at line 40 of file radialmenu.c.

Referenced by Update().

◆ last_time

int last_time = -1
protected

Definition at line 517 of file radialmenu.c.

Referenced by Update().

◆ m_AngleRadOffset

float m_AngleRadOffset
protected

Definition at line 19 of file radialmenu.c.

Referenced by GetObjectByDegAngle(), and Refresh().

◆ m_BackInputWrapper

UAIDWrapper m_BackInputWrapper
private

Definition at line 32 of file radialmenu.c.

Referenced by RadialMenu(), and UpdataControllerInput().

◆ m_ControllerAngle

float m_ControllerAngle
protected

Definition at line 33 of file radialmenu.c.

Referenced by Controller(), UpdataControllerInput(), and Update().

◆ m_ControllerTilt

float m_ControllerTilt
protected

Definition at line 34 of file radialmenu.c.

Referenced by Controller(), UpdataControllerInput(), and Update().

◆ m_ControllerTimout

int m_ControllerTimout
protected

Definition at line 37 of file radialmenu.c.

Referenced by UpdataControllerInput(), and Update().

◆ m_ControlType

RadialMenuControlType m_ControlType
protected

Definition at line 30 of file radialmenu.c.

Referenced by IsUsingController(), IsUsingMouse(), RadialMenu(), and SetControlType().

◆ m_DelimiterLayout

string m_DelimiterLayout
protected

Definition at line 52 of file radialmenu.c.

Referenced by Refresh(), and SetWidgetProperties().

◆ m_ExecuteDistanceOffset

float m_ExecuteDistanceOffset
protected

Definition at line 49 of file radialmenu.c.

Referenced by SetExecuteDistOffset().

◆ m_Instance

ref RadialMenu m_Instance
staticprotected

◆ m_IsControllerTimoutEnabled

bool m_IsControllerTimoutEnabled = true
protected

Definition at line 38 of file radialmenu.c.

Referenced by ActivateControllerTimeout(), and Update().

◆ m_ItemCardRadiusOffset

float m_ItemCardRadiusOffset
protected

Definition at line 51 of file radialmenu.c.

Referenced by Refresh(), and SetItemCardRadiusOffset().

◆ m_ItemCardsContainer

Widget m_ItemCardsContainer
protected

Definition at line 10 of file radialmenu.c.

Referenced by GetItemCardsCount(), and OnWidgetScriptInit().

◆ m_OffsetFromTop

float m_OffsetFromTop
protected

Definition at line 50 of file radialmenu.c.

Referenced by Refresh(), and SetOffsetFromTop().

◆ m_Parent

enum RadialMenuControlType m_Parent

◆ m_RadialItemCards

ref map<Widget, float> m_RadialItemCards
protected

Definition at line 17 of file radialmenu.c.

Referenced by GetObjectByDegAngle(), RadialMenu(), Refresh(), and ShowRadialSelector().

◆ m_RadialSelector

Widget m_RadialSelector
protected

Definition at line 11 of file radialmenu.c.

Referenced by HideRadialSelector(), OnWidgetScriptInit(), and ShowRadialSelector().

◆ m_RadialSelectorDisabledColor

int m_RadialSelectorDisabledColor
protected

Definition at line 15 of file radialmenu.c.

Referenced by OnWidgetScriptInit(), and ShowRadialSelector().

◆ m_RadialSelectorImage

ImageWidget m_RadialSelectorImage
protected

Definition at line 12 of file radialmenu.c.

Referenced by OnWidgetScriptInit(), and ShowRadialSelector().

◆ m_RadialSelectorOriginalColor

int m_RadialSelectorOriginalColor
protected

Definition at line 14 of file radialmenu.c.

Referenced by OnWidgetScriptInit(), and ShowRadialSelector().

◆ m_RadialSelectorPointerImage

ImageWidget m_RadialSelectorPointerImage
protected

Definition at line 13 of file radialmenu.c.

Referenced by OnWidgetScriptInit(), and ShowRadialSelector().

◆ m_RadiusOffset

float m_RadiusOffset
protected

Definition at line 48 of file radialmenu.c.

Referenced by GetRadius(), and SetRadiusOffset().

◆ m_RegisteredClass

ref UIScriptedMenu m_RegisteredClass
protected

◆ m_SelectedObject

Widget m_SelectedObject
protected

Definition at line 16 of file radialmenu.c.

Referenced by OnMouseButtonUp(), UpdataControllerInput(), and Update().

◆ m_SelectInputWrapper

UAIDWrapper m_SelectInputWrapper
private

Definition at line 31 of file radialmenu.c.

Referenced by RadialMenu(), and UpdataControllerInput().

◆ m_UpdateTimer

◆ m_WidgetInitialized

bool m_WidgetInitialized
protected

Definition at line 44 of file radialmenu.c.

Referenced by IsWidgetInitialized(), SetWidgetInitialized(), and Update().

◆ MOUSE_SAFE_ZONE_RADIUS

const float MOUSE_SAFE_ZONE_RADIUS = 120
protected

Definition at line 45 of file radialmenu.c.

Referenced by Update().

◆ RADIAL_DELIMITER_CONTAINER

const string RADIAL_DELIMITER_CONTAINER = "RadialDelimiterContainer"
staticprotected

Definition at line 26 of file radialmenu.c.

Referenced by Refresh().

◆ RADIAL_ITEM_CARD_CONTAINER

const string RADIAL_ITEM_CARD_CONTAINER = "RadialItemCardContainer"
staticprotected

Definition at line 27 of file radialmenu.c.

Referenced by OnWidgetScriptInit(), and Refresh().

◆ RADIAL_SELECTOR

const string RADIAL_SELECTOR = "RadialSelector"
staticprotected

Definition at line 23 of file radialmenu.c.

Referenced by OnWidgetScriptInit().

◆ RADIAL_SELECTOR_IMAGE

const string RADIAL_SELECTOR_IMAGE = "SelectorImage"
staticprotected

Definition at line 24 of file radialmenu.c.

Referenced by OnWidgetScriptInit().

◆ RADIAL_SELECTOR_POINTER

const string RADIAL_SELECTOR_POINTER = "SelectorPointer"
staticprotected

Definition at line 25 of file radialmenu.c.

Referenced by OnWidgetScriptInit().