Exemple #1
0
 public GMacroKeyButton(Keys key, string name, bool bold, int x, int y, int w, int h) : base(x, y, w, h, GumpPaint.Blend(Color.WhiteSmoke, SystemColors.Control, (float) 0.5f), SystemColors.ControlText, name, bold ? Engine.GetUniFont(1) : Engine.GetUniFont(2))
 {
     this.m_Key       = key;
     base.Tooltip     = new Tooltip(string.Format("{0}\nClick to create", GMacroEditorPanel.GetKeyName(this.m_Key)), true);
     base.FillAlpha   = 1f;
     base.m_QuickDrag = false;
     base.m_CanDrag   = true;
     base.OnClick     = new OnClick(this.Clicked);
 }
Exemple #2
0
 public void Finish(Keys key, Keys mods)
 {
     if (this.m_Recording)
     {
         this.m_Recording = false;
         base.String      = GMacroEditorPanel.GetKeyName(key);
         GMacroEditorPanel parent = base.m_Parent as GMacroEditorPanel;
         if (parent != null)
         {
             parent.Macro.Key  = key;
             parent.Macro.Mods = mods;
             parent.UpdateModifiers();
             parent.NotifyParent();
         }
     }
 }