예제 #1
0
        protected override void CompileMenuOptions(MenuGumpOptions list)
        {
            if (ChangesPending)
            {
                list.Insert(0, new ListGumpEntry("Apply Changes", HandleApplyChanges, HighlightHue));
                list.Insert(1, new ListGumpEntry("Clear Changes", HandleClearChanges, HighlightHue));
            }
            else
            {
                list.RemoveEntry("Apply Changes");
                list.RemoveEntry("Clear Changes");
            }

            if (CanAdd)
            {
                list.Insert(2, new ListGumpEntry("Add", HandleAdd, HighlightHue));
            }
            else
            {
                list.RemoveEntry("Add");
            }

            if (CanClear)
            {
                list.Insert(3, new ListGumpEntry("Clear", HandleClear, ErrorHue));
            }
            else
            {
                list.RemoveEntry("Clear");
            }

            base.CompileMenuOptions(list);
        }
예제 #2
0
 protected virtual void CompileOptions(MenuGumpOptions list)
 {
     list.Insert(list.Count, new ListGumpEntry("Cancel", Cancel, ErrorHue));
 }