mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-09 23:40:49 +02:00
lock icon on unpublished saves
This commit is contained in:
@@ -1646,6 +1646,7 @@ std::vector<SaveInfo*> * Client::SearchSaves(int start, int count, std::string q
|
|||||||
json::String tempUsername = savesArray[j]["Username"];
|
json::String tempUsername = savesArray[j]["Username"];
|
||||||
json::String tempName = savesArray[j]["Name"];
|
json::String tempName = savesArray[j]["Name"];
|
||||||
json::Number tempVersion = savesArray[j]["Version"];
|
json::Number tempVersion = savesArray[j]["Version"];
|
||||||
|
json::Boolean tempPublished = savesArray[j]["Published"];
|
||||||
SaveInfo * tempSaveInfo = new SaveInfo(
|
SaveInfo * tempSaveInfo = new SaveInfo(
|
||||||
tempID.Value(),
|
tempID.Value(),
|
||||||
tempDate.Value(),
|
tempDate.Value(),
|
||||||
@@ -1655,6 +1656,7 @@ std::vector<SaveInfo*> * Client::SearchSaves(int start, int count, std::string q
|
|||||||
tempName.Value()
|
tempName.Value()
|
||||||
);
|
);
|
||||||
tempSaveInfo->Version = tempVersion.Value();
|
tempSaveInfo->Version = tempVersion.Value();
|
||||||
|
tempSaveInfo->SetPublished(tempPublished);
|
||||||
saveArray->push_back(tempSaveInfo);
|
saveArray->push_back(tempSaveInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -247,6 +247,11 @@ void SaveButton::Draw(const Point& screenPos)
|
|||||||
g->drawtext(x, y, "\xA6", 160, 70, 50, 255);
|
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)
|
if(file)
|
||||||
{
|
{
|
||||||
|
@@ -37,7 +37,7 @@ private:
|
|||||||
void notifyShowOwnChanged();
|
void notifyShowOwnChanged();
|
||||||
void notifyShowFavouriteChanged();
|
void notifyShowFavouriteChanged();
|
||||||
|
|
||||||
//Variables and methods for backgroun save request
|
//Variables and methods for background save request
|
||||||
bool saveListLoaded;
|
bool saveListLoaded;
|
||||||
bool updateSaveListWorking;
|
bool updateSaveListWorking;
|
||||||
volatile bool updateSaveListFinished;
|
volatile bool updateSaveListFinished;
|
||||||
|
Reference in New Issue
Block a user