1
0
mirror of https://github.com/Wyrrrd/Autofilter.git synced 2026-04-24 22:40:12 +02:00

Added integration with Booktorio

This commit is contained in:
Wyrrrd
2020-04-03 13:42:39 +02:00
parent c36e55c961
commit bfc4e6aa3d
11 changed files with 108 additions and 17 deletions
+41
View File
@@ -0,0 +1,41 @@
local autofilter_thread =
{
name = {"autofilter.menu_autofilter"},
specified_version = 0,
topics =
{
{
name = {"autofilter.title_autofilter"},
topic =
{
{type = "image", spritename = "autofilter-logo"},
{type = "text", text = "info.page_autofilter_text"}
}
},
{
name = {"info.page_modes_heading"},
topic =
{
{type = "title", title = {"info.page_modes_heading"}},
{type = "subtitle", subtitle = {"info.page_contents_heading"}},
{type = "image", spritename = "autofilter-settings-contents"},
{type = "text", text = "info.page_contents_text"},
{type = "subtitle", subtitle = {"info.page_filter_heading"}},
{type = "image", spritename = "autofilter-settings-filter"},
{type = "text", text = "info.page_filter_text"},
{type = "subtitle", subtitle = {"info.page_none_heading"}},
{type = "image", spritename = "autofilter-settings-none"},
{type = "text", text = "info.page_none_text"}
}
}
}
}
local function registerThread()
if remote.interfaces["Booktorio"] then
remote.call("Booktorio", "add_thread", autofilter_thread)
end
end
script.on_init(registerThread)
script.on_configuration_changed(registerThread)
+37
View File
@@ -0,0 +1,37 @@
if mods["Booktorio"] then
data:extend(
{
{
type = "sprite",
name = "autofilter-logo",
filename = "__Autofilter__/graphics/logo.png",
width = 360,
height = 156,
scale = 1
},
{
type = "sprite",
name = "autofilter-settings-contents",
filename = "__Autofilter__/graphics/settings_contents.png",
width = 400,
height = 128,
scale = 1
},
{
type = "sprite",
name = "autofilter-settings-filter",
filename = "__Autofilter__/graphics/settings_filter.png",
width = 400,
height = 128,
scale = 1
},
{
type = "sprite",
name = "autofilter-settings-none",
filename = "__Autofilter__/graphics/settings_none.png",
width = 400,
height = 128,
scale = 1
}
})
end
+8 -8
View File
@@ -16,16 +16,16 @@ end
function autofilter_page_content(page_name, player_index, element)
if page_name == "autofilter" then
element.add{type="button", name="image_autofilter", style="autofilter_logo"}
element.add{type="label", name="text_autofilter", caption={"autofilter.page_autofilter_text"}}
element.add{type="label", name="heading_modes", caption={"autofilter.page_modes_heading"}, style="heading_1_label"}
element.add{type="label", name="heading_contents", caption={"autofilter.page_contents_heading"}, style="heading_2_label"}
element.add{type="label", name="text_autofilter", caption={"info.page_autofilter_text"}}
element.add{type="label", name="heading_modes", caption={"info.page_modes_heading"}, style="heading_1_label"}
element.add{type="label", name="heading_contents", caption={"info.page_contents_heading"}, style="heading_2_label"}
element.add{type="button", name="image_contents", style="autofilter_settings_contents"}
element.add{type="label", name="text_contents", caption={"autofilter.page_contents_text"}}
element.add{type="label", name="heading_filter", caption={"autofilter.page_filter_heading"}, style="heading_2_label"}
element.add{type="label", name="text_contents", caption={"info.page_contents_text"}}
element.add{type="label", name="heading_filter", caption={"info.page_filter_heading"}, style="heading_2_label"}
element.add{type="button", name="image_filter", style="autofilter_settings_filter"}
element.add{type="label", name="text_filter", caption={"autofilter.page_filter_text"}}
element.add{type="label", name="heading_none", caption={"autofilter.page_none_heading"}, style="heading_2_label"}
element.add{type="label", name="text_filter", caption={"info.page_filter_text"}}
element.add{type="label", name="heading_none", caption={"info.page_none_heading"}, style="heading_2_label"}
element.add{type="button", name="image_none", style="autofilter_settings_none"}
element.add{type="label", name="text_none", caption={"autofilter.page_none_text"}}
element.add{type="label", name="text_none", caption={"info.page_none_text"}}
end
end
+7 -7
View File
@@ -7,19 +7,19 @@ autofilter_wiki =
name = {"autofilter.title_autofilter"},
topic = {
{type = "image", name = "image_autofilter", filepath = "__Autofilter__/graphics/logo.png", width = 360, height = 156, scale = 1},
{type = "text", text = {"autofilter.page_autofilter_text"} },
{type = "text", text = {"info.page_autofilter_text"} },
{type = "line"},
{type = "title", title = {"autofilter.page_contents_heading"} },
{type = "title", title = {"info.page_contents_heading"} },
{type = "image", name = "image_contents", filepath = "__Autofilter__/graphics/settings_contents.png", width = 400, height = 128, scale = 0.9},
{type = "text", text = {"autofilter.page_contents_text"} },
{type = "text", text = {"info.page_contents_text"} },
{type = "line"},
{type = "title", title = {"autofilter.page_filter_heading"} },
{type = "title", title = {"info.page_filter_heading"} },
{type = "image", name = "image_filter", filepath = "__Autofilter__/graphics/settings_filter.png", width = 400, height = 128, scale = 0.9},
{type = "text", text = {"autofilter.page_filter_text"} },
{type = "text", text = {"info.page_filter_text"} },
{type = "line"},
{type = "title", title = {"autofilter.page_none_heading"} },
{type = "title", title = {"info.page_none_heading"} },
{type = "image", name = "image_none", filepath = "__Autofilter__/graphics/settings_none.png", width = 400, height = 128, scale = 0.9},
{type = "text", text = {"autofilter.page_none_text"} },
{type = "text", text = {"info.page_none_text"} },
}
}
}