[nostalgia] Replace C strings with ox::StringView
This commit is contained in:
@@ -416,7 +416,7 @@ void TileSheetEditorImGui::SubSheetEditor::draw() noexcept {
|
||||
if (ImGui::Button("OK")) {
|
||||
ImGui::CloseCurrentPopup();
|
||||
m_show = false;
|
||||
inputSubmitted.emit(m_name.c_str(), m_cols, m_rows);
|
||||
inputSubmitted.emit(m_name, m_cols, m_rows);
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Cancel")) {
|
||||
|
||||
@@ -32,7 +32,7 @@ class TileSheetEditorImGui: public studio::BaseEditor {
|
||||
int m_rows = 0;
|
||||
bool m_show = false;
|
||||
public:
|
||||
ox::Signal<ox::Error(const ox::String &name, int cols, int rows)> inputSubmitted;
|
||||
ox::Signal<ox::Error(const ox::StringView &name, int cols, int rows)> inputSubmitted;
|
||||
constexpr void show(const ox::String &name, int cols, int rows) noexcept {
|
||||
m_show = true;
|
||||
m_name = name.c_str();
|
||||
|
||||
@@ -256,7 +256,7 @@ class AddSubSheetCommand: public TileSheetCommand {
|
||||
auto &parent = m_img->getSubSheet(m_parentIdx);
|
||||
if (m_addedSheets.size() < 2) {
|
||||
auto i = parent.subsheets.size();
|
||||
parent.subsheets.emplace_back(ox::sfmt("Subsheet {}", i).c_str(), 1, 1, m_img->bpp);
|
||||
parent.subsheets.emplace_back(ox::sfmt("Subsheet {}", i), 1, 1, m_img->bpp);
|
||||
} else {
|
||||
parent.subsheets.emplace_back("Subsheet 0", parent.columns, parent.rows, std::move(parent.pixels));
|
||||
parent.rows = 0;
|
||||
|
||||
Reference in New Issue
Block a user