Changeset 254 for cpp


Ignore:
Timestamp:
11/18/14 17:02:05 (10 years ago)
Author:
Maciej Komosinski
Message:

More color definitions in neural diagrams

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/canvas/neurodiagram.cpp

    r247 r254  
    243243
    244244NeuroSymbol::NeuroSymbol(NeuroDiagram &nd, Neuro * _n)
    245 :selected(0), n(_n), diagram(nd)
     245        :selected(0), n(_n), diagram(nd), FramDrawToolkit(nd.getColorDefs())
    246246{
    247247        tooltip = "#";
     
    261261        if (selected)
    262262        {
    263                 setColor(255, 255, 255);
     263                setColor(ColorDefs::neuroselection);
    264264                fillRect(0, 0, size.x, size.y);
    265265        }
     
    271271        {
    272272                const char* t = label;
     273                setColor(ColorDefs::neurosymbol);
    273274                drawAlignedText(size.x / 2, size.y - textHeight(), 0, t);
    274275
     
    325326                int xw = yw / 4; // x coordinate of the first corner point, depends on yw to avoid overlapping between inputs
    326327                drawLine(size.x / 4, yw, xw, yw); // first horizontal segment (to the left)
    327                 diagram.setWireColor(ns2->n->state, 0);
     328                if (diagram.isLive())
     329                        diagram.setWireColor(ns2->n->state, 0);
    328330                // linetype: 1 (default) - draw straight or U-shape depending on layout
    329331                //           0 (debug option) - only draw straight lines
     
    442444NeuroProbe::NeuroProbe(NeuroSymbol* ns)
    443445:DCanvasWindow(DCanvasWindow::Title + DCanvasWindow::Border + DCanvasWindow::Close + DCanvasWindow::Size,
    444 (const char*)ns->getLabel(), &neurochart, &neurochart)
     446  (const char*)ns->getLabel(), &neurochart, &neurochart)
    445447{
    446448        holdismine = 0;
Note: See TracChangeset for help on using the changeset viewer.