Permalink
Browse files

some elementpallete fixes + fix SPAWN2 ToolButton

  • Loading branch information...
jacob1 committed Nov 21, 2014
1 parent 6ce2d5f commit a182e925fe632567ab620b93c98a40d934605b38
Showing with 9 additions and 6 deletions.
  1. +4 −0 src/gui/game/ToolButton.cpp
  2. +5 −6 src/simulation/Simulation.cpp
@@ -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)
@@ -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])

0 comments on commit a182e92

Please sign in to comment.