diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-12-11 23:53:14 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-12-11 23:53:14 +0100 |
commit | 13b293dd6518f8e3c80afd6fe40629e3caee69dc (patch) | |
tree | 1af24d9e9e0ea426138f18d24c7bfbeab7803d9b /api/logic/minecraft/WorldList.cpp | |
parent | de568b32b85b24fb24fdec2bc90066bf00b2f013 (diff) | |
download | PrismLauncher-13b293dd6518f8e3c80afd6fe40629e3caee69dc.tar.gz PrismLauncher-13b293dd6518f8e3c80afd6fe40629e3caee69dc.tar.bz2 PrismLauncher-13b293dd6518f8e3c80afd6fe40629e3caee69dc.zip |
GH-2374 fix missing alternating backgrounds in worlds, add gametype column
Diffstat (limited to 'api/logic/minecraft/WorldList.cpp')
-rw-r--r-- | api/logic/minecraft/WorldList.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/api/logic/minecraft/WorldList.cpp b/api/logic/minecraft/WorldList.cpp index 79a5bf38..827b2d63 100644 --- a/api/logic/minecraft/WorldList.cpp +++ b/api/logic/minecraft/WorldList.cpp @@ -138,7 +138,7 @@ bool WorldList::deleteWorlds(int first, int last) int WorldList::columnCount(const QModelIndex &parent) const { - return 2; + return 3; } QVariant WorldList::data(const QModelIndex &index, int role) const @@ -161,6 +161,9 @@ QVariant WorldList::data(const QModelIndex &index, int role) const case NameColumn: return world.name(); + case GameModeColumn: + return gameTypeToString(world.gameType()); + case LastPlayedColumn: return world.lastPlayed(); @@ -206,6 +209,8 @@ QVariant WorldList::headerData(int section, Qt::Orientation orientation, int rol { case NameColumn: return tr("Name"); + case GameModeColumn: + return tr("Game Mode"); case LastPlayedColumn: return tr("Last Played"); default: @@ -217,6 +222,8 @@ QVariant WorldList::headerData(int section, Qt::Orientation orientation, int rol { case NameColumn: return tr("The name of the world."); + case GameModeColumn: + return tr("Game mode of the world."); case LastPlayedColumn: return tr("Date and time the world was last played."); default: |