Exemple #1
0
        /// <summary>
        /// übergabe von events an die komponenten
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected virtual void Panel_OnKeyPress(object sender, char e)
        {
            bool flag = false;

            for (int i = components.Count - 1; i >= 0; i--)
            {
                GuiComponent x = components[i];
                if (e == 9 && x.Selected)
                {
                    flag       = true;
                    x.Selected = false;
                    if (i < components.Count - 1)
                    {
                        components[i + 1].Selected = true;
                    }
                    else
                    {
                        components[0].Selected = true;
                    }
                    return;
                }
                if (x.Selected)
                {
                    x.Component_OnKeyPress(e);
                }
            }
            if (!flag && e == 9 && components.Count > 0)
            {
                components[0].Selected = true;
            }
        }
Exemple #2
0
 /// <summary>
 /// übergabe von events an die komponenten
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected virtual void GuiPanel_OnLeave(object sender, Vector e)
 {
     for (int i = components.Count - 1; i >= 0; i--)
     {
         GuiComponent x = components[i];
         x.Component_OnLeave(e);
     }
 }
Exemple #3
0
        /// <summary>
        /// gibt events weiter zu den komponenten
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void GuiList_OnLeave(object sender, Vector e)
        {
            for (int i = components.Count - 1; i >= 0; i--)
            {
                GuiComponent x = components[i];
                x.Component_OnLeave(e);
            }
        }
Exemple #4
0
 /// <summary>
 /// übergabe von events an die komponenten
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected virtual void Panel_OnMove(object sender, Vector e)
 {
     for (int i = components.Count - 1; i >= 0; i--)
     {
         GuiComponent x = components[i];
         if (x.OnHover(e))
         {
             x.Component_OnMove(e);
         }
     }
 }
Exemple #5
0
 /// <summary>
 /// übergabe von events an die komponenten
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected virtual void Panel_OnKeyRelease(object sender, char e)
 {
     for (int i = components.Count - 1; i >= 0; i--)
     {
         GuiComponent x = components[i];
         if (x.Selected)
         {
             x.Component_OnKeyRelease(e);
         }
     }
 }
Exemple #6
0
        /// <summary>
        /// gibt events weiter zu den komponenten
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void GuiList_OnEnter(object sender, Vector e)
        {
            for (int i = components.Count - 1; i >= 0; i--)
            {
                GuiComponent x = components[i];
                if (x.OnHover(e))
                {
                    x.Component_OnEnter(e);
                }
            }
        }
Exemple #7
0
 /// <summary>
 /// übergabe von events an die komponenten
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected virtual void Panel_OnClick(object sender, Vector e)
 {
     for (int i = components.Count - 1; i >= 0; i--)
     {
         GuiComponent x = components[i];
         if (x.OnHover(e))
         {
             x.Component_OnClick(e);
             x.Selected = true;
         }
         else
         {
             x.Selected = false;
         }
     }
 }