Navigation Menu

Skip to content

Commit

Permalink
some elementpallete fixes + fix SPAWN2 ToolButton
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Nov 21, 2014
1 parent 6ce2d5f commit a182e92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/gui/game/ToolButton.cpp
Expand Up @@ -6,6 +6,10 @@ ToolButton::ToolButton(ui::Point position, ui::Point size, std::string text_, st
{
SetSelectionState(-1);
Appearance.BorderActive = ui::Colour(255, 0, 0);

//don't use "..." on elements that have long names
buttonDisplayText = ButtonText;
Component::TextPosition(buttonDisplayText);
}

void ToolButton::OnMouseClick(int x, int y, unsigned int button)
Expand Down
11 changes: 5 additions & 6 deletions src/simulation/Simulation.cpp
Expand Up @@ -92,15 +92,14 @@ int Simulation::Load(int fullX, int fullY, GameSave * save)
continue;

if (tempPart.ctype > 0 && tempPart.ctype < PT_NUM)
if (tempPart.type == PT_CLNE || tempPart.type == PT_PCLN || tempPart.type == PT_BCLN || tempPart.type == PT_PBCN || tempPart.type == PT_STOR || tempPart.type == PT_CONV || tempPart.type == PT_STKM || tempPart.type == PT_STKM2 || tempPart.type == PT_FIGH || tempPart.type == PT_LAVA || tempPart.type == PT_SPRK || tempPart.type == PT_PSTN || tempPart.type == PT_CRAY)
if (tempPart.type == PT_CLNE || tempPart.type == PT_PCLN || tempPart.type == PT_BCLN || tempPart.type == PT_PBCN || tempPart.type == PT_STOR || tempPart.type == PT_CONV || tempPart.type == PT_STKM || tempPart.type == PT_STKM2 || tempPart.type == PT_FIGH || tempPart.type == PT_LAVA || tempPart.type == PT_SPRK || tempPart.type == PT_PSTN || tempPart.type == PT_CRAY || tempPart.type == PT_DTEC || tempPart.type == PT_DRAY)
{
tempPart.ctype = partMap[tempPart.ctype];
}
if (tempPart.tmp > 0 && tempPart.tmp < PT_NUM)
if (tempPart.type == PT_PIPE || tempPart.type == PT_PPIP)
{
tempPart.tmp = partMap[tempPart.tmp];
}
if (tempPart.type == PT_PIPE || tempPart.type == PT_PPIP)
{
tempPart.tmp = partMap[tempPart.tmp&0xFF] | tempPart.tmp&~0xFF;
}

//Replace existing
if (r = pmap[y][x])
Expand Down

0 comments on commit a182e92

Please sign in to comment.