SaveTool: change how story progress is handled.
This commit is contained in:
parent
51602c713a
commit
9a9c08391a
2 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ struct StoryProgressPoint {
|
||||||
Int id;
|
Int id;
|
||||||
const char* chapter;
|
const char* chapter;
|
||||||
const char* point;
|
const char* point;
|
||||||
const char* after = "";
|
const char* after = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const Corrade::Containers::Array<StoryProgressPoint> story_progress
|
static const Corrade::Containers::Array<StoryProgressPoint> story_progress
|
||||||
|
|
|
@ -188,7 +188,7 @@ void SaveTool::drawGeneralInfo() {
|
||||||
{
|
{
|
||||||
ImGui::TextUnformatted("Story progress:");
|
ImGui::TextUnformatted("Story progress:");
|
||||||
ImGui::SameLine(0.0f, ImGui::GetStyle().ItemSpacing.x / 4.0f);
|
ImGui::SameLine(0.0f, ImGui::GetStyle().ItemSpacing.x / 4.0f);
|
||||||
if(std::strcmp(it->after, "") == 0) {
|
if(!it->after) {
|
||||||
ImGui::TextWrapped("%s - %s", it->chapter, it->point);
|
ImGui::TextWrapped("%s - %s", it->chapter, it->point);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -261,7 +261,7 @@ void SaveTool::drawGeneralInfo() {
|
||||||
}
|
}
|
||||||
for(const auto& sp : story_progress) {
|
for(const auto& sp : story_progress) {
|
||||||
if(ImGui::BeginMenu(sp.chapter)) {
|
if(ImGui::BeginMenu(sp.chapter)) {
|
||||||
if(std::strcmp(sp.after, "") == 0) {
|
if(!sp.after) {
|
||||||
if(ImGui::MenuItem(sp.point)) {
|
if(ImGui::MenuItem(sp.point)) {
|
||||||
if(!_currentProfile->setStoryProgress(sp.id)) {
|
if(!_currentProfile->setStoryProgress(sp.id)) {
|
||||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error",
|
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error",
|
||||||
|
|
Loading…
Reference in a new issue