summaryrefslogtreecommitdiff
path: root/colbuf.go
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-10-31 21:07:34 +0100
committerKevin Chabowski <kevin@kch42.de>2013-10-31 21:07:34 +0100
commit2d55d25eaa27227c306c97928f8ca5205a7e63e3 (patch)
tree70be54992c0876935533b5a8665f73fa84e2109c /colbuf.go
parente2730e8e796bf05cfb0681068e40d0c8fb6228b2 (diff)
downloadbiomed-2d55d25eaa27227c306c97928f8ca5205a7e63e3.tar.gz
biomed-2d55d25eaa27227c306c97928f8ca5205a7e63e3.tar.bz2
biomed-2d55d25eaa27227c306c97928f8ca5205a7e63e3.zip
Preparing editable biomes.
Most stuff doesnt update correctly now...
Diffstat (limited to 'colbuf.go')
-rw-r--r--colbuf.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/colbuf.go b/colbuf.go
new file mode 100644
index 0000000..429bf6c
--- /dev/null
+++ b/colbuf.go
@@ -0,0 +1,17 @@
+package main
+
+import (
+ "github.com/mattn/go-gtk/gdk"
+)
+
+type ColorBuffer map[string]*gdk.Color
+
+func (cb ColorBuffer) Color(name string) *gdk.Color {
+ if col, ok := cb[name]; ok {
+ return col
+ }
+
+ col := gdk.NewColor(name)
+ cb[name] = col
+ return col
+}