-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateButton.cs
More file actions
25 lines (23 loc) · 965 Bytes
/
UpdateButton.cs
File metadata and controls
25 lines (23 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using TimberApi.UIBuilderSystem;
using TimberApi.UIBuilderSystem.CustomElements;
using TimberApi.UIBuilderSystem.ElementBuilders;
using TimberApi.UIBuilderSystem.StyleSheetSystem;
using TimberApi.UIBuilderSystem.StyleSheetSystem.Extensions;
namespace Mods.SteamUpdateButtons {
public class UpdateButton : BaseBuilder<NineSliceButton> {
protected override NineSliceButton InitializeRoot() {
return UIBuilder.Create<ButtonBuilder>()
.AddClass("update-button")
.Build();
}
protected override void InitializeStyleSheet(StyleSheetBuilder styleSheetBuilder) {
styleSheetBuilder
.AddBackgroundHoverClass("update-button", "ui/images/buttons/migration/allow-emigration", "ui/images/buttons/migration/allow-emigration-hover")
.AddClass("update-button", builder => builder
.ClickSound("UI.Click")
.Height(28)
.Width(28)
.MarginLeft(7));
}
}
}