From a182e925fe632567ab620b93c98a40d934605b38 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 20 Nov 2014 22:44:02 -0500 Subject: [PATCH] some elementpallete fixes + fix SPAWN2 ToolButton --- src/gui/game/ToolButton.cpp | 4 ++++ src/simulation/Simulation.cpp | 11 +++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/gui/game/ToolButton.cpp b/src/gui/game/ToolButton.cpp index 3b3170b754..520970a071 100644 --- a/src/gui/game/ToolButton.cpp +++ b/src/gui/game/ToolButton.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) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 923aef3e88..34d7ea1666 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -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])