2020-10-10 22:08:29 +00:00
|
|
|
|
|
|
|
var contents = [
|
|
|
|
{ name: "Introduction", src: "introduction.html" },
|
|
|
|
{ name: "Terminology", src: "terminology.html" },
|
|
|
|
{ name: "User Interface", src: "userinterface.html", items: [
|
|
|
|
{ name: "About the User Interface", src: "userinterface.html" },
|
|
|
|
{ name: "Main Window", src: "w_mainwindow.html" },
|
|
|
|
{ name: "Custom Fields Editor", src: "w_customfields.html" },
|
|
|
|
{ name: "Errors and Warnings Window", src: "w_errorsandwarnings.html" },
|
|
|
|
{ name: "Game Configurations Window", src: "w_gameconfigurations.html" },
|
|
|
|
{ name: "Grid Setup Window", src: "w_gridsetup.html" },
|
|
|
|
{ name: "Image Browser Window", src: "w_imagesbrowser.html" },
|
|
|
|
{ name: "Linedef Properties Window", src: "w_linedefedit.html" },
|
|
|
|
{ name: "Map Options Window", src: "w_mapoptions.html" },
|
|
|
|
{ name: "Open Map Window", src: "w_openmapoptions.html" },
|
|
|
|
{ name: "Preferences Window", src: "w_preferences.html" },
|
|
|
|
{ name: "Resource Options Window", src: "w_resourceoptions.html" },
|
|
|
|
{ name: "Script Editor Window", src: "w_scripteditor.html" },
|
|
|
|
{ name: "Sector Properties Window", src: "w_sectoredit.html" },
|
|
|
|
{ name: "Texture Sets Window", src: "w_textureset.html" },
|
|
|
|
{ name: "Thing Properties Window", src: "w_thingedit.html" },
|
|
|
|
{ name: "Things Filters Window", src: "w_thingsfilters.html" },
|
|
|
|
{ name: "Vertex Properties Window", src: "w_vertexedit.html" }
|
|
|
|
]},
|
|
|
|
{ name: "Editing Modes", src: "editingmodes.html", items: [
|
|
|
|
{ name: "About Editing Modes", src: "editingmodes.html" },
|
|
|
|
{ name: "Curve Linedefs Mode", src: "e_curvelinedefs.html" },
|
|
|
|
{ name: "Draw Geometry Mode", src: "e_drawgeometry.html" },
|
|
|
|
{ name: "Edit Selection Mode", src: "e_editselection.html" },
|
|
|
|
{ name: "Find & Replace Mode", src: "e_findreplace.html" },
|
|
|
|
{ name: "Linedefs Mode", src: "e_linedefs.html" },
|
|
|
|
{ name: "Make Sectors Mode", src: "e_makesectors.html" },
|
|
|
|
{ name: "Map Analysis Mode", src: "e_mapanalysis.html" },
|
|
|
|
{ name: "Sectors Mode", src: "e_sectors.html" },
|
|
|
|
{ name: "Things Mode", src: "e_things.html" },
|
|
|
|
{ name: "Vertices Mode", src: "e_vertices.html" },
|
|
|
|
{ name: "Visual Mode", src: "e_visual.html" }
|
|
|
|
]},
|
|
|
|
{ name: "Configurations", src: "configurations.html", items: [
|
|
|
|
{ name: "About Configurations", src: "configurations.html" },
|
|
|
|
{ name: "Configuration Syntax", src: "configstructure.html" },
|
|
|
|
{ name: "Compiler Configurations", src: "compilerconfigs.html", items: [
|
|
|
|
{ name: "About Compiler Configurations", src: "compilerconfigs.html" }
|
|
|
|
]},
|
|
|
|
{ name: "Game Configurations", src: "gameconfigs.html", items: [
|
|
|
|
{ name: "About Game Configurations", src: "gameconfigs.html" },
|
|
|
|
{ name: "Basic Settings", src: "gc_basicsettings.html" },
|
|
|
|
{ name: "Map Format Settings", src: "gc_formatsettings.html" },
|
|
|
|
{ name: "Resource Settings", src: "gc_resourcesettings.html" },
|
|
|
|
{ name: "Sectors Settings", src: "gc_sectorsettings.html" },
|
|
|
|
{ name: "Linedefs Settings", src: "gc_linedefsettings.html" },
|
|
|
|
{ name: "Sidedef Settings", src: "gc_sidedefsettings.html" },
|
|
|
|
{ name: "Things Settings", src: "gc_thingsettings.html" },
|
|
|
|
{ name: "Action Argument Settings", src: "gc_argumentsettings.html" }
|
|
|
|
]},
|
|
|
|
{ name: "Scripting Configurations", src: "scriptingconfigs.html", items: [
|
|
|
|
{ name: "About Scripting Configurations", src: "scriptingconfigs.html" }
|
|
|
|
]},
|
|
|
|
{ name: "DECORATE keys", src: "gc_decoratekeys.html" }
|
|
|
|
]},
|
|
|
|
{ name: "Ultimate Doom Builder manual", src: "gz_introduction.html", items: [
|
|
|
|
{ name: "Features", src: "gzdb/features/features.html", items: [
|
|
|
|
{ name: "General Interface", src: "gzdb/features/features.html#general", items: [
|
|
|
|
{ name: "Rendering toolbar", src: "gzdb/features/general/rendering_toolbar.html" },
|
|
|
|
{ name: "Multiple engines per game configuration", src: "gzdb/features/general/multi_engines.html" }
|
|
|
|
]},
|
|
|
|
{ name: "Scripting", src: "gzdb/features/features.html#scripting", items: [
|
|
|
|
{ name: "Enhanced scripting workflow", src: "gzdb/features/scripting/acs.html" },
|
|
|
|
{ name: "Code Snippets", src: "gzdb/features/scripting/snippets.html" }
|
|
|
|
]},
|
|
|
|
{ name: "New features in Classic and Visual modes", src: "gzdb/features/features.html#allmodes", items: [
|
|
|
|
{ name: "Enhanced Tag support", src: "gzdb/features/all_modes/tag_support.html" },
|
|
|
|
{ name: "Event lines", src: "gzdb/features/all_modes/event_lines.html" },
|
|
|
|
{ name: "Testing map from view", src: "gzdb/features/all_modes/test_from_view.html" },
|
|
|
|
{ name: "Synchronizing selection", src: "gzdb/features/all_modes/synch_selection.html" },
|
|
|
|
{ name: "Synchronizing camera position", src: "gzdb/features/all_modes/synch_camera.html" },
|
|
|
|
{ name: "Color Picker plugin", src: "gzdb/features/all_modes/colorpicker.html" },
|
|
|
|
{ name: "Tag Explorer plugin", src: "gzdb/features/all_modes/tagexplorer.html" },
|
|
|
|
{ name: "Image Browser", src: "gzdb/features/all_modes/texture_browser.html" }
|
|
|
|
]},
|
|
|
|
{ name: "New features in Classic modes", src: "gzdb/features/features.html#classic", items: [
|
|
|
|
{ name: "Draw Settings Panel", src: "gzdb/features/classic_modes/drawsettingspanel.html" },
|
|
|
|
{ name: "Custom linedef colors", src: "gzdb/features/classic_modes/linedef_color_presets.html" },
|
|
|
|
{ name: "Enhanced rectangular selection", src: "gzdb/features/classic_modes/selection.html" }
|
|
|
|
]},
|
|
|
|
{ name: "New features in Sectors mode", src: "gzdb/features/features.html#sectors" },
|
|
|
|
{ name: "New features in Linedefs mode", src: "gzdb/features/features.html#linedefs" },
|
|
|
|
{ name: "Draw Rectangle mode", src: "gzdb/features/classic_modes/mode_drawrect.html" },
|
|
|
|
{ name: "Draw Ellipse mode", src: "gzdb/features/classic_modes/mode_drawellipse.html" },
|
|
|
|
{ name: "Draw Curve mode", src: "gzdb/features/classic_modes/mode_drawcurve.html" },
|
|
|
|
{ name: "Draw Grid mode", src: "gzdb/features/classic_modes/mode_drawgrid.html" },
|
|
|
|
{ name: "Sound Propagation Mode", src: "gzdb/features/classic_modes/mode_soundpropagation.html" },
|
|
|
|
{ name: "Sound Environment Mode", src: "gzdb/features/classic_modes/mode_soundenvironment.html" },
|
|
|
|
{ name: "3D Floor Mode", src: "gzdb/features/classic_modes/mode_3dfloor.html" },
|
|
|
|
{ name: "Draw Slope Mode/Slope Mode", src: "gzdb/features/classic_modes/mode_slopes.html" },
|
|
|
|
{ name: "Randomize mode", src: "gzdb/features/all_modes/jitter.html" },
|
|
|
|
{ name: "Bridge mode", src: "gzdb/features/classic_modes/mode_drawbridge.html" },
|
|
|
|
{ name: "Import Terrain mode", src: "gzdb/features/classic_modes/mode_importterrain.html" },
|
|
|
|
{ name: "Snap geometry mode", src: "gzdb/features/classic_modes/mode_snapelements.html" },
|
|
|
|
{ name: "New features in Things mode", src: "gzdb/features/features.html#things", items: [
|
|
|
|
{ name: "Assigning multiple thing types at once", src: "gzdb/features/things_mode/multiple_thing_types.html" },
|
|
|
|
{ name: "\"Point Thing to Cursor\" action", src: "gzdb/features/things_mode/pointthing.html" }
|
|
|
|
]},
|
|
|
|
{ name: "New features in Vertices mode", src: "gzdb/features/features.html#vertices" },
|
|
|
|
{ name: "GZDB Visual mode", src: "gzdb/features/features.html#visual", items: [
|
|
|
|
{ name: "Visual vertices (UDMF)", src: "gzdb/features/visual_mode/visual_verts.html" },
|
|
|
|
{ name: "Using Auto Align Textures actions on floors and ceilings (UDMF)", src: "gzdb/features/visual_mode/autoalignfloors.html" },
|
|
|
|
{ name: "\"Fit Texture\" actions", src: "gzdb/features/visual_mode/texturefit.html" },
|
|
|
|
{ name: "\"Auto-align Textures to Selection\" actions", src: "gzdb/features/visual_mode/autoalign_to_selection.html" }
|
|
|
|
]},
|
|
|
|
{ name: "New features in Map Analysis mode", src: "gzdb/features/features.html#mapanalysis" },
|
|
|
|
{ name: "New features in Find and Replace mode", src: "gzdb/features/features.html#findreplace" },
|
|
|
|
{ name: "Custom Fields", src: "gzdb/features/features.html#fields", items: [
|
|
|
|
{ name: "New custom field types", src: "gzdb/features/custom_fields/newfieldtypes.html" }
|
|
|
|
]},
|
|
|
|
{ name: "(G)ZDoom features support", src: "gzdb/features/features.html#formats" }
|
|
|
|
]},
|
|
|
|
{ name: "(G)ZDoom text lumps support", src: "gzdb/text_lumps.html" },
|
|
|
|
{ name: "List of deprecated plugins", src: "gzdb/deprecated_plugins.html" },
|
|
|
|
{ name: "Compiling GZDoom Builder", src: "gzdb/compilingtheeditor.html" }
|
|
|
|
]},
|
|
|
|
{ name: "Frequently asked questions", src: "gzdb/faq.html" },
|
|
|
|
{ name: "Command Line Parameters", src: "commandlineparams.html" },
|
|
|
|
{ name: "System Requirements", src: "systemrequirements.html" }
|
|
|
|
];
|
|
|
|
|
2020-10-11 03:50:15 +00:00
|
|
|
var searchbox = document.getElementById("searchbox");
|
|
|
|
var listview = document.getElementById("listview");
|
|
|
|
var content = document.getElementById("content");
|
2020-10-10 22:08:29 +00:00
|
|
|
var listviewItems = [];
|
|
|
|
|
2020-10-11 03:50:15 +00:00
|
|
|
// note: generated by the generateIndex() function and then pasted into this file
|
|
|
|
var searchIndex = {"items":[{"name":"Introduction","src":"introduction.html"},{"name":"Terminology","src":"terminology.html"},{"name":"User Interface","src":"userinterface.html"},{"name":"About the User Interface","src":"userinterface.html"},{"name":"Main Window","src":"w_mainwindow.html"},{"name":"Custom Fields Editor","src":"w_customfields.html"},{"name":"Errors and Warnings Window","src":"w_errorsandwarnings.html"},{"name":"Game Configurations Window","src":"w_gameconfigurations.html"},{"name":"Grid Setup Window","src":"w_gridsetup.html"},{"name":"Image Browser Window","src":"w_imagesbrowser.html"},{"name":"Linedef Properties Window","src":"w_linedefedit.html"},{"name":"Map Options Window","src":"w_mapoptions.html"},{"name":"Open Map Window","src":"w_openmapoptions.html"},{"name":"Preferences Window","src":"w_preferences.html"},{"name":"Resource Options Window","src":"w_resourceoptions.html"},{"name":"Script Editor Window","src":"w_scripteditor.html"},{"name":"Sector Properties Window","src":"w_sectoredit.html"},{"name":"Texture Sets Window","src":"w_textureset.html"},{"name":"Thing Properties Window","src":"w_thingedit.html"},{"name":"Things Filters Window","src":"w_thingsfilters.html"},{"name":"Vertex Properties Window","src":"w_vertexedit.html"},{"name":"Editing Modes","src":"editingmodes.html"},{"name":"About Editing Modes","src":"editingmodes.html"},{"name":"Curve Linedefs Mode","src":"e_curvelinedefs.html"},{"name":"Draw Geometry Mode","src":"e_drawgeometry.html"},{"name":"Edit Selection Mode","src":"e_editselection.html"},{"name":"Find & Replace Mode","src":"e_findreplace.html"},{"name":"Linedefs Mode","src":"e_linedefs.html"},{"name":"Make Sectors Mode","src":"e_makesectors.html"},{"name":"Map Analysis Mode","src":"e_mapanalysis.html"},{"name":"Sectors Mode","src":"e_sectors.html"},{"name":"Things Mode","src":"e_things.html"},{"name":"Vertices Mode","src":"e_vertices.html"},{"name":"Visual Mode","src":"e_visual.html"},{"name":"Configurations","src":"configurations.html"},{"name":"About Configurations","src":"configurations.html"},{"name":"Configuration Syntax","src":"configstructure.html"},{"name":"Compiler Configurations","src":"compilerconfigs.html"},{"name":"About Compiler Configurations","src":"compilerconfigs.html"},{"name":"Game Configurations","src":"gameconfigs.html"},{"name":"About Game Configurations","src":"gameconfigs.html"},{"name":"Basic Settings","src":"gc_basicsettings.html"},{"name":"Map Format Settings","src":"gc_formatsettings.html"},{"name":"Resource Settings","src":"gc_resourcesettings.html"},{"name":"Sectors Settings","src":"gc_sectorsettings.html"},{"name":"Linedefs Settings","src":"gc_linedefsettings.html"},{"name":"Sidedef Settings","src":"gc_sidedefsettings.html"},{"name":"Things Settings","src":"gc_thingsettings.html"},{"name":"Action Argument Settings","src":"gc_argumentsettings.html"},{"name":"Scripting Configurations","src":"scriptingconfigs.html"},{"name":"About Scripting Configurations","src":"scriptingconfigs.html"},{"name":"DECORATE keys","src":"gc_decoratekeys.html"},{"name":"Ultimate Doom Builder manual","src":"gz_introduction.html"},{"name":"Features","src":"gzdb/features/features.html"},{"name":"General Interface","src":"gzdb/features/features.html#general"},{"name":"Rendering toolbar","src":"gzdb/features/general/rendering_toolbar.html"},{"name":"Multiple engines per game configuration","src":"gzdb/features/general/multi_engines.html"},{"name":"Scripting","src":"gzdb/features/features.html#scripting"},{"name":"Enhanced scripting workflow","src":"gzdb/features/scripting/acs.html"},{"name":"Code Snippets","src":"gzdb/features/scripting/snippets.html"},{"name":"New features in Classic and Visual modes","src":"gzdb/features/features.html#allmodes"},{"name":"Enhanced Tag support","src":"gzdb/features/all_modes/tag_support.html"},{"name":"Event lines","src":"gzdb/features/all_modes/event_lines.html"},{"name":"Testing map from view","src":"gzdb/features/all_modes/test_from_view.html"},{"name":"Synchronizing selection","src":"gzdb/features/all_modes/synch_selection.html"},{"name
|
|
|
|
|
|
|
|
function search(searchString) {
|
|
|
|
var words = searchString.split(/\W+/);
|
|
|
|
if (words.length > 0 && words[words.length-1] == "") words.splice(-1);
|
|
|
|
if (words.length == 0) return [];
|
|
|
|
|
|
|
|
var results = {};
|
|
|
|
var totalWords = 1;
|
|
|
|
var lastword = words.splice(-1)[0].toLowerCase();
|
|
|
|
|
|
|
|
// Search whole word results for everything except last word
|
|
|
|
words.forEach(word => {
|
|
|
|
if (word != "") {
|
|
|
|
var key = word.toLowerCase();
|
|
|
|
if (searchIndex.keys[key] != undefined) {
|
|
|
|
searchIndex.keys[key].forEach(x => {
|
|
|
|
if (results[x] == undefined) results[x] = 1;
|
|
|
|
else results[x]++;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
totalWords++;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// Partial word search for the last word
|
|
|
|
Object.keys(searchIndex.keys).forEach(key => {
|
|
|
|
if (key.length >= lastword.length && key.substr(0, lastword.length) == lastword) {
|
|
|
|
searchIndex.keys[key].forEach(x => {
|
|
|
|
if (totalWords == 1 || results[x] == totalWords - 1) results[x] = totalWords;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// Only match pages that included all the words
|
|
|
|
var output = [];
|
|
|
|
Object.keys(results).forEach(x => { if (results[x] == totalWords) output.push(searchIndex.items[x]) });
|
|
|
|
output.sort((a, b) => a.name.localeCompare(b.name));
|
|
|
|
return output;
|
|
|
|
}
|
|
|
|
|
|
|
|
function generateIndex() {
|
|
|
|
function addItems(list, output) {
|
|
|
|
list.forEach(x => {
|
|
|
|
output.push(x);
|
|
|
|
if (x.items != undefined) addItems(x.items, output);
|
|
|
|
});
|
|
|
|
return output;
|
|
|
|
}
|
|
|
|
var items = addItems(contents, []);
|
|
|
|
var curIndex = 0;
|
|
|
|
|
|
|
|
searchIndex = {
|
|
|
|
items: items.map(x => { return { name: x.name, src: x.src } }),
|
|
|
|
keys: {}
|
|
|
|
};
|
|
|
|
|
|
|
|
var timeoutID;
|
|
|
|
|
|
|
|
function done() {
|
|
|
|
content.removeEventListener('load', contentLoaded);
|
|
|
|
content.removeAttribute("src");
|
|
|
|
|
|
|
|
content.setAttribute("srcdoc", JSON.stringify(searchIndex));
|
|
|
|
}
|
|
|
|
|
|
|
|
function next() {
|
|
|
|
curIndex++;
|
|
|
|
if (curIndex < items.length) {
|
|
|
|
timeoutID = setTimeout(contentFailedLoad, 2000);
|
|
|
|
content.setAttribute("src", items[curIndex].src);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
done();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function contentFailedLoad() {
|
|
|
|
// console.debug("Failed to load " + items[curIndex].name + " (" + items[curIndex].src + ")");
|
|
|
|
next();
|
|
|
|
}
|
|
|
|
|
|
|
|
function contentLoaded(event) {
|
|
|
|
clearTimeout(timeoutID);
|
|
|
|
|
|
|
|
if (content.contentDocument == null) {
|
|
|
|
content.removeEventListener('load', contentLoaded);
|
|
|
|
alert("security.fileuri.strict_origin_policy needs to be enabled for generateIndex() to work (remember to turn it off again after!)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var wordSet = {};
|
|
|
|
content.contentDocument.body.innerText.split(/\W+/).forEach(word => {
|
|
|
|
if (word != "") wordSet[word.toLowerCase()] = true;
|
|
|
|
});
|
|
|
|
|
|
|
|
Object.keys(wordSet).forEach(word => {
|
|
|
|
if (searchIndex.keys[word] == undefined) searchIndex.keys[word] = [];
|
|
|
|
searchIndex.keys[word].push(curIndex);
|
|
|
|
});
|
|
|
|
|
|
|
|
next();
|
|
|
|
}
|
|
|
|
timeoutID = setTimeout(contentFailedLoad, 2000);
|
|
|
|
content.addEventListener('load', contentLoaded);
|
|
|
|
content.setAttribute("src", items[curIndex].src);
|
|
|
|
}
|
|
|
|
|
2020-10-10 22:08:29 +00:00
|
|
|
function addClass(element, name) {
|
|
|
|
var classes = getClasses(element);
|
|
|
|
var index = classes.indexOf(name);
|
|
|
|
if (index == -1) {
|
|
|
|
classes.push(name);
|
|
|
|
setClasses(element, classes);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function removeClass(element, name) {
|
|
|
|
var classes = getClasses(element);
|
|
|
|
var index = classes.indexOf(name);
|
|
|
|
if (index != -1) {
|
|
|
|
classes.splice(index, 1);
|
|
|
|
setClasses(element, classes);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function getClasses(element) {
|
|
|
|
var classes = element.getAttribute("class");
|
|
|
|
if (classes == null) return [];
|
|
|
|
return classes.split(" ");
|
|
|
|
}
|
|
|
|
|
|
|
|
function setClasses(element, classes) {
|
|
|
|
element.setAttribute("class", classes.join(" "));
|
|
|
|
}
|
|
|
|
|
2020-10-11 03:50:15 +00:00
|
|
|
function filterItems(filter) {
|
|
|
|
while (listview.lastChild != null) {
|
|
|
|
listview.removeChild(listview.lastChild);
|
|
|
|
}
|
|
|
|
listviewItems = [];
|
|
|
|
|
|
|
|
if (filter == "") {
|
|
|
|
contents.forEach(item => addItem(listview, item, 1));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
search(filter).forEach(item => addItem(listview, item, 1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-10 22:08:29 +00:00
|
|
|
function itemSelected(element, item) {
|
|
|
|
listviewItems.forEach(x => removeClass(x, "selected"));
|
|
|
|
addClass(element, "selected");
|
|
|
|
content.setAttribute("src", item.src);
|
|
|
|
}
|
|
|
|
|
|
|
|
function addItem(parent, item, level) {
|
|
|
|
var element = document.createElement("div");
|
|
|
|
var text = document.createElement("div");
|
|
|
|
addClass(element, "listviewitem");
|
|
|
|
addClass(text, "listviewitem-text");
|
|
|
|
text.style.paddingLeft = (level * 20) + "px";
|
|
|
|
text.innerText = item.name;
|
2020-10-11 03:50:15 +00:00
|
|
|
text.addEventListener('click', event => itemSelected(element, item, event) );
|
2020-10-10 22:08:29 +00:00
|
|
|
element.appendChild(text);
|
|
|
|
listviewItems.push(element);
|
|
|
|
parent.appendChild(element);
|
|
|
|
if (item.items != undefined) {
|
|
|
|
item.items.forEach(childitem => addItem(element, childitem, level + 1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-11 03:50:15 +00:00
|
|
|
searchbox.addEventListener('input', event => filterItems(searchbox.value, event));
|
2020-10-10 22:08:29 +00:00
|
|
|
contents.forEach(item => addItem(listview, item, 1));
|