public DonationHuePickerGump(Mobile m, int [] hues, GetHueMethod gethuemethod, SetHueMethod sethuemethod, string caption) : base(20, 20) { if (m == null || m.Account == null || hues == null || hues.Length <= 0 || gethuemethod == null || sethuemethod == null || caption == null) { return; } m_Account = (Account)m.Account; m_Hues = hues; m_GetHueMethod = gethuemethod; m_SetHueMethod = sethuemethod; m_Caption = caption; int cushue = m_GetHueMethod(m_Account); AddPage(0); AddBackground(0, 0, 200, 120 + m_Hues.Length * 30, 2600); AddLabel(50, 30, 2401, m_Caption); int c = 0; foreach (int hue in m_Hues) { AddRadio(30, 50 + c * 30, 9727, 9730, (cushue == hue), c); AddLabel(65, 55 + c * 30, (hue == 0) ? 2401 : (hue == 1177) ? 52 : hue - 1, (hue == 0) ? "Regular Hue" : (hue == 1177) ? "Blaze Hue" : "*****"); c++; } AddButton(30, 60 + c * 30, 4005, 4007, 1, GumpButtonType.Reply, 0); AddLabel(65, 60 + c * 30, 2401, "Apply"); }
public DonationHuePickerGump(Mobile m, int[] hues, GetHueMethod gethuemethod, SetHueMethod sethuemethod, string caption) : base(20, 20) { if (m == null || m.Account == null || hues == null || hues.Length <= 0 || gethuemethod == null || sethuemethod == null || caption == null) return; m_Account = (Account)m.Account; m_Hues = hues; m_GetHueMethod = gethuemethod; m_SetHueMethod = sethuemethod; m_Caption = caption; int cushue = m_GetHueMethod(m_Account); AddPage(0); AddBackground(0, 0, 200, 120 + m_Hues.Length * 30, 2600); AddLabel(50, 30, 2401, m_Caption); int c = 0; foreach (int hue in m_Hues) { AddRadio(30, 50 + c * 30, 9727, 9730, (cushue == hue), c); AddLabel(65, 55 + c * 30, (hue == 0) ? 2401 : (hue == 1177) ? 52 : hue - 1, (hue == 0) ? "Regular Hue" : (hue == 1177) ? "Blaze Hue" : "*****"); c++; } AddButton(30, 60 + c * 30, 4005, 4007, 1, GumpButtonType.Reply, 0); AddLabel(65, 60 + c * 30, 2401, "Apply"); }