public RadialMenu(GraphicsDevice p_gd, ContentManager p_content, List<RadialMenuItem> p_items, Texture2D p_symbol, RadialMenu p_parent, EventSystem p_eventSystem, RadialMenuSystem p_rmSystem) { m_symbol = p_symbol; m_items = p_items; m_parent = p_parent; //m_hotKey = Keys.None; m_openEvent = new EventData(p_rmSystem.requestMenu, this); p_eventSystem.addEvent(m_openEvent); }
public RadialMenuItem(string p_text, Texture2D p_texture, RadialMenu p_submenu, float p_scale = 1.0f) { text = p_text; texture = p_texture; submenu = p_submenu; activateEvent = null; sourceRect.X = 0; sourceRect.Y = 0; sourceRect.Width = p_texture.Width; sourceRect.Height = p_texture.Height; scale = p_scale; }
public RadialMenuItem(string p_text, Texture2D p_texture, RadialMenu p_submenu, Rectangle p_sourceRect, float p_scale = 1.0f) { text = p_text; texture = p_texture; submenu = p_submenu; activateEvent = null; sourceRect = p_sourceRect; scale = p_scale; }
public void setParent(RadialMenu p_parent) { m_parent = p_parent; }
public void setCurrentWithTarget(RadialMenu p_menu) { for (int i = 0; i < m_items.Count; i++) { if (m_items[i].submenu == p_menu) { arrowTarget = i; } } }
public void requestMenu(RadialMenu p_menu) { for (int i = 0; i < m_menus.Count; i++) { if (m_menus[i] == p_menu) { if (m_current == i && m_active) { m_active = false; m_current = m_root; } else { setCurrent(i); m_active = true; } } } }
public int getIndex(RadialMenu p_menu) { for (int i = 0; i < m_menus.Count; i++) { if (m_menus[i] == p_menu) return i; } return -1; }
public void addRadialMenu(RadialMenu p_menu) { p_menu.setTexturesAndFonts(m_circleTexture, m_infoBox, m_arrow, m_font, m_largeWhiteDot); m_menus.Add(p_menu); if (m_current == -1) { m_current = m_root = 0; } }