From 68d6df49d3327436cc80f978dbca102d5712ed35 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Sat, 18 Apr 2020 15:55:09 +0100 Subject: [PATCH] add set_ui_mode() method Closes #242 --- steam/client/builtins/user.py | 11 +++++++++++ steam/enums/common.py | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/steam/client/builtins/user.py b/steam/client/builtins/user.py index fdf2c15..106176c 100644 --- a/steam/client/builtins/user.py +++ b/steam/client/builtins/user.py @@ -135,3 +135,14 @@ class User(object): self.send(MsgProto(EMsg.ClientGamesPlayed), {'games_played': [{'game_id': app_id} for app_id in app_ids]} ) + + def set_ui_mode(self, uimode): + """ + Set UI mode. Show little icon next to name in friend list. (e.g phone, controller, other) + + :param uimode: UI mode integer + :type uimode: :class:`EClientUIMode` + + These app ids will be recorded in :attr:`current_games_played`. + """ + self.send(MsgProto(EMsg.ClientCurrentUIMode), {'uimode': EClientUIMode(uimode)}) diff --git a/steam/enums/common.py b/steam/enums/common.py index 7d553e9..3ace637 100644 --- a/steam/enums/common.py +++ b/steam/enums/common.py @@ -803,6 +803,13 @@ class EAppType(SteamIntEnum): DepotOnly = -2147483648 +class EClientUIMode(SteamIntEnum): + Desktop = 0 + BigPicture = 1 + Mobile = 2 + Web = 3 + + # Do not remove from enum import EnumMeta