mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 16:39:41 +00:00
Merge pull request #2407 from akortunov/scrollbars
Add separate textures for scrollbars
This commit is contained in:
commit
61db93e7da
13 changed files with 52 additions and 33 deletions
|
@ -130,6 +130,7 @@
|
||||||
Feature #5033: Magic armor mitigation for creatures
|
Feature #5033: Magic armor mitigation for creatures
|
||||||
Feature #5034: Make enchanting window stay open after a failed attempt
|
Feature #5034: Make enchanting window stay open after a failed attempt
|
||||||
Feature #5036: Allow scripted faction leaving
|
Feature #5036: Allow scripted faction leaving
|
||||||
|
Feature #5051: Provide a separate textures for scrollbars
|
||||||
Task #4686: Upgrade media decoder to a more current FFmpeg API
|
Task #4686: Upgrade media decoder to a more current FFmpeg API
|
||||||
Task #4695: Optimize Distant Terrain memory consumption
|
Task #4695: Optimize Distant Terrain memory consumption
|
||||||
Task #4721: Add NMake support to the Windows prebuild script
|
Task #4721: Add NMake support to the Windows prebuild script
|
||||||
|
|
|
@ -283,7 +283,8 @@ void OMW::Engine::enableFSStrict(bool fsStrict)
|
||||||
void OMW::Engine::setDataDirs (const Files::PathContainer& dataDirs)
|
void OMW::Engine::setDataDirs (const Files::PathContainer& dataDirs)
|
||||||
{
|
{
|
||||||
mDataDirs = dataDirs;
|
mDataDirs = dataDirs;
|
||||||
mFileCollections = Files::Collections (dataDirs, !mFSStrict);
|
mDataDirs.insert(mDataDirs.begin(), (mResDir / "vfs"));
|
||||||
|
mFileCollections = Files::Collections (mDataDirs, !mFSStrict);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add BSA archive
|
// Add BSA archive
|
||||||
|
|
|
@ -192,6 +192,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
||||||
|
|
||||||
cfgMgr.processPaths(dataDirs);
|
cfgMgr.processPaths(dataDirs);
|
||||||
|
|
||||||
|
engine.setResourceDir(variables["resources"].as<Files::EscapeHashString>().toStdString());
|
||||||
engine.setDataDirs(dataDirs);
|
engine.setDataDirs(dataDirs);
|
||||||
|
|
||||||
// fallback archives
|
// fallback archives
|
||||||
|
@ -201,8 +202,6 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
||||||
engine.addArchive(*it);
|
engine.addArchive(*it);
|
||||||
}
|
}
|
||||||
|
|
||||||
engine.setResourceDir(variables["resources"].as<Files::EscapeHashString>().toStdString());
|
|
||||||
|
|
||||||
StringsVector content = variables["content"].as<Files::EscapeStringVector>().toStdStringVector();
|
StringsVector content = variables["content"].as<Files::EscapeStringVector>().toStdStringVector();
|
||||||
if (content.empty())
|
if (content.empty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
add_subdirectory(mygui)
|
add_subdirectory(mygui)
|
||||||
add_subdirectory(shaders)
|
add_subdirectory(shaders)
|
||||||
|
add_subdirectory(vfs)
|
||||||
|
|
|
@ -19,37 +19,37 @@
|
||||||
<!-- Gender choice -->
|
<!-- Gender choice -->
|
||||||
|
|
||||||
<Widget type="Widget" skin="MW_Box" position="8 298 15 14">
|
<Widget type="Widget" skin="MW_Box" position="8 298 15 14">
|
||||||
<Widget type="Button" skin="MW_ArrowLeft" position="3 2 10 10" align="Left VStretch" name="PrevGenderButton"/>
|
<Widget type="Button" skin="MW_ArrowLeft" position="2 2 10 10" align="Left VStretch" name="PrevGenderButton"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<Widget type="TextBox" skin="HeaderText" position="25 294 205 18" name="GenderChoiceT"/>
|
<Widget type="TextBox" skin="HeaderText" position="25 294 205 18" name="GenderChoiceT"/>
|
||||||
|
|
||||||
<Widget type="Widget" skin="MW_Box" position="234 298 15 14">
|
<Widget type="Widget" skin="MW_Box" position="234 298 15 14">
|
||||||
<Widget type="Button" skin="MW_ArrowRight" position="1 2 10 10" align="Right VStretch" name="NextGenderButton"/>
|
<Widget type="Button" skin="MW_ArrowRight" position="2 2 10 10" align="Right VStretch" name="NextGenderButton"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<!-- Face choice -->
|
<!-- Face choice -->
|
||||||
|
|
||||||
<Widget type="Widget" skin="MW_Box" position="8 320 15 14">
|
<Widget type="Widget" skin="MW_Box" position="8 320 15 14">
|
||||||
<Widget type="Button" skin="MW_ArrowLeft" position="3 2 10 10" align="Left VStretch" name="PrevFaceButton"/>
|
<Widget type="Button" skin="MW_ArrowLeft" position="2 2 10 10" align="Left VStretch" name="PrevFaceButton"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<Widget type="TextBox" skin="HeaderText" position="25 316 205 18" name="FaceChoiceT"/>
|
<Widget type="TextBox" skin="HeaderText" position="25 316 205 18" name="FaceChoiceT"/>
|
||||||
|
|
||||||
<Widget type="Widget" skin="MW_Box" position="234 320 15 14">
|
<Widget type="Widget" skin="MW_Box" position="234 320 15 14">
|
||||||
<Widget type="Button" skin="MW_ArrowRight" position="1 2 10 10" align="Right VStretch" name="NextFaceButton"/>
|
<Widget type="Button" skin="MW_ArrowRight" position="2 2 10 10" align="Right VStretch" name="NextFaceButton"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<!-- Hair choice -->
|
<!-- Hair choice -->
|
||||||
|
|
||||||
<Widget type="Widget" skin="MW_Box" position="8 342 15 14">
|
<Widget type="Widget" skin="MW_Box" position="8 342 15 14">
|
||||||
<Widget type="Button" skin="MW_ArrowLeft" position="3 2 10 10" align="Left VStretch" name="PrevHairButton"/>
|
<Widget type="Button" skin="MW_ArrowLeft" position="2 2 10 10" align="Left VStretch" name="PrevHairButton"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<Widget type="TextBox" skin="HeaderText" position="25 338 205 18" name="HairChoiceT"/>
|
<Widget type="TextBox" skin="HeaderText" position="25 338 205 18" name="HairChoiceT"/>
|
||||||
|
|
||||||
<Widget type="Widget" skin="MW_Box" position="234 342 15 14">
|
<Widget type="Widget" skin="MW_Box" position="234 342 15 14">
|
||||||
<Widget type="Button" skin="MW_ArrowRight" position="1 2 10 10" align="Right VStretch" name="NextHairButton"/>
|
<Widget type="Button" skin="MW_ArrowRight" position="2 2 10 10" align="Right VStretch" name="NextHairButton"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<!-- Race -->
|
<!-- Race -->
|
||||||
|
|
|
@ -22,10 +22,10 @@
|
||||||
<!-- Arrows -->
|
<!-- Arrows -->
|
||||||
|
|
||||||
<Child type="Widget" skin="MW_Box" offset="0 0 15 14" align="Left VStretch"/>
|
<Child type="Widget" skin="MW_Box" offset="0 0 15 14" align="Left VStretch"/>
|
||||||
<Child type="Button" skin="MW_ArrowLeft" offset="3 2 10 10" align="Left VStretch" name="Start"/>
|
<Child type="Button" skin="MW_ArrowLeft" offset="2 2 10 10" align="Left VStretch" name="Start"/>
|
||||||
|
|
||||||
<Child type="Widget" skin="MW_Box" offset="75 0 15 14" align="Right VStretch"/>
|
<Child type="Widget" skin="MW_Box" offset="75 0 15 14" align="Right VStretch"/>
|
||||||
<Child type="Button" skin="MW_ArrowRight" offset="76 2 10 10" align="Right VStretch" name="End"/>
|
<Child type="Button" skin="MW_ArrowRight" offset="77 2 10 10" align="Right VStretch" name="End"/>
|
||||||
|
|
||||||
<!-- These are only provided to get mouse input, they should have no skin and be transparent -->
|
<!-- These are only provided to get mouse input, they should have no skin and be transparent -->
|
||||||
|
|
||||||
|
@ -35,10 +35,10 @@
|
||||||
<Child type="Button" skin="MW_ScrollTrackH" offset="38 2 30 9" align="Left VStretch" name="Track"/>
|
<Child type="Button" skin="MW_ScrollTrackH" offset="38 2 30 9" align="Left VStretch" name="Track"/>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|
||||||
<Resource type="ResourceSkin" name="MW_ScrollTrackH" size="16 16" texture="textures\tx_menubook_bookmark.dds">
|
<Resource type="AutoSizedResourceSkin" name="MW_ScrollTrackH" texture="textures\omw_menu_scroll_center_h.dds">
|
||||||
<BasisSkin type="TileRect" offset="0 0 16 16" align="Stretch">
|
<Property key="MinTrackSize" value="14"/>
|
||||||
<State name="normal" offset="70 22 16 16">
|
<BasisSkin type="TileRect" align="Stretch">
|
||||||
<Property key="TileSize" value="16 16"/>
|
<State name="normal">
|
||||||
<Property key="TileH" value="true"/>
|
<Property key="TileH" value="true"/>
|
||||||
<Property key="TileV" value="true"/>
|
<Property key="TileV" value="true"/>
|
||||||
</State>
|
</State>
|
||||||
|
@ -64,10 +64,10 @@
|
||||||
<!-- Arrows -->
|
<!-- Arrows -->
|
||||||
|
|
||||||
<Child type="Widget" skin="MW_Box" offset="0 0 14 15" align="Top HStretch"/>
|
<Child type="Widget" skin="MW_Box" offset="0 0 14 15" align="Top HStretch"/>
|
||||||
<Child type="Button" skin="MW_ArrowUp" offset="2 3 10 10" align="Top HStretch" name="Start"/>
|
<Child type="Button" skin="MW_ArrowUp" offset="2 2 10 10" align="Top HStretch" name="Start"/>
|
||||||
|
|
||||||
<Child type="Widget" skin="MW_Box" offset="0 76 14 15" align="Bottom HStretch"/>
|
<Child type="Widget" skin="MW_Box" offset="0 76 14 15" align="Bottom HStretch"/>
|
||||||
<Child type="Button" skin="MW_ArrowDown" offset="2 77 10 10" align="Bottom HStretch" name="End"/>
|
<Child type="Button" skin="MW_ArrowDown" offset="2 78 10 10" align="Bottom HStretch" name="End"/>
|
||||||
|
|
||||||
<!-- These are only provided to get mouse input, they should have no skin and be transparent -->
|
<!-- These are only provided to get mouse input, they should have no skin and be transparent -->
|
||||||
|
|
||||||
|
@ -80,11 +80,10 @@
|
||||||
|
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|
||||||
<Resource type="ResourceSkin" name="MW_ScrollTrackV" size="16 16" texture="textures\tx_menubook_bookmark.dds">
|
<Resource type="AutoSizedResourceSkin" name="MW_ScrollTrackV" texture="textures\omw_menu_scroll_center_v.dds">
|
||||||
<Property key="MinTrackSize" value="14"/>
|
<Property key="MinTrackSize" value="14"/>
|
||||||
<BasisSkin type="TileRect" offset="0 0 16 16" align="Stretch">
|
<BasisSkin type="TileRect" align="Stretch">
|
||||||
<State name="normal" offset="68 19 16 16">
|
<State name="normal">
|
||||||
<Property key="TileSize" value="16 16"/>
|
|
||||||
<Property key="TileH" value="true"/>
|
<Property key="TileH" value="true"/>
|
||||||
<Property key="TileV" value="true"/>
|
<Property key="TileV" value="true"/>
|
||||||
</State>
|
</State>
|
||||||
|
@ -205,27 +204,27 @@
|
||||||
|
|
||||||
<!-- Arrows -->
|
<!-- Arrows -->
|
||||||
|
|
||||||
<Resource type="ResourceSkin" name="MW_ArrowLeft" size="20 20" texture="textures\menu_scroll_left.dds">
|
<Resource type="AutoSizedResourceSkin" name="MW_ArrowLeft" texture="textures\omw_menu_scroll_left.dds">
|
||||||
<BasisSkin type="SubSkin" offset="0 0 19 20" align="Stretch">
|
<BasisSkin type="SubSkin" align="Stretch">
|
||||||
<State name="normal" offset="0 0 19 20"/>
|
<State name="normal"/>
|
||||||
</BasisSkin>
|
</BasisSkin>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|
||||||
<Resource type="ResourceSkin" name="MW_ArrowRight" size="20 20" texture="textures\menu_scroll_right.dds">
|
<Resource type="AutoSizedResourceSkin" name="MW_ArrowRight" texture="textures\omw_menu_scroll_right.dds">
|
||||||
<BasisSkin type="SubSkin" offset="1 0 19 20" align="Stretch">
|
<BasisSkin type="SubSkin" align="Stretch">
|
||||||
<State name="normal" offset="1 0 19 20"/>
|
<State name="normal"/>
|
||||||
</BasisSkin>
|
</BasisSkin>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|
||||||
<Resource type="ResourceSkin" name="MW_ArrowUp" size="20 20" texture="textures\menu_scroll_up.dds">
|
<Resource type="AutoSizedResourceSkin" name="MW_ArrowUp" texture="textures\omw_menu_scroll_up.dds">
|
||||||
<BasisSkin type="SubSkin" offset="0 0 20 19" align="Stretch">
|
<BasisSkin type="SubSkin" align="Stretch">
|
||||||
<State name="normal" offset="0 0 20 19"/>
|
<State name="normal"/>
|
||||||
</BasisSkin>
|
</BasisSkin>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|
||||||
<Resource type="ResourceSkin" name="MW_ArrowDown" size="20 20" texture="textures\menu_scroll_down.dds">
|
<Resource type="AutoSizedResourceSkin" name="MW_ArrowDown" texture="textures\omw_menu_scroll_down.dds">
|
||||||
<BasisSkin type="SubSkin" offset="0 1 20 20" align="Stretch">
|
<BasisSkin type="SubSkin" align="Stretch">
|
||||||
<State name="normal" offset="0 1 20 20"/>
|
<State name="normal"/>
|
||||||
</BasisSkin>
|
</BasisSkin>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|
||||||
|
|
18
files/vfs/CMakeLists.txt
Normal file
18
files/vfs/CMakeLists.txt
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
if (NOT DEFINED OPENMW_MYGUI_FILES_ROOT)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Copy resource files into the build directory
|
||||||
|
set(SDIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
set(DDIRRELATIVE resources/vfs/textures)
|
||||||
|
|
||||||
|
set(TEXTURE_FILES
|
||||||
|
textures/omw_menu_scroll_down.dds
|
||||||
|
textures/omw_menu_scroll_up.dds
|
||||||
|
textures/omw_menu_scroll_left.dds
|
||||||
|
textures/omw_menu_scroll_right.dds
|
||||||
|
textures/omw_menu_scroll_center_h.dds
|
||||||
|
textures/omw_menu_scroll_center_v.dds
|
||||||
|
)
|
||||||
|
|
||||||
|
copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_MYGUI_FILES_ROOT} ${DDIRRELATIVE} "${TEXTURE_FILES}")
|
BIN
files/vfs/textures/omw_menu_scroll_center_h.dds
Normal file
BIN
files/vfs/textures/omw_menu_scroll_center_h.dds
Normal file
Binary file not shown.
BIN
files/vfs/textures/omw_menu_scroll_center_v.dds
Normal file
BIN
files/vfs/textures/omw_menu_scroll_center_v.dds
Normal file
Binary file not shown.
BIN
files/vfs/textures/omw_menu_scroll_down.dds
Normal file
BIN
files/vfs/textures/omw_menu_scroll_down.dds
Normal file
Binary file not shown.
BIN
files/vfs/textures/omw_menu_scroll_left.dds
Normal file
BIN
files/vfs/textures/omw_menu_scroll_left.dds
Normal file
Binary file not shown.
BIN
files/vfs/textures/omw_menu_scroll_right.dds
Normal file
BIN
files/vfs/textures/omw_menu_scroll_right.dds
Normal file
Binary file not shown.
BIN
files/vfs/textures/omw_menu_scroll_up.dds
Normal file
BIN
files/vfs/textures/omw_menu_scroll_up.dds
Normal file
Binary file not shown.
Loading…
Reference in a new issue