예제 #1
0
파일: Engine.cs 프로젝트: Skinny1001/PlayUO
 private static void OpenDyeWindow(OnClick OnClick, Gump g)
 {
     GAlphaBackground background = new GAlphaBackground(0, 0, 0xb8, 110) {
         m_NonRestrictivePicking = true,
         m_CanDrag = false,
         X = 0,
         Y = g.Parent.Height - 1
     };
     GHuePicker toAdd = new GHuePicker(4, 4) {
         Brightness = 1
     };
     toAdd.SetTag("Dialog", background);
     background.Children.Add(toAdd);
     background.Children.Add(new GSingleBorder(3, 3, 0xa2, 0x52));
     background.Children.Add(new GSingleBorder(0xa4, 3, 0x11, 0x52));
     GBrightnessBar bar = new GBrightnessBar(0xa5, 4, 15, 80, toAdd);
     background.Children.Add(bar);
     bar.Refresh();
     GFlatButton okay = new GFlatButton(0x7b, 0x57, 0x3a, 20, "Okay", OnClick);
     okay.SetTag("Hue Picker", toAdd);
     okay.SetTag("Dialog", background);
     okay.SetTag("Button", g);
     background.Children.Add(new GQuickHues(toAdd, bar, okay));
     background.Children.Add(okay);
     g.Parent.Children.Add(background);
 }
예제 #2
0
 private static void SelectHue(PacketReader pvSrc)
 {
     GItemArt art;
     int num = pvSrc.ReadInt32();
     short num2 = pvSrc.ReadInt16();
     short itemID = pvSrc.ReadInt16();
     GAlphaBackground background = new GAlphaBackground(0, 0, 0xf4, 110) {
         m_NonRestrictivePicking = true
     };
     background.Center();
     art = new GItemArt(0xb7, 3, itemID) {
         X = art.X + (((0x3a - (art.Image.xMax - art.Image.xMin)) / 2) - art.Image.xMin),
         Y = art.Y + (((0x52 - (art.Image.yMax - art.Image.yMin)) / 2) - art.Image.yMin)
     };
     background.Children.Add(art);
     GHuePicker toAdd = new GHuePicker(4, 4) {
         Brightness = 1
     };
     toAdd.SetTag("ItemID", (int) itemID);
     toAdd.SetTag("Item Art", art);
     toAdd.SetTag("Dialog", background);
     toAdd.OnHueSelect = new OnHueSelect(Engine.HuePicker_OnHueSelect);
     background.Children.Add(toAdd);
     background.Children.Add(new GSingleBorder(3, 3, 0xa2, 0x52));
     background.Children.Add(new GSingleBorder(0xa4, 3, 0x11, 0x52));
     GBrightnessBar bar = new GBrightnessBar(0xa5, 4, 15, 80, toAdd);
     background.Children.Add(bar);
     bar.Refresh();
     GFlatButton button = new GFlatButton(0x7b, 0x57, 0x3a, 20, "Picker", new OnClick(Engine.HuePickerPicker_OnClick));
     GFlatButton okay = new GFlatButton(0xb7, 0x57, 0x3a, 20, "Okay", new OnClick(Engine.HuePickerOk_OnClick));
     okay.SetTag("Hue Picker", toAdd);
     okay.SetTag("Dialog", background);
     okay.SetTag("Serial", num);
     okay.SetTag("ItemID", itemID);
     okay.SetTag("Relay", num2);
     button.SetTag("Hue Picker", toAdd);
     button.SetTag("Brightness Bar", bar);
     background.Children.Add(new GQuickHues(toAdd, bar, okay));
     background.Children.Add(button);
     background.Children.Add(okay);
     Gumps.Desktop.Children.Add(background);
     Engine.HuePicker_OnHueSelect(toAdd.Hue, toAdd);
 }