click a preset once to select it, twice to switch to deco set tool. Prevent changing middle selected element in the deco editor
This commit is contained in:
parent
4243987acd
commit
a98fb2092d
@ -974,7 +974,6 @@ void GameController::SetColour(ui::Colour colour)
|
||||
void GameController::SetActiveMenu(int menuID)
|
||||
{
|
||||
gameModel->SetActiveMenu(menuID);
|
||||
vector<Menu*> menuList = gameModel->GetMenuList();
|
||||
if(menuID == SC_DECO)
|
||||
gameModel->SetColourSelectorVisibility(true);
|
||||
else
|
||||
@ -998,6 +997,8 @@ Tool * GameController::GetActiveTool(int selection)
|
||||
|
||||
void GameController::SetActiveTool(int toolSelection, Tool * tool)
|
||||
{
|
||||
if (gameModel->GetActiveMenu() == SC_DECO && toolSelection == 2)
|
||||
toolSelection = 0;
|
||||
gameModel->SetActiveTool(toolSelection, tool);
|
||||
gameModel->GetRenderer()->gravityZonesEnabled = false;
|
||||
gameModel->SetLastTool(tool);
|
||||
|
@ -333,8 +333,8 @@ void GameModel::BuildMenus()
|
||||
menuList[SC_DECO]->AddTool(new DecorationTool(DECO_MULTIPLY, "MUL", "Colour blending: Multiply.", 0, 0, 0, "DEFAULT_DECOR_MUL"));
|
||||
menuList[SC_DECO]->AddTool(new DecorationTool(DECO_DIVIDE, "DIV", "Colour blending: Divide." , 0, 0, 0, "DEFAULT_DECOR_DIV"));
|
||||
menuList[SC_DECO]->AddTool(new DecorationTool(DECO_SMUDGE, "SMDG", "Smudge tool, blends surrounding deco together.", 0, 0, 0, "DEFAULT_DECOR_SMDG"));
|
||||
menuList[SC_DECO]->AddTool(new DecorationTool(DECO_DRAW, "SET", "Draw decoration (No blending).", 0, 0, 0, "DEFAULT_DECOR_SET"));
|
||||
menuList[SC_DECO]->AddTool(new DecorationTool(DECO_CLEAR, "CLR", "Erase any set decoration.", 0, 0, 0, "DEFAULT_DECOR_CLR"));
|
||||
menuList[SC_DECO]->AddTool(new DecorationTool(DECO_DRAW, "SET", "Draw decoration (No blending).", 0, 0, 0, "DEFAULT_DECOR_SET"));
|
||||
decoToolset[0] = GetToolFromIdentifier("DEFAULT_DECOR_SET");
|
||||
decoToolset[1] = GetToolFromIdentifier("DEFAULT_DECOR_CLR");
|
||||
decoToolset[2] = GetToolFromIdentifier("DEFAULT_UI_SAMPLE");
|
||||
@ -723,7 +723,13 @@ int GameModel::GetZoomFactor()
|
||||
|
||||
void GameModel::SetActiveColourPreset(int preset)
|
||||
{
|
||||
activeColourPreset = preset;
|
||||
if (activeColourPreset != preset)
|
||||
activeColourPreset = preset;
|
||||
else
|
||||
{
|
||||
activeTools[0] = GetToolFromIdentifier("DEFAULT_DECOR_SET");
|
||||
notifyActiveToolsChanged();
|
||||
}
|
||||
notifyColourActivePresetChanged();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user