This commit is contained in:
MihailRis 2025-04-21 21:53:27 +03:00
parent fe2a40b06e
commit 3498af6be9
5 changed files with 6 additions and 26 deletions

View File

@ -2,6 +2,6 @@
<button onclick='menu.page="worlds"'>@Worlds</button>
<button onclick='menu.page="scripts"'>@Scripts</button>
<button onclick='menu.page="settings"'>@Settings</button>
<button onclick='menu.page="content_menu"'>@Contents Menu</button>
<button onclick='menu.page="content_menu"'>@Content</button>
<button onclick='core.quit()'>@Quit</button>
</panel>

View File

@ -24,6 +24,7 @@ Save=Сохранить
Grant %{0} pack modification permission?=Выдать разрешение на модификацию пака %{0}?
Error at line %{0}=Ошибка на строке %{0}
Run=Запустить
Filter=Фильтр
editor.info.tooltip=CTRL+S - Сохранить\nCTRL+R - Запустить\nCTRL+Z - Отменить\nCTRL+Y - Повторить
devtools.traceback=Стек вызовов (от последнего)
@ -58,7 +59,6 @@ menu.Quit=Выход
menu.Save and Quit to Menu=Сохранить и Выйти в Меню
menu.Settings=Настройки
menu.Reset settings=Сбросить настройки
menu.Contents Menu=Меню контентпаков
menu.Open data folder=Открыть папку данных
menu.Open content folder=Открыть папку [content]

View File

@ -619,7 +619,7 @@ static slotcallback read_slot_func(
};
}
static void readSlot(
static void read_slot(
InventoryView* view, UiXmlReader& reader, const xml::xmlelement& element
) {
int index = element.attr("index", "0").asInt();
@ -649,7 +649,7 @@ static void readSlot(
view->add(slot);
}
static void readSlotsGrid(
static void read_slots_grid(
InventoryView* view,
const UiXmlReader& reader,
const xml::xmlelement& element
@ -726,9 +726,9 @@ static std::shared_ptr<UINode> read_inventory(
for (auto& sub : element.getElements()) {
if (sub->getTag() == "slot") {
readSlot(view.get(), reader, *sub);
read_slot(view.get(), reader, *sub);
} else if (sub->getTag() == "slots-grid") {
readSlotsGrid(view.get(), reader, *sub);
read_slots_grid(view.get(), reader, *sub);
}
}
return view;

View File

@ -1,18 +0,0 @@
#include "listutil.hpp"
#include <sstream>
#include "stringutil.hpp"
std::string util::to_string(const std::vector<std::string>& vec) {
std::stringstream ss;
ss << "[";
for (size_t i = 0; i < vec.size(); i++) {
ss << util::quote(vec[1]);
if (i < vec.size() - 1) {
ss << ", ";
}
}
ss << "]";
return ss.str();
}

View File

@ -33,6 +33,4 @@ namespace util {
a.reserve(a.size() + b.size());
a.insert(a.end(), b.begin(), b.end());
}
std::string to_string(const std::vector<std::string>& vec);
}