Add separate textures for scrollbars (feature #5051)

pull/2407/head
Andrei Kortunov 5 years ago
parent 58f8d1ac04
commit ae935a8084

@ -125,6 +125,7 @@
Feature #5033: Magic armor mitigation for creatures
Feature #5034: Make enchanting window stay open after a failed attempt
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 #4695: Optimize Distant Terrain memory consumption
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)
{
mDataDirs = dataDirs;
mFileCollections = Files::Collections (dataDirs, !mFSStrict);
mDataDirs.insert(mDataDirs.begin(), (mResDir / "vfs"));
mFileCollections = Files::Collections (mDataDirs, !mFSStrict);
}
// Add BSA archive

@ -192,6 +192,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
cfgMgr.processPaths(dataDirs);
engine.setResourceDir(variables["resources"].as<Files::EscapeHashString>().toStdString());
engine.setDataDirs(dataDirs);
// fallback archives
@ -201,8 +202,6 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
engine.addArchive(*it);
}
engine.setResourceDir(variables["resources"].as<Files::EscapeHashString>().toStdString());
StringsVector content = variables["content"].as<Files::EscapeStringVector>().toStdStringVector();
if (content.empty())
{

@ -1,2 +1,3 @@
add_subdirectory(mygui)
add_subdirectory(shaders)
add_subdirectory(vfs)

@ -19,37 +19,37 @@
<!-- Gender choice -->
<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 type="TextBox" skin="HeaderText" position="25 294 205 18" name="GenderChoiceT"/>
<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>
<!-- Face choice -->
<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 type="TextBox" skin="HeaderText" position="25 316 205 18" name="FaceChoiceT"/>
<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>
<!-- Hair choice -->
<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 type="TextBox" skin="HeaderText" position="25 338 205 18" name="HairChoiceT"/>
<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>
<!-- Race -->

@ -22,10 +22,10 @@
<!-- Arrows -->
<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="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 -->
@ -35,10 +35,10 @@
<Child type="Button" skin="MW_ScrollTrackH" offset="38 2 30 9" align="Left VStretch" name="Track"/>
</Resource>
<Resource type="ResourceSkin" name="MW_ScrollTrackH" size="16 16" texture="textures\tx_menubook_bookmark.dds">
<BasisSkin type="TileRect" offset="0 0 16 16" align="Stretch">
<State name="normal" offset="70 22 16 16">
<Property key="TileSize" value="16 16"/>
<Resource type="AutoSizedResourceSkin" name="MW_ScrollTrackH" texture="textures\omw_menu_scroll_center_h.dds">
<Property key="MinTrackSize" value="14"/>
<BasisSkin type="TileRect" align="Stretch">
<State name="normal">
<Property key="TileH" value="true"/>
<Property key="TileV" value="true"/>
</State>
@ -64,10 +64,10 @@
<!-- Arrows -->
<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="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 -->
@ -80,11 +80,10 @@
</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"/>
<BasisSkin type="TileRect" offset="0 0 16 16" align="Stretch">
<State name="normal" offset="68 19 16 16">
<Property key="TileSize" value="16 16"/>
<BasisSkin type="TileRect" align="Stretch">
<State name="normal">
<Property key="TileH" value="true"/>
<Property key="TileV" value="true"/>
</State>
@ -205,27 +204,27 @@
<!-- Arrows -->
<Resource type="ResourceSkin" name="MW_ArrowLeft" size="20 20" texture="textures\menu_scroll_left.dds">
<BasisSkin type="SubSkin" offset="0 0 19 20" align="Stretch">
<State name="normal" offset="0 0 19 20"/>
<Resource type="AutoSizedResourceSkin" name="MW_ArrowLeft" texture="textures\omw_menu_scroll_left.dds">
<BasisSkin type="SubSkin" align="Stretch">
<State name="normal"/>
</BasisSkin>
</Resource>
<Resource type="ResourceSkin" name="MW_ArrowRight" size="20 20" texture="textures\menu_scroll_right.dds">
<BasisSkin type="SubSkin" offset="1 0 19 20" align="Stretch">
<State name="normal" offset="1 0 19 20"/>
<Resource type="AutoSizedResourceSkin" name="MW_ArrowRight" texture="textures\omw_menu_scroll_right.dds">
<BasisSkin type="SubSkin" align="Stretch">
<State name="normal"/>
</BasisSkin>
</Resource>
<Resource type="ResourceSkin" name="MW_ArrowUp" size="20 20" texture="textures\menu_scroll_up.dds">
<BasisSkin type="SubSkin" offset="0 0 20 19" align="Stretch">
<State name="normal" offset="0 0 20 19"/>
<Resource type="AutoSizedResourceSkin" name="MW_ArrowUp" texture="textures\omw_menu_scroll_up.dds">
<BasisSkin type="SubSkin" align="Stretch">
<State name="normal"/>
</BasisSkin>
</Resource>
<Resource type="ResourceSkin" name="MW_ArrowDown" size="20 20" texture="textures\menu_scroll_down.dds">
<BasisSkin type="SubSkin" offset="0 1 20 20" align="Stretch">
<State name="normal" offset="0 1 20 20"/>
<Resource type="AutoSizedResourceSkin" name="MW_ArrowDown" texture="textures\omw_menu_scroll_down.dds">
<BasisSkin type="SubSkin" align="Stretch">
<State name="normal"/>
</BasisSkin>
</Resource>

@ -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}")
Loading…
Cancel
Save