mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-12 02:41:14 +00:00
Finish work on adding si loader extension
This commit is contained in:
parent
0e1fd4b429
commit
2cce3f9e4e
@ -102,8 +102,6 @@ CMainDialog::CMainDialog(QWidget* pParent) : QDialog(pParent)
|
||||
connect(m_ui->yResSpinBox, &QSpinBox::valueChanged, this, &CMainDialog::YResChanged);
|
||||
connect(m_ui->framerateSpinBox, &QSpinBox::valueChanged, this, &CMainDialog::FramerateChanged);
|
||||
|
||||
layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
if (currentConfigApp->m_ram_quality_limit != 0) {
|
||||
m_modified = true;
|
||||
const QString ramError = QString("Insufficient RAM!");
|
||||
@ -624,13 +622,17 @@ void CMainDialog::AddCustomAssetPath()
|
||||
data_path.absolutePath(),
|
||||
"Interleaf files (*.si)"
|
||||
);
|
||||
for (QString& item : new_files) {
|
||||
item = data_path.relativeFilePath(item);
|
||||
}
|
||||
assetPaths += new_files;
|
||||
UpdateAssetPaths();
|
||||
UpdateInterface();
|
||||
}
|
||||
|
||||
void CMainDialog::RemoveCustomAssetPath()
|
||||
{
|
||||
|
||||
assetPaths.removeAt(m_ui->customAssetPaths->currentRow());
|
||||
UpdateAssetPaths();
|
||||
}
|
||||
|
||||
void CMainDialog::SelectedPathChanged(int currentRow)
|
||||
@ -640,12 +642,26 @@ void CMainDialog::SelectedPathChanged(int currentRow)
|
||||
|
||||
void CMainDialog::EditCustomAssetPath()
|
||||
{
|
||||
|
||||
QDir data_path = QDir(QString::fromStdString(currentConfigApp->m_cd_path));
|
||||
QString prev_asset_path = assetPaths[m_ui->customAssetPaths->currentRow()];
|
||||
QString new_file = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
"Open File",
|
||||
data_path.absoluteFilePath(prev_asset_path),
|
||||
"Interleaf files (*.si)"
|
||||
);
|
||||
if (!new_file.isEmpty()) {
|
||||
new_file = data_path.relativeFilePath(new_file);
|
||||
assetPaths[m_ui->customAssetPaths->currentRow()] = new_file;
|
||||
}
|
||||
UpdateAssetPaths();
|
||||
}
|
||||
|
||||
void CMainDialog::UpdateAssetPaths()
|
||||
{
|
||||
|
||||
assetPaths.removeDuplicates();
|
||||
currentConfigApp->m_custom_asset_path = assetPaths.join(u',').toStdString();
|
||||
UpdateInterface();
|
||||
}
|
||||
|
||||
void CMainDialog::AspectRatioChanged(int index)
|
||||
|
||||
@ -368,7 +368,8 @@ void CConfigApp::WriteRegisterSettings() const
|
||||
dictionary* dict = dictionary_new(0);
|
||||
iniparser_set(dict, "isle", NULL);
|
||||
iniparser_set(dict, "extensions", NULL);
|
||||
iniparser_set(dict, "texture loader", NULL);
|
||||
iniparser_set(dict, "si loader", NULL);
|
||||
|
||||
if (m_device_enumerator->FormatDeviceName(buffer, m_driver, m_device) >= 0) {
|
||||
iniparser_set(dict, "isle:3D Device ID", buffer);
|
||||
}
|
||||
|
||||
@ -24,6 +24,9 @@
|
||||
<normaloff>:/lego1.png</normaloff>:/lego1.png</iconset>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="sharkImageLabel">
|
||||
<property name="sizePolicy">
|
||||
@ -1153,12 +1156,6 @@ The game will gradually increase the number of actors until this maximum is reac
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::SizeAdjustPolicy::AdjustToContentsOnFirstShow</enum>
|
||||
</property>
|
||||
<property name="dragEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="dragDropMode">
|
||||
<enum>QAbstractItemView::DragDropMode::InternalMove</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user