test flatten

This commit is contained in:
Robin Appelman 2023-12-18 18:24:58 +01:00
commit feeb1aa3a4
2 changed files with 25 additions and 21 deletions

View file

@ -74,11 +74,17 @@ struct UserConfigDataSteamCached {
} }
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
struct UserConfigDataFriendsMainDialog { struct DialogPos {
xpos: u32, xpos: u32,
ypos: u32, ypos: u32,
wide: u16, wide: u16,
tall: u16, tall: u16,
}
#[derive(Debug, Serialize, Deserialize)]
struct UserConfigDataFriendsMainDialog {
#[serde(flatten)]
pos: DialogPos,
#[serde(rename = "FriendPanelSelf")] #[serde(rename = "FriendPanelSelf")]
friends_panel_self: BTreeMap<String, String>, friends_panel_self: BTreeMap<String, String>,
#[serde(rename = "FriendsDialogSheet")] #[serde(rename = "FriendsDialogSheet")]
@ -109,10 +115,8 @@ struct UserConfigDataServers {
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
struct UserConfigDataServersDialog { struct UserConfigDataServersDialog {
xpos: u32, #[serde(flatten)]
ypos: u32, pos: DialogPos,
wide: u16,
tall: u16,
#[serde(rename = "GameTabs")] #[serde(rename = "GameTabs")]
game_tabs: UserConfigDataServersDialogGameTabs, game_tabs: UserConfigDataServersDialogGameTabs,
} }

View file

@ -8,13 +8,13 @@ UserConfigData(
r#OverlaySplash.res: {}, r#OverlaySplash.res: {},
), ),
), ),
FriendsMainDialog: UserConfigDataFriendsMainDialog( FriendsMainDialog: {
xpos: 1028, "xpos": 1028,
ypos: 280, "ypos": 280,
wide: 252, "wide": 252,
tall: 440, "tall": 440,
FriendPanelSelf: {}, "FriendPanelSelf": {},
FriendsDialogSheet: UserConfigDataFriendsMainDialogFriendsDialogSheet( "FriendsDialogSheet": UserConfigDataFriendsMainDialogFriendsDialogSheet(
FriendsFriendsPage: UserConfigDataFriendsMainDialogFriendsDialogSheetFriendsPage( FriendsFriendsPage: UserConfigDataFriendsMainDialogFriendsDialogSheetFriendsPage(
BuddyList: { BuddyList: {
"0_collapsed": false, "0_collapsed": false,
@ -35,15 +35,15 @@ UserConfigData(
}, },
), ),
), ),
FriendsState: {}, "FriendsState": {},
), },
Servers: UserConfigDataServers( Servers: UserConfigDataServers(
r#DialogServerBrowser.res: UserConfigDataServersDialog( r#DialogServerBrowser.res: {
xpos: 0, "xpos": 0,
ypos: 0, "ypos": 0,
wide: 1280, "wide": 1280,
tall: 720, "tall": 720,
GameTabs: UserConfigDataServersDialogGameTabs( "GameTabs": UserConfigDataServersDialogGameTabs(
InternetGames: GameListHaver( InternetGames: GameListHaver(
gamelist: GameList( gamelist: GameList(
r##ServerBrowser_Password_hidden: false, r##ServerBrowser_Password_hidden: false,
@ -147,6 +147,6 @@ UserConfigData(
), ),
), ),
), ),
), },
), ),
) )