summaryrefslogtreecommitdiff
path: root/src/linkgraph/linkgraph_gui.h
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2013-10-23 19:42:17 +0000
committerfonsinchen <fonsinchen@openttd.org>2013-10-23 19:42:17 +0000
commit1237e3c48c67c51cfb8a20df6b96c646064bc03a (patch)
treeca7b663b0dd159e2208c48c53c2ef10804b2171a /src/linkgraph/linkgraph_gui.h
parent89b7afbac89eb3aac8871a9853cf12a0d6141dab (diff)
downloadopenttd-1237e3c48c67c51cfb8a20df6b96c646064bc03a.tar.xz
(svn r25912) -Fix [FS#5676]: Draw 'shared' links (involving neutral stations) as dashed lines and show them in every company's link graph overlay.
Diffstat (limited to 'src/linkgraph/linkgraph_gui.h')
-rw-r--r--src/linkgraph/linkgraph_gui.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/linkgraph/linkgraph_gui.h b/src/linkgraph/linkgraph_gui.h
index c1aaccf24..b2d74baa6 100644
--- a/src/linkgraph/linkgraph_gui.h
+++ b/src/linkgraph/linkgraph_gui.h
@@ -23,11 +23,12 @@
* Properties of a link between two stations.
*/
struct LinkProperties {
- LinkProperties() : capacity(0), usage(0), planned(0) {}
+ LinkProperties() : capacity(0), usage(0), planned(0), shared(false) {}
uint capacity; ///< Capacity of the link.
uint usage; ///< Actual usage of the link.
uint planned; ///< Planned usage of the link.
+ bool shared; ///< If this is a shared link to be drawn dashed.
};
/**
@@ -86,7 +87,7 @@ protected:
bool IsPointVisible(Point pt, const DrawPixelInfo *dpi, int padding = 0) const;
void GetWidgetDpi(DrawPixelInfo *dpi) const;
- static void AddStats(uint new_cap, uint new_usg, uint new_flow, LinkProperties &cargo);
+ static void AddStats(uint new_cap, uint new_usg, uint new_flow, bool new_shared, LinkProperties &cargo);
static void DrawVertex(int x, int y, int size, int colour, int border_colour);
};