public StatusControl(ClientMagazineBarrelComponent parent) { _parent = parent; SizeFlagsHorizontal = SizeFlags.FillExpand; SizeFlagsVertical = SizeFlags.ShrinkCenter; AddChild(new VBoxContainer { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsVertical = SizeFlags.ShrinkCenter, SeparationOverride = 0, Children = { (_bulletsListTop = new HBoxContainer { SeparationOverride = 0 }), new HBoxContainer { SizeFlagsHorizontal = SizeFlags.FillExpand, Children = { new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, Children = { (_bulletsListBottom = new HBoxContainer { SizeFlagsVertical = SizeFlags.ShrinkCenter, SeparationOverride = 0 }), (_noMagazineLabel = new Label { Text = "No Magazine!", StyleClasses ={ StyleNano.StyleClassItemStatus } }) } }, (_chamberedBullet = new TextureRect { Texture = StaticIoC.ResC.GetTexture("/Textures/Interface/ItemStatus/Bullets/chambered.png"), SizeFlagsVertical = SizeFlags.ShrinkCenter, SizeFlagsHorizontal = SizeFlags.ShrinkEnd | SizeFlags.Fill, }) } } } }); }
public StatusControl(ClientMagazineBarrelComponent parent) { _parent = parent; SizeFlagsHorizontal = SizeFlags.FillExpand; SizeFlagsVertical = SizeFlags.ShrinkCenter; AddChild(new HBoxContainer { SizeFlagsHorizontal = SizeFlags.FillExpand, Children = { (_chamberedBullet = new TextureRect { Texture = StaticIoC.ResC.GetTexture("/Textures/Interface/ItemStatus/Bullets/chambered_rotated.png"), SizeFlagsVertical = SizeFlags.ShrinkCenter, SizeFlagsHorizontal = SizeFlags.ShrinkEnd | SizeFlags.Fill, }), new Control() { CustomMinimumSize = (5,0) },