@@ -42,9 +42,10 @@ public partial class TopHeaderContainer : CompositeDrawable
42
42
private ExternalLinkButton openUserExternally = null ! ;
43
43
private OsuSpriteText titleText = null ! ;
44
44
private UpdateableFlag userFlag = null ! ;
45
- private UpdateableTeamFlag teamFlag = null ! ;
46
45
private OsuHoverContainer userCountryContainer = null ! ;
47
46
private OsuSpriteText userCountryText = null ! ;
47
+ private UpdateableTeamFlag teamFlag = null ! ;
48
+ private OsuSpriteText teamText ;
48
49
private GroupBadgeFlow groupBadgeFlow = null ! ;
49
50
private ToggleCoverButton coverToggle = null ! ;
50
51
private PreviousUsernamesDisplay previousUsernamesDisplay = null ! ;
@@ -161,27 +162,51 @@ private void load(OverlayColourProvider colourProvider, OsuConfigManager configM
161
162
{
162
163
AutoSizeAxes = Axes . Both ,
163
164
Direction = FillDirection . Horizontal ,
165
+ Spacing = new Vector2 ( 10 , 0 ) ,
164
166
Children = new Drawable [ ]
165
167
{
166
- userFlag = new UpdateableFlag
167
- {
168
- Size = new Vector2 ( 28 , 20 ) ,
169
- } ,
170
- teamFlag = new UpdateableTeamFlag
168
+ new FillFlowContainer
171
169
{
172
- Size = new Vector2 ( 40 , 20 ) ,
170
+ AutoSizeAxes = Axes . Both ,
171
+ Direction = FillDirection . Horizontal ,
172
+ Spacing = new Vector2 ( 4 , 0 ) ,
173
+ Children = new Drawable [ ]
174
+ {
175
+ userFlag = new UpdateableFlag
176
+ {
177
+ Size = new Vector2 ( 28 , 20 ) ,
178
+ } ,
179
+ userCountryContainer = new OsuHoverContainer
180
+ {
181
+ AutoSizeAxes = Axes . Both ,
182
+ Anchor = Anchor . CentreLeft ,
183
+ Origin = Anchor . CentreLeft ,
184
+ Child = userCountryText = new OsuSpriteText
185
+ {
186
+ Font = OsuFont . GetFont ( size : 14f , weight : FontWeight . Regular ) ,
187
+ } ,
188
+ } ,
189
+ }
173
190
} ,
174
- userCountryContainer = new OsuHoverContainer
191
+ new FillFlowContainer
175
192
{
176
193
AutoSizeAxes = Axes . Both ,
177
- Anchor = Anchor . CentreLeft ,
178
- Origin = Anchor . CentreLeft ,
179
- Margin = new MarginPadding { Left = 5 } ,
180
- Child = userCountryText = new OsuSpriteText
194
+ Direction = FillDirection . Horizontal ,
195
+ Spacing = new Vector2 ( 4 , 0 ) ,
196
+ Children = new Drawable [ ]
181
197
{
182
- Font = OsuFont . GetFont ( size : 14f , weight : FontWeight . Regular ) ,
183
- } ,
184
- } ,
198
+ teamFlag = new UpdateableTeamFlag
199
+ {
200
+ Size = new Vector2 ( 40 , 20 ) ,
201
+ } ,
202
+ teamText = new OsuSpriteText
203
+ {
204
+ Anchor = Anchor . CentreLeft ,
205
+ Origin = Anchor . CentreLeft ,
206
+ Font = OsuFont . GetFont ( size : 14f , weight : FontWeight . Regular ) ,
207
+ } ,
208
+ }
209
+ }
185
210
}
186
211
} ,
187
212
}
@@ -220,9 +245,10 @@ private void updateUser(UserProfileData? data)
220
245
usernameText . Text = user ? . Username ?? string . Empty ;
221
246
openUserExternally . Link = $@ "{ api . Endpoints . WebsiteUrl } /users/{ user ? . Id ?? 0 } ";
222
247
userFlag . CountryCode = user ? . CountryCode ?? default ;
223
- teamFlag . Team = user ? . Team ;
224
248
userCountryText . Text = ( user ? . CountryCode ?? default ) . GetDescription ( ) ;
225
249
userCountryContainer . Action = ( ) => rankingsOverlay ? . ShowCountry ( user ? . CountryCode ?? default ) ;
250
+ teamFlag . Team = user ? . Team ;
251
+ teamText . Text = user ? . Team ? . Name ?? string . Empty ;
226
252
supporterTag . SupportLevel = user ? . SupportLevel ?? 0 ;
227
253
titleText . Text = user ? . Title ?? string . Empty ;
228
254
titleText . Colour = Color4Extensions . FromHex ( user ? . Colour ?? "fff" ) ;
0 commit comments