mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-13 14:06:42 +03:00
Merge branch 'empty_scripts_revival' into 'master'
Bring back empty script message See merge request OpenMW/openmw!2207
This commit is contained in:
commit
f2a2880998
5 changed files with 14 additions and 2 deletions
|
@ -268,6 +268,7 @@ namespace MWGui
|
||||||
getWidget(mScriptBox, "ScriptBox");
|
getWidget(mScriptBox, "ScriptBox");
|
||||||
getWidget(mScriptView, "ScriptView");
|
getWidget(mScriptView, "ScriptView");
|
||||||
getWidget(mScriptAdapter, "ScriptAdapter");
|
getWidget(mScriptAdapter, "ScriptAdapter");
|
||||||
|
getWidget(mScriptDisabled, "ScriptDisabled");
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
// hide gamma controls since it currently does not work under Linux
|
// hide gamma controls since it currently does not work under Linux
|
||||||
|
@ -899,11 +900,12 @@ namespace MWGui
|
||||||
for (const WeightedPage& weightedPage : weightedPages)
|
for (const WeightedPage& weightedPage : weightedPages)
|
||||||
mScriptList->addItem(weightedPage.mName, weightedPage.mIndex);
|
mScriptList->addItem(weightedPage.mName, weightedPage.mIndex);
|
||||||
|
|
||||||
// Hide script settings tab when the game world isn't loaded and scripts couldn't add their settings
|
// Hide script settings when the game world isn't loaded
|
||||||
bool disabled = LuaUi::scriptSettingsPageCount() == 0;
|
bool disabled = LuaUi::scriptSettingsPageCount() == 0;
|
||||||
mScriptFilter->setVisible(!disabled);
|
mScriptFilter->setVisible(!disabled);
|
||||||
mScriptList->setVisible(!disabled);
|
mScriptList->setVisible(!disabled);
|
||||||
mScriptBox->setVisible(!disabled);
|
mScriptBox->setVisible(!disabled);
|
||||||
|
mScriptDisabled->setVisible(disabled);
|
||||||
|
|
||||||
LuaUi::attachPageAt(mCurrentPage, mScriptAdapter);
|
LuaUi::attachPageAt(mCurrentPage, mScriptAdapter);
|
||||||
mScriptView->setCanvasSize(mScriptAdapter->getSize());
|
mScriptView->setCanvasSize(mScriptAdapter->getSize());
|
||||||
|
|
|
@ -53,6 +53,7 @@ namespace MWGui
|
||||||
MyGUI::EditBox* mScriptFilter;
|
MyGUI::EditBox* mScriptFilter;
|
||||||
MyGUI::ListBox* mScriptList;
|
MyGUI::ListBox* mScriptList;
|
||||||
MyGUI::Widget* mScriptBox;
|
MyGUI::Widget* mScriptBox;
|
||||||
|
MyGUI::Widget* mScriptDisabled;
|
||||||
MyGUI::ScrollView* mScriptView;
|
MyGUI::ScrollView* mScriptView;
|
||||||
LuaUi::LuaAdapter* mScriptAdapter;
|
LuaUi::LuaAdapter* mScriptAdapter;
|
||||||
int mCurrentPage;
|
int mCurrentPage;
|
||||||
|
|
|
@ -45,6 +45,7 @@ ReflectionShaderDetailWorld: "World"
|
||||||
Refraction: "Refraction"
|
Refraction: "Refraction"
|
||||||
Screenshot: "Screenshot"
|
Screenshot: "Screenshot"
|
||||||
Scripts: "Scripts"
|
Scripts: "Scripts"
|
||||||
|
ScriptsDisabled: "Load a game to access script settings."
|
||||||
SecondaryLanguage: "Secondary Language"
|
SecondaryLanguage: "Secondary Language"
|
||||||
SecondaryLanguageTooltip: "Localization files for this language may be used if the primary language files lack the necessary lines."
|
SecondaryLanguageTooltip: "Localization files for this language may be used if the primary language files lack the necessary lines."
|
||||||
TextureFiltering: "Texture Filtering"
|
TextureFiltering: "Texture Filtering"
|
||||||
|
|
|
@ -45,6 +45,7 @@ ReflectionShaderDetailWorld: "Мир"
|
||||||
Refraction: "Рефракция"
|
Refraction: "Рефракция"
|
||||||
Screenshot: "Снимок экрана"
|
Screenshot: "Снимок экрана"
|
||||||
Scripts: "Скрипты"
|
Scripts: "Скрипты"
|
||||||
|
ScriptsDisabled: "Загрузите игру, чтобы получить доступ к настройкам скриптов."
|
||||||
SecondaryLanguage: "Дополнительный язык"
|
SecondaryLanguage: "Дополнительный язык"
|
||||||
SecondaryLanguageTooltip: "Язык, строки на котором будут использоваться, если соответствующие строки на основном языке не найдены."
|
SecondaryLanguageTooltip: "Язык, строки на котором будут использоваться, если соответствующие строки на основном языке не найдены."
|
||||||
TextureFiltering: "Фильтрация текстур"
|
TextureFiltering: "Фильтрация текстур"
|
||||||
|
|
|
@ -639,10 +639,17 @@
|
||||||
<Widget type="TabItem">
|
<Widget type="TabItem">
|
||||||
<Property key="Caption" value=" #{SettingsMenu:Scripts} "/>
|
<Property key="Caption" value=" #{SettingsMenu:Scripts} "/>
|
||||||
|
|
||||||
|
<Widget name="ScriptDisabled" type="EditBox" skin="SandText" position_real="0 0 1 1" align="HStretch Top">
|
||||||
|
<Property key="Caption" value="#{SettingsMenu:ScriptsDisabled}"/>
|
||||||
|
<Property key="TextAlign" value="Center"/>
|
||||||
|
<Property key="MultiLine" value="true"/>
|
||||||
|
<Property key="WordWrap" value="true"/>
|
||||||
|
<Property key="Static" value="true"/>
|
||||||
|
</Widget>
|
||||||
|
|
||||||
<Widget type="HBox" position_real="0 0 1 0.99" align="Stretch">
|
<Widget type="HBox" position_real="0 0 1 0.99" align="Stretch">
|
||||||
<Property key="Padding" value="0"/>
|
<Property key="Padding" value="0"/>
|
||||||
<Property key="Spacing" value="0"/>
|
<Property key="Spacing" value="0"/>
|
||||||
|
|
||||||
<Widget type="VBox" align="Left VStretch">
|
<Widget type="VBox" align="Left VStretch">
|
||||||
<UserString key="VStretch" value="true"/>
|
<UserString key="VStretch" value="true"/>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue