protected void OnResetColors(object o, EventArgs args) { MapDrawingArea defaults = new MapDrawingArea(); defaults.DefaultColors(); LoadColors(defaults); }
public PreferencesDialog(Window parent, MapDrawingArea drawingArea, Editor theEditor) { Glade.XML gxml = new Glade.XML(null, "preferences.glade", "dialog1", null); gxml.Autoconnect(this); dialog1.TransientFor = parent; area = drawingArea; editor = theEditor; }
void LoadColors(MapDrawingArea a) { backgroundColor.Color = ToGDK(a.backgroundColor); gridColor.Color = ToGDK(a.gridLineColor); gridPointColor.Color = ToGDK(a.gridPointColor); polygonColor.Color = ToGDK(a.polygonColor); selectedPolygonColor.Color = ToGDK(a.selectedPolygonColor); invalidPolygonColor.Color = ToGDK(a.invalidPolygonColor); destinationPolygonColor.Color = ToGDK(a.destinationPolygonColor); pointColor.Color = ToGDK(a.pointColor); lineColor.Color = ToGDK(a.solidLineColor); transparentLineColor.Color = ToGDK(a.transparentLineColor); impassableLineColor.Color = ToGDK(a.impassableLineColor); selectionColor.Color = ToGDK(a.selectedLineColor); playerColor.Color = ToGDK(a.playerColor); monsterColor.Color = ToGDK(a.monsterColor); civilianColor.Color = ToGDK(a.civilianColor); annotationColor.Color = ToGDK(a.annotationColor); }