private void OnPopupOpened(AdditionalHeaderButton.AdditionalPopup popup) { foreach (var info in AdditionalInfos) { info.AddButton(popup.Content, true); info.Button.autoSize = true; info.Button.autoSize = false; info.ClickedEvent += PopupClicked; SetAdditionalButtonColors(info.Button); } var maxwidth = AdditionalInfos.Max(i => i.Button.width); popup.Width = maxwidth; }
public void Serialize(IDataWriter writer) { writer.WriteDouble(UniqueId); writer.WriteVarShort((Int16)FirtNameId); writer.WriteVarShort((Int16)LastNameId); AdditionalInfos.Serialize(writer); writer.WriteShort(WorldX); writer.WriteShort(WorldY); writer.WriteVarShort((Int16)SubAreaId); writer.WriteByte(State); Look.Serialize(writer); for (var i = 0; i < Complements.Length; i++) { Complements[i].Serialize(writer); } }
public override void Serialize(IDataWriter writer) { writer.WriteDouble(UniqueId); writer.WriteVarUhShort(FirtNameId); writer.WriteVarUhShort(LastNameId); AdditionalInfos.Serialize(writer); writer.WriteShort(WorldX); writer.WriteShort(WorldY); writer.WriteVarUhShort(SubAreaId); writer.WriteSByte(State); Look.Serialize(writer); writer.WriteShort((short)Complements.Count); foreach (var x in Complements) { x.Serialize(writer); } }
public override void Serialize(IDataWriter writer) { writer.WriteDouble(UniqueId); writer.WriteVarUhShort(FirtNameId); writer.WriteVarUhShort(LastNameId); AdditionalInfos.Serialize(writer); writer.WriteShort(WorldX); writer.WriteShort(WorldY); writer.WriteVarUhShort(SubAreaId); writer.WriteByte(State); Look.Serialize(writer); writer.WriteShort((short)Complements.Count); for (var complementsIndex = 0; complementsIndex < Complements.Count; complementsIndex++) { var objectToSend = Complements[complementsIndex]; writer.WriteUShort(objectToSend.TypeID); objectToSend.Serialize(writer); } }
public void AddAdditionalInfo([MarshalAs(UnmanagedType.IDispatch)] object additionalInfo) { AdditionalInfos.Add((AdditionalInfo)additionalInfo); }
public void AddAdditionalInfo(object info) { AdditionalInfos.Add((AdditionalInfo)info); }