From 6fb9235b1be3f2386caad17662779d2fc1493d37 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Mon, 10 Aug 2020 23:00:44 +0800 Subject: [PATCH] finish env template --- SuperScriptViewer/ServerCore.py | 7 +++ SuperScriptViewer/ServerStruct.py | 19 +++++- SuperScriptViewer/static/env.css | 17 ++++++ SuperScriptViewer/static/env.js | 3 + SuperScriptViewer/static/viewer.js | 32 ---------- SuperScriptViewer/templates/help.html | 6 +- SuperScriptViewer/templates/help/env.html | 59 +++++++++++++++++++ .../templates/help/env_database.html | 0 8 files changed, 105 insertions(+), 38 deletions(-) create mode 100644 SuperScriptViewer/static/env.css create mode 100644 SuperScriptViewer/static/env.js create mode 100644 SuperScriptViewer/templates/help/env.html delete mode 100644 SuperScriptViewer/templates/help/env_database.html diff --git a/SuperScriptViewer/ServerCore.py b/SuperScriptViewer/ServerCore.py index 5ef1ef4..a03defa 100644 --- a/SuperScriptViewer/ServerCore.py +++ b/SuperScriptViewer/ServerCore.py @@ -54,6 +54,13 @@ def helpHandle(scriptPath): tabcontrol_css = url_for('static', filename='tabcontrol.css'), tabcontrol_js = url_for('static', filename='tabcontrol.js'), converter_js = url_for('static', filename='converter.js')) + elif scriptPath == 'env': + return render_template("help/env.html", + tabcontrol_css = url_for('static', filename='tabcontrol.css'), + tabcontrol_js = url_for('static', filename='tabcontrol.js'), + env_js = url_for('static', filename='env.js'), + env_css = url_for('static', filename='env.css'), + database_data = ss.envDatabaseList) else: abort(404) diff --git a/SuperScriptViewer/ServerStruct.py b/SuperScriptViewer/ServerStruct.py index 0219d06..d43b586 100644 --- a/SuperScriptViewer/ServerStruct.py +++ b/SuperScriptViewer/ServerStruct.py @@ -6,4 +6,21 @@ class ScriptItem(object): class HamburgerItem(object): def __init__(self, name, path): self.name = name - self.path = path \ No newline at end of file + self.path = path + +envDatabaseList = ( + {"name": "Attribute", + "queryKey": "attr", + "data": (("index", "0", "(Integer) Attribute index"), + ("name", "Floor", "(String) Attribute name"), + ("category_index", "0", "(Integer) The category index of this attribute"), + ("category_name", "3DXML", "(String) The category name of this attribute"), + ("flags", "44", "(Integer) Attribute flags"), + ("param_index", "85", "(Integer) Corresponding parameter index"), + ("compatible_classid", "41", "(Integer) Compatible class id"), + ("default_id", "1;NULL", "(String) Default value"))}, + {"name": "Message", + "queryKey": "msg", + "data": (("index", "0", "(Integer) Message index"), + ("name", "OnClick", "(String) Message name"))} +) diff --git a/SuperScriptViewer/static/env.css b/SuperScriptViewer/static/env.css new file mode 100644 index 0000000..e0c4738 --- /dev/null +++ b/SuperScriptViewer/static/env.css @@ -0,0 +1,17 @@ +table.envOutput { + border: 1px solid black; +} + +table.envOutput tr:nth-child(odd) { + background:gray; +} + +table.envOutput tr:nth-child(2n) { + background:white; +} + +table.envOutput tr:nth-child(1) td { + background: blue; + color: white; + border: 1px solid black; +} \ No newline at end of file diff --git a/SuperScriptViewer/static/env.js b/SuperScriptViewer/static/env.js new file mode 100644 index 0000000..bceda30 --- /dev/null +++ b/SuperScriptViewer/static/env.js @@ -0,0 +1,3 @@ +function doQuery(fieldIndex, queryTag) { + ; +} \ No newline at end of file diff --git a/SuperScriptViewer/static/viewer.js b/SuperScriptViewer/static/viewer.js index c646a74..50df6bd 100644 --- a/SuperScriptViewer/static/viewer.js +++ b/SuperScriptViewer/static/viewer.js @@ -117,35 +117,3 @@ function queryInfo(obj) { } }); } - -function sidePanelSwitcher(target) { - // 0->property; 1->display; 2->tools - //disable all - $("#sidepanel-properties").hide(); - $("#sidepanel-display").hide(); - $("#sidepanel-tools").hide(); - $(".tabitem").each(function () { - $(this).removeClass("tabitem-activated").addClass("tabitem-deactivated"); - }); - - switch (target) { - case 0: - $("#sidepanel-properties").show(); - $(".tabitem1").each(function () { - $(this).removeClass("tabitem-deactivated").addClass("tabitem-activated"); - }); - break; - case 1: - $("#sidepanel-display").show(); - $(".tabitem2").each(function () { - $(this).removeClass("tabitem-deactivated").addClass("tabitem-activated"); - }); - break; - case 2: - $("#sidepanel-tools").show(); - $(".tabitem3").each(function () { - $(this).removeClass("tabitem-deactivated").addClass("tabitem-activated"); - }); - break; - } -} diff --git a/SuperScriptViewer/templates/help.html b/SuperScriptViewer/templates/help.html index 9d9497f..97f55dd 100644 --- a/SuperScriptViewer/templates/help.html +++ b/SuperScriptViewer/templates/help.html @@ -17,11 +17,7 @@

Environment database query



diff --git a/SuperScriptViewer/templates/help/env.html b/SuperScriptViewer/templates/help/env.html new file mode 100644 index 0000000..85cc078 --- /dev/null +++ b/SuperScriptViewer/templates/help/env.html @@ -0,0 +1,59 @@ + + + + + + Help - Environment data query + + + + + + + + +

Environment data query

+

This page can query environment data.

+
+ + +
+ {% for item in database_data %} +
{{ item.name }}
+ {% endfor %} +
+ +{% for item in database_data %} + +{% endfor %} + + + + \ No newline at end of file diff --git a/SuperScriptViewer/templates/help/env_database.html b/SuperScriptViewer/templates/help/env_database.html deleted file mode 100644 index e69de29..0000000