You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Creates a new <see cref="ButtonDisplayStyle"/> for buttons that do not have a background color. These buttons will not obey the <see cref="Model.ProjectPreferences.iconScale"/> setting.
26
+
/// </summary>
27
+
/// <param name="size">The icon size. The production tables use size 3.</param>
28
+
/// <param name="milestoneDisplay">The <see cref="MilestoneDisplay"/> option to use when drawing the icon.</param>
Copy file name to clipboardExpand all lines: Yafc/Widgets/ImmediateWidgets.cs
+54-25Lines changed: 54 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,40 @@
8
8
usingYafc.UI;
9
9
10
10
namespaceYafc{
11
+
12
+
// Contained draws the milestone like this
13
+
// +----+
14
+
// | |
15
+
// | +-+
16
+
// | | |
17
+
// +--+-+
18
+
// Normal draws the milestone like this
19
+
// +----+
20
+
// | |
21
+
// | |
22
+
// | +-+
23
+
// +---| |
24
+
// +-+
11
25
publicenumMilestoneDisplay{
26
+
/// <summary>
27
+
/// Draw the highest locked milestone centered on the lower-right corner of the base icon.
28
+
/// </summary>
12
29
Normal,
30
+
/// <summary>
31
+
/// Draw the highest locked milestone with its lower-right corner aligned with the lower-right corner of the base icon.
32
+
/// </summary>
13
33
Contained,
14
-
All,
15
-
AllContained,
34
+
/// <summary>
35
+
/// Draw the highest milestone, regardless of (un)lock state, centered on the lower-right corner of the base icon.
36
+
/// </summary>
37
+
Always,
38
+
/// <summary>
39
+
/// Draw the highest milestone, regardless of (un)lock state, with its lower-right corner aligned with the lower-right corner of the base icon.
40
+
/// </summary>
41
+
ContainedAlways,
42
+
/// <summary>
43
+
/// Do not draw a milestone icon.
44
+
/// </summary>
16
45
None
17
46
}
18
47
@@ -32,26 +61,26 @@ public enum Click {
32
61
publicstaticclassImmediateWidgets{
33
62
/// <summary>Draws the icon belonging to a <see cref="FactorioObject"/>, or an empty box as a placeholder if no object is available.</summary>
34
63
/// <param name="obj">Draw the icon for this object, or an empty box if this is <see langword="null"/>.</param>
35
-
/// <param name="useScale">If <see langword="true"/>, this icon will be displayed at <see cref="ProjectPreferences.iconScale"/>, instead of at 100% scale.</param>
@@ -109,15 +138,15 @@ public static Click BuildFactorioObjectButton(this ImGui gui, Rect rect, Factori
109
138
110
139
/// <summary>Draws a button displaying the icon belonging to a <see cref="FactorioObject"/>, or an empty box as a placeholder if no object is available.</summary>
111
140
/// <param name="obj">Draw the icon for this object, or an empty box if this is <see langword="null"/>.</param>
112
-
/// <param name="useScale">If <see langword="true"/>, this icon will be displayed at <see cref="ProjectPreferences.iconScale"/>, instead of at 100% scale.</param>
/// <param name="goods">Draw the icon for this object, or an empty box if this is <see langword="null"/>.</param>
206
235
/// <param name="amount">Display this value and unit.</param>
207
236
/// <param name="useScale">If <see langword="true"/>, this icon will be displayed at <see cref="ProjectPreferences.iconScale"/>, instead of at 100% scale.</param>
/// <param name="amount">Display this value and unit. If the user edits the value, the new value will be stored in <see cref="DisplayAmount.Value"/> before returning.</param>
266
295
/// <param name="allowScroll">If <see langword="true"/>, the default, the user can adjust the value by using the scroll wheel while hovering over the editable text.
267
296
/// If <see langword="false"/>, the scroll wheel will be ignored when hovering.</param>
0 commit comments