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