summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-09-29 20:24:20 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-29 22:03:02 (GMT)
commitb3741cd67cdd0c5cf5934be40716a63de71b0abc (patch)
tree10f12e77937e26e61ef4a7343f2c7e0687bfc8f7 /src
parent006dfdf5966bb2d593e7b0239b8079b3b74e8e0e (diff)
downloadpowder-b3741cd67cdd0c5cf5934be40716a63de71b0abc.zip
powder-b3741cd67cdd0c5cf5934be40716a63de71b0abc.tar.gz
lock icon on unpublished saves
Diffstat (limited to 'src')
-rw-r--r--src/client/Client.cpp2
-rw-r--r--src/interface/SaveButton.cpp5
-rw-r--r--src/search/SearchModel.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/client/Client.cpp b/src/client/Client.cpp
index 051dfcd..1490f5f 100644
--- a/src/client/Client.cpp
+++ b/src/client/Client.cpp
@@ -1646,6 +1646,7 @@ std::vector<SaveInfo*> * Client::SearchSaves(int start, int count, std::string q
json::String tempUsername = savesArray[j]["Username"];
json::String tempName = savesArray[j]["Name"];
json::Number tempVersion = savesArray[j]["Version"];
+ json::Boolean tempPublished = savesArray[j]["Published"];
SaveInfo * tempSaveInfo = new SaveInfo(
tempID.Value(),
tempDate.Value(),
@@ -1655,6 +1656,7 @@ std::vector<SaveInfo*> * Client::SearchSaves(int start, int count, std::string q
tempName.Value()
);
tempSaveInfo->Version = tempVersion.Value();
+ tempSaveInfo->SetPublished(tempPublished);
saveArray->push_back(tempSaveInfo);
}
}
diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp
index bf91839..ef40c08 100644
--- a/src/interface/SaveButton.cpp
+++ b/src/interface/SaveButton.cpp
@@ -247,6 +247,11 @@ void SaveButton::Draw(const Point& screenPos)
g->drawtext(x, y, "\xA6", 160, 70, 50, 255);
}
}
+ if (!save->GetPublished())
+ {
+ g->drawtext(screenPos.X, screenPos.Y-2, "\xCD", 255, 255, 255, 255);
+ g->drawtext(screenPos.X, screenPos.Y-2, "\xCE", 212, 151, 81, 255);
+ }
}
if(file)
{
diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h
index c894090..9e93f05 100644
--- a/src/search/SearchModel.h
+++ b/src/search/SearchModel.h
@@ -37,7 +37,7 @@ private:
void notifyShowOwnChanged();
void notifyShowFavouriteChanged();
- //Variables and methods for backgroun save request
+ //Variables and methods for background save request
bool saveListLoaded;
bool updateSaveListWorking;
volatile bool updateSaveListFinished;