@@ -13,35 +13,63 @@ declare module 'common/account/types' {
13
13
}
14
14
declare module 'common/layout/types' {
15
15
export interface Layout {
16
+ /**
17
+ * Layout configurations for the app window.
18
+ * For example, where the app is displayed on the monitor.
19
+ */
16
20
window : WindowLayout ;
17
- streams : Array < StreamLayout > ;
21
+ /**
22
+ * Layout configurations for each game stream window.
23
+ * For example, where and how the "main" or "room" streams are displayed.
24
+ */
25
+ items : Array < ItemLayout > ;
18
26
}
19
27
/**
20
28
* Layout configuration for the app window.
29
+ * Coordinates are relative to the monitor screen.
21
30
*/
22
31
export interface WindowLayout {
32
+ /**
33
+ * The x-coordinate of the app, in pixels.
34
+ * This is the leftmost edge of the app.
35
+ * This is the absolute position on the monitor screen.
36
+ */
23
37
x : number ;
38
+ /**
39
+ * The y-coordinate of the app, in pixels.
40
+ * This is the topmost edge of the app.
41
+ * This is the absolute position on the monitor screen.
42
+ */
24
43
y : number ;
44
+ /**
45
+ * The width of the app, in pixels.
46
+ */
25
47
width : number ;
48
+ /**
49
+ * The height of the app, in pixels.
50
+ */
26
51
height : number ;
27
52
}
28
53
/**
29
54
* Layout configuration for a game stream.
55
+ * Coordinates are relative to the grid item container.
30
56
*/
31
- export interface StreamLayout {
57
+ export interface ItemLayout {
32
58
/**
33
59
* Game-specific identifier for the stream.
34
60
* For example, "percWindow" for the active spells stream.
61
+ * For the main catch-all stream, use "main" instead of empty string.
35
62
*/
36
63
id : string ;
37
64
/**
38
65
* Title to display for the stream in the app.
66
+ * For example, "Active Spells" or "Inventory".
39
67
*/
40
68
title : string ;
41
69
/**
42
70
* Whether the stream is displayed in the app.
43
71
* When false then this stream's content can be redirected to
44
- * another stream window using the `whenHiddenStreamToId ` property.
72
+ * another stream window using the `whenHiddenRedirectToId ` property.
45
73
*/
46
74
visible : boolean ;
47
75
/**
@@ -71,33 +99,38 @@ declare module 'common/layout/types' {
71
99
textFont : string ;
72
100
/**
73
101
* The font size to use for the stream content, in pixels.
102
+ * Example: 12.
74
103
*/
75
104
textSize : number ;
76
105
/**
77
106
* The color of the text in the stream content.
107
+ * Can be color names (e.g. 'blue') or hex codes ('#00FF00').
78
108
*/
79
109
foregroundColor : string ;
80
110
/**
81
111
* The color of the background in the stream content.
112
+ * Can be color names (e.g. 'blue') or hex codes ('#00FF00').
82
113
*/
83
114
backgroundColor : string ;
84
115
/**
85
116
* When this stream is not visible, redirect its content to another stream.
86
117
* If that stream is also not visible, then it continues to be redirected
87
118
* until either a visible stream in the chain is found or not.
88
119
*
89
- * Example Scenario
90
- * ----------------
91
- * When StreamA is hidden it redirects to StreamB.
92
- * When StreamB is hidden it redirects to STreamC.
93
- * When StreamC is hidden it does not redirect anywhere.
120
+ * Example Scenarios
121
+ * -----------------
122
+ * Given the following configuration:
123
+ * - When StreamA is hidden it redirects to StreamB.
124
+ * - When StreamB is hidden it redirects to StreamC.
125
+ * - When StreamC is hidden it does not redirect anywhere.
94
126
*
95
- * When all streams are visible then their content is displayed as normal.
96
- * When StreamA is hidden, its content is redirected to StreamB.
97
- * When StreamB is also hidden, both StreamA and StreamB redirect to StreamC.
98
- * When StreamC is also hidden, no content is displayed.
127
+ * Then:
128
+ * - When all streams are visible, their content is displayed as normal.
129
+ * - When StreamA is hidden, its content is redirected to StreamB.
130
+ * - When StreamB is also hidden, both StreamA and StreamB redirect to StreamC.
131
+ * - When StreamC is also hidden, no content is displayed.
99
132
*/
100
- whenHiddenStreamToId ?: string ;
133
+ whenHiddenRedirectToId ?: string | null ;
101
134
}
102
135
}
103
136
declare module 'common/logger/types' {
0 commit comments