public InventoryContainerItem() { SetFixedSize(18, 18); Padding = new Thickness(2); AddChild(TextureElement = new GuiTextureElement() { Anchor = Alignment.Fill }); }
public ResourcePackEntry(string path, string name, string description) { Path = path; Manifest = null; SetFixedSize(355, 36); Margin = new Thickness(5, 5, 5, 5); Padding = Thickness.One; Anchor = Alignment.TopFill; AddChild(_icon = new GuiTextureElement() { Width = 32, Height = 32, Anchor = Alignment.TopLeft, Background = GuiTextures.DefaultServerIcon, AutoSizeMode = AutoSizeMode.None, RepeatMode = TextureRepeatMode.NoRepeat }); AddChild(_textWrapper = new GuiStackContainer() { ChildAnchor = Alignment.TopFill, Anchor = Alignment.TopLeft }); _textWrapper.Padding = new Thickness(0, 0); _textWrapper.Margin = new Thickness(37, 0, 0, 0); _textWrapper.AddChild(new GuiTextElement() { Text = name, Margin = Thickness.Zero }); _textWrapper.AddChild(new GuiTextElement() { Text = description, Margin = new Thickness(0, 0, 5, 0), //Anchor = center }); AddChild(_loadedIcon = new LoadIcon() { Anchor = Alignment.TopRight, AutoSizeMode = AutoSizeMode.None }); }
//private public HealthBarHeart() { Width = 9; Height = 9; AddChild(Texture = new GuiTextureElement() { Anchor = Alignment.TopLeft, Height = 9, Width = 9, //Margin = new Thickness(4, 4) }); }
private GuiServerListEntryElement(IServerQueryProvider queryProvider, string serverName, string serverAddress) { QueryProvider = queryProvider; SetFixedSize(355, 36); ServerName = serverName; ServerAddress = serverAddress; Margin = new Thickness(5, 5, 5, 5); Padding = Thickness.One; Anchor = Alignment.TopFill; AddChild(_serverIcon = new GuiTextureElement() { Width = ServerIconSize, Height = ServerIconSize, Anchor = Alignment.TopLeft, Background = GuiTextures.DefaultServerIcon, }); AddChild(_pingStatus = new GuiConnectionPingIcon() { Anchor = Alignment.TopRight, }); AddChild(_textWrapper = new GuiStackContainer() { ChildAnchor = Alignment.TopFill, Anchor = Alignment.TopLeft }); _textWrapper.Padding = new Thickness(0, 0); _textWrapper.Margin = new Thickness(ServerIconSize + 5, 0, 0, 0); _textWrapper.AddChild(_serverName = new GuiTextElement() { Text = ServerName, Margin = Thickness.Zero }); _textWrapper.AddChild(_serverMotd = new GuiTextElement() { TranslationKey = "multiplayer.status.pinging", Margin = new Thickness(0, 0, 5, 0), //Anchor = center }); }
public GuiInventoryItem() { Height = 18; Width = 18; AddChild(Texture = new GuiTextureElement() { Anchor = Alignment.TopLeft, Height = 16, Width = 16, Margin = new Thickness(4, 4) }); AddChild(_counTextElement = new GuiTextElement() { TextColor = TextColor.White, Anchor = Alignment.BottomRight, Text = "", Scale = 0.75f, Margin = new Thickness(0, 0, 5, 3) }); }