Allow the poiTitle setting to be tileset-specific. Added docs
Closes #761
This commit is contained in:
@@ -196,18 +196,14 @@ def main():
|
||||
markerSetDict[name]['raw'].append(d)
|
||||
#print markerSetDict
|
||||
|
||||
poiDropdownTitle = config.get('poiDropdownTitle', 'Signs')
|
||||
|
||||
with open(os.path.join(destdir, "markersDB.js"), "w") as output:
|
||||
output.write("var markersDB=")
|
||||
json.dump(markerSetDict, output, indent=2)
|
||||
output.write(";\n");
|
||||
output.write("var poiDropdownTitle = '%s';\n" % poiDropdownTitle)
|
||||
with open(os.path.join(destdir, "markers.js"), "w") as output:
|
||||
output.write("var markers=")
|
||||
json.dump(markers, output, indent=2)
|
||||
output.write(";\n");
|
||||
output.write("var poiDropdownTitle = '%s';\n" % poiDropdownTitle)
|
||||
with open(os.path.join(destdir, "baseMarkers.js"), "w") as output:
|
||||
output.write("overviewer.util.injectMarkerScript('markersDB.js');\n")
|
||||
output.write("overviewer.util.injectMarkerScript('markers.js');\n")
|
||||
|
||||
@@ -440,7 +440,7 @@ overviewer.views.SignControlView = Backbone.View.extend({
|
||||
|
||||
|
||||
var controlText = document.createElement('DIV');
|
||||
controlText.innerHTML = poiDropdownTitle;
|
||||
controlText.innerHTML = overviewer.mapView.options.currentTileSet.get("poititle");
|
||||
|
||||
var controlBorder = document.createElement('DIV');
|
||||
$(controlBorder).addClass('top');
|
||||
|
||||
@@ -83,6 +83,7 @@ renders = Setting(required=True, default=util.OrderedDict(),
|
||||
"overlay": Setting(required=False, validator=validateOverlays, default=[]),
|
||||
"showspawn": Setting(required=False, validator=validateBool, default=True),
|
||||
"base": Setting(required=False, validator=validateStr, default=""),
|
||||
"poititle": Setting(required=False, validator=validateStr, default="Signs"),
|
||||
|
||||
# Remove this eventually (once people update their configs)
|
||||
"worldname": Setting(required=False, default=None,
|
||||
|
||||
@@ -527,7 +527,8 @@ class TileSet(object):
|
||||
(" - " + self.options.get('dimension') if self.options.get('dimension') != 'default' else ''),
|
||||
last_rendertime = self.max_chunk_mtime,
|
||||
imgextension = self.imgextension,
|
||||
isOverlay = isOverlay
|
||||
isOverlay = isOverlay,
|
||||
poititle = self.options.get("poititle")
|
||||
)
|
||||
|
||||
if isOverlay:
|
||||
|
||||
Reference in New Issue
Block a user