protected MapElement(IRes myRes, Map map, ElementMovements movements, EventHandler @event, bool isBackgroundElement = false) : base(myRes) { Movements = movements; MovementWorker = @event; Map = map; FFramable = Movements == ElementMovements.NoMovements; IsBackgroundElement = isBackgroundElement; InitializeComponent(); }
//--------------------------------------------- #region Constructors Region /// <summary> /// create a new instance of the <see cref="ChatBackgroundLabel"/>, /// which will provide you the chat frame, chat icon /// and chat flash. /// </summary> /// <param name="myRes"></param> /// <param name="client"></param> public ChatBackgroundLabel(IRes myRes, GameClient client, ChatLabelControl backLabel) : base(myRes, LabelControlSpecies.ChatBackGroundLabel) { GameClient = client; BackLabel = backLabel; // set the default showing channel to the cross, // so when the user opens his chat channel, he should see the // cross channel's chats. CurrentShowingChannel = ChatChannels.Cross_Chat; Movements = ElementMovements.VerticalMovements; InitializeComponent(); }
public static MapElement GetMapElement(IRes res, GameIcon elementIcon, Map theMap, bool clickedImage, ElementMovements movements, EventHandler @event, bool isBackground = false) { MapElement element = new MapElement(res, theMap, elementIcon, movements, @event, isBackground) { DontUseClickedImage = !clickedImage, }; element.SetPictureName(element.ElementInMapType.ToString()); element.SetPicture(); element.SetSrcRectangle(); return(element); }
public FlatElement(IRes myRes, ElementMovements movements, bool isBarren = false) : base(myRes, isBarren) { Movements = movements; InitializeComponent(); }