context menu uses clilocs which should translate depending on the language you select when installing UO
but, if I recall correctly, you're using an old client that's in English - right?
from what I understand there's no way for context menu to support a string. so you're only options are either editing the clilocs and translating them that way...
or....maybe overriding right click to bring up a custom gump...which will look bad but it's an option
private class RotatePreviousEntry : ContextMenuEntry
{
private ISiegeWeapon m_weapon;
public RotatePreviousEntry(ISiegeWeapon weapon)
: base(405)
{
m_weapon = weapon;
}
public override void OnClick()
{
if (m_weapon != null)
m_weapon.Facing--;
}
}
private class BackpackEntry : ContextMenuEntry
{
private ISiegeWeapon m_weapon;
private Mobile m_from;
public BackpackEntry(Mobile from, ISiegeWeapon weapon)
: base(2139)
{
m_weapon = weapon;
m_from = from;
}
public override void OnClick()
{
if (m_weapon != null)
{
m_weapon.StoreWeapon(m_from);
}
}
}
private class ReleaseEntry : ContextMenuEntry
{
private Mobile m_from;
private XmlDrag m_drag;
public ReleaseEntry(Mobile from, XmlDrag drag)
: base(6118)
{
m_from = from;
m_drag = drag;
}
public override void OnClick()
{
if (m_drag == null) return;
BaseCreature pet = m_drag.DraggedBy as BaseCreature;
// only allow the person dragging it or their pet to release
if (m_drag.DraggedBy == m_from || (pet != null && (pet.ControlMaster == m_from || pet.ControlMaster == null)))
{
m_drag.DraggedBy = null;
}
}
}
private class ConnectEntry : ContextMenuEntry
{
private Mobile m_from;
private XmlDrag m_drag;
public ConnectEntry(Mobile from, XmlDrag drag)
: base(5119)
{
m_from = from;
m_drag = drag;
}
public override void OnClick()
{
if (m_drag != null && m_from != null)
{
m_from.SendMessage("Select a mobile to drag the weapon");
m_from.Target = new DragTarget(m_drag);
}
}
}
private class SetupEntry : ContextMenuEntry
{
private ISiegeWeapon m_weapon;
private Mobile m_from;
public SetupEntry(Mobile from, ISiegeWeapon weapon)
: base(97)
{
m_weapon = weapon;
m_from = from;
}
public override void OnClick()
{
if (m_weapon != null && m_from != null)
{
m_weapon.PlaceWeapon(m_from, m_from.Location, m_from.Map);
}
}
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
if (Addon is ISiegeWeapon)
{
ISiegeWeapon weapon = (ISiegeWeapon)Addon;
if (!weapon.FixedFacing)
{
list.Add(new RotateNextEntry(weapon));
list.Add(new RotatePreviousEntry(weapon));
}
if (weapon.IsPackable)
{
list.Add(new BackpackEntry(from, weapon));
}
if (weapon.IsDraggable)
{
// does it support dragging?
XmlDrag a = (XmlDrag)XmlAttach.FindAttachment(weapon, typeof(XmlDrag));
if (a != null)
{
// is it currently being dragged?
if (a.DraggedBy != null && !a.DraggedBy.Deleted)
{
list.Add(new ReleaseEntry(from, a));
}
if (!from.InRange(GetWorldLocation(), 1))
{
from.SendMessage( "Esta demasiado lejos." );
}
else
{
list.Add(new ConnectEntry(from, a));
}
}
}
}
base.GetContextMenuEntries(from, list);
}
That never worked for meSetting UO to another language can be done this way
link
We use essential cookies to make this site work, and optional cookies to enhance your experience.