implement HDD saving by default in GameView. update tooltips to describe behaviour.
This commit is contained in:
parent
424d1d4b47
commit
7145cacbb9
@ -224,7 +224,7 @@ GameView::GameView():
|
|||||||
scrollBar->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
scrollBar->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
AddComponent(scrollBar);
|
AddComponent(scrollBar);
|
||||||
|
|
||||||
searchButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(17, 15), "", "Find & open a simulation"); //Open
|
searchButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(17, 15), "", "Find & open a simulation. Hold Ctrl to load offline saves."); //Open
|
||||||
searchButton->SetIcon(IconOpen);
|
searchButton->SetIcon(IconOpen);
|
||||||
currentX+=18;
|
currentX+=18;
|
||||||
searchButton->SetTogglable(false);
|
searchButton->SetTogglable(false);
|
||||||
@ -259,14 +259,14 @@ GameView::GameView():
|
|||||||
SaveSimulationAction(GameView * _v) { v = _v; }
|
SaveSimulationAction(GameView * _v) { v = _v; }
|
||||||
void ActionCallbackRight(ui::Button * sender)
|
void ActionCallbackRight(ui::Button * sender)
|
||||||
{
|
{
|
||||||
if(v->CtrlBehaviour())
|
if(v->CtrlBehaviour() || !v->loggedIn)
|
||||||
v->c->OpenLocalSaveWindow(false);
|
v->c->OpenLocalSaveWindow(false);
|
||||||
else
|
else
|
||||||
v->c->OpenSaveWindow();
|
v->c->OpenSaveWindow();
|
||||||
}
|
}
|
||||||
void ActionCallbackLeft(ui::Button * sender)
|
void ActionCallbackLeft(ui::Button * sender)
|
||||||
{
|
{
|
||||||
if(v->CtrlBehaviour())
|
if(v->CtrlBehaviour() || !v->loggedIn)
|
||||||
v->c->OpenLocalSaveWindow(true);
|
v->c->OpenLocalSaveWindow(true);
|
||||||
else
|
else
|
||||||
v->c->SaveAsCurrent();
|
v->c->SaveAsCurrent();
|
||||||
@ -877,7 +877,8 @@ void GameView::NotifyUserChanged(GameModel * sender)
|
|||||||
|
|
||||||
loggedIn = true;
|
loggedIn = true;
|
||||||
}
|
}
|
||||||
saveSimulationButtonEnabled = sender->GetUser().ID;
|
// saveSimulationButtonEnabled = sender->GetUser().ID;
|
||||||
|
saveSimulationButtonEnabled = true;
|
||||||
NotifySaveChanged(sender);
|
NotifySaveChanged(sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1951,7 +1952,7 @@ void GameView::enableCtrlBehaviour(bool isHighlighted)
|
|||||||
searchButton->Appearance.TextInactive = searchButton->Appearance.TextHover = ui::Colour(0, 0, 0);
|
searchButton->Appearance.TextInactive = searchButton->Appearance.TextHover = ui::Colour(0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
searchButton->SetToolTip("Open a simulation from your hard drive");
|
searchButton->SetToolTip("Open a simulation from your hard drive.");
|
||||||
if (currentSaveType == 2)
|
if (currentSaveType == 2)
|
||||||
((SplitButton*)saveSimulationButton)->SetShowSplit(true);
|
((SplitButton*)saveSimulationButton)->SetShowSplit(true);
|
||||||
if(isMouseDown || (toolBrush && drawMode == DrawPoints))
|
if(isMouseDown || (toolBrush && drawMode == DrawPoints))
|
||||||
@ -1979,7 +1980,7 @@ void GameView::disableCtrlBehaviour()
|
|||||||
searchButton->Appearance.BackgroundInactive = ui::Colour(0, 0, 0);
|
searchButton->Appearance.BackgroundInactive = ui::Colour(0, 0, 0);
|
||||||
searchButton->Appearance.BackgroundHover = ui::Colour(20, 20, 20);
|
searchButton->Appearance.BackgroundHover = ui::Colour(20, 20, 20);
|
||||||
searchButton->Appearance.TextInactive = searchButton->Appearance.TextHover = ui::Colour(255, 255, 255);
|
searchButton->Appearance.TextInactive = searchButton->Appearance.TextHover = ui::Colour(255, 255, 255);
|
||||||
searchButton->SetToolTip("Find & open a simulation");
|
searchButton->SetToolTip("Find & open a simulation. Hold Ctrl to load offline saves.");
|
||||||
if (currentSaveType == 2)
|
if (currentSaveType == 2)
|
||||||
((SplitButton*)saveSimulationButton)->SetShowSplit(false);
|
((SplitButton*)saveSimulationButton)->SetShowSplit(false);
|
||||||
if(!shiftBehaviour)
|
if(!shiftBehaviour)
|
||||||
@ -1991,8 +1992,8 @@ void GameView::disableCtrlBehaviour()
|
|||||||
|
|
||||||
void GameView::SetSaveButtonTooltips()
|
void GameView::SetSaveButtonTooltips()
|
||||||
{
|
{
|
||||||
if (ctrlBehaviour)
|
if (ctrlBehaviour || !loggedIn)
|
||||||
((SplitButton*)saveSimulationButton)->SetToolTips("Save the simulation to your hard drive", "Save the simulation to your hard drive");
|
((SplitButton*)saveSimulationButton)->SetToolTips("Save the simulation to your hard drive. Login to save online.", "Save the simulation to your hard drive. Login to save online.");
|
||||||
else if (((SplitButton*)saveSimulationButton)->GetShowSplit())
|
else if (((SplitButton*)saveSimulationButton)->GetShowSplit())
|
||||||
((SplitButton*)saveSimulationButton)->SetToolTips("Reupload the current simulation", "Modify simulation properties");
|
((SplitButton*)saveSimulationButton)->SetToolTips("Reupload the current simulation", "Modify simulation properties");
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user