GH-3427 add low effort datapack button to worlds
This commit is contained in:
parent
66c0999901
commit
88d6b6ea3f
@ -170,6 +170,24 @@ void WorldListPage::on_actionView_Folder_triggered()
|
|||||||
DesktopServices::openDirectory(m_worlds->dir().absolutePath(), true);
|
DesktopServices::openDirectory(m_worlds->dir().absolutePath(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WorldListPage::on_actionDatapacks_triggered()
|
||||||
|
{
|
||||||
|
QModelIndex index = getSelectedWorld();
|
||||||
|
|
||||||
|
if (!index.isValid())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!worldSafetyNagQuestion())
|
||||||
|
return;
|
||||||
|
|
||||||
|
auto fullPath = m_worlds->data(index, WorldList::FolderRole).toString();
|
||||||
|
|
||||||
|
DesktopServices::openDirectory(FS::PathCombine(fullPath, "datapacks"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void WorldListPage::on_actionReset_Icon_triggered()
|
void WorldListPage::on_actionReset_Icon_triggered()
|
||||||
{
|
{
|
||||||
auto proxiedIndex = getSelectedWorld();
|
auto proxiedIndex = getSelectedWorld();
|
||||||
|
@ -90,6 +90,7 @@ private slots:
|
|||||||
void on_actionRename_triggered();
|
void on_actionRename_triggered();
|
||||||
void on_actionRefresh_triggered();
|
void on_actionRefresh_triggered();
|
||||||
void on_actionView_Folder_triggered();
|
void on_actionView_Folder_triggered();
|
||||||
|
void on_actionDatapacks_triggered();
|
||||||
void on_actionReset_Icon_triggered();
|
void on_actionReset_Icon_triggered();
|
||||||
void worldChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
void worldChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||||
void mceditState(LoggedProcess::State state);
|
void mceditState(LoggedProcess::State state);
|
||||||
|
@ -85,6 +85,7 @@
|
|||||||
<addaction name="actionCopy"/>
|
<addaction name="actionCopy"/>
|
||||||
<addaction name="actionRemove"/>
|
<addaction name="actionRemove"/>
|
||||||
<addaction name="actionMCEdit"/>
|
<addaction name="actionMCEdit"/>
|
||||||
|
<addaction name="actionDatapacks"/>
|
||||||
<addaction name="actionReset_Icon"/>
|
<addaction name="actionReset_Icon"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionCopy_Seed"/>
|
<addaction name="actionCopy_Seed"/>
|
||||||
@ -139,6 +140,14 @@
|
|||||||
<string>Remove world icon to make the game re-generate it on next load.</string>
|
<string>Remove world icon to make the game re-generate it on next load.</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionDatapacks">
|
||||||
|
<property name="text">
|
||||||
|
<string>Datapacks</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Manage datapacks inside the world.</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
Loading…
Reference in New Issue
Block a user