mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 18:09:46 +00:00
feat: removing world missing content from UI
This commit is contained in:
parent
106a575c60
commit
3de0187a87
12 changed files with 127 additions and 11 deletions
|
|
@ -3,5 +3,6 @@
|
|||
<panel id='content_panel' size='480,100' color='#00000080' scrollable='true' max-length='400'>
|
||||
<!-- content is generated in script -->
|
||||
</panel>
|
||||
<button onclick="delete_content(report)">@Delete Content</button>
|
||||
<button onclick='menu:back()'>@Back to Main Menu</button>
|
||||
</panel>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,18 @@
|
|||
content_report = nil
|
||||
|
||||
function delete_content()
|
||||
local units = {}
|
||||
for i, entry in ipairs(content_report.content) do
|
||||
table.insert(units, entry.name)
|
||||
end
|
||||
local request = {
|
||||
units = units
|
||||
}
|
||||
app.delete_world_content(content_report.world, request, true)
|
||||
end
|
||||
|
||||
function on_open(report)
|
||||
content_report = report
|
||||
for i, entry in ipairs(report.content) do
|
||||
document.content_panel:add(gui.template("content_entry", entry))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ error.dependency-version-not-met=Dependency pack version is not met.
|
|||
world.delete-confirm=Do you want to delete world forever?
|
||||
world.generators.default=Default
|
||||
world.generators.flat=Flat
|
||||
world.delete-content-confirm=Delete missing content from the world __**(irreversible)**__?
|
||||
|
||||
editor.info.tooltip=CTRL+S - Save\nCTRL+R - Run\nCTRL+Z - Undo\nCTRL+Y - Redo
|
||||
devtools.traceback=Traceback (most recent call first)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue