From ae935a8084711b20631682676c645af1b212e4b2 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sat, 1 Jun 2019 15:57:26 +0400 Subject: [PATCH] Add separate textures for scrollbars (feature #5051) --- CHANGELOG.md | 1 + apps/openmw/engine.cpp | 3 +- apps/openmw/main.cpp | 3 +- files/CMakeLists.txt | 1 + files/mygui/openmw_chargen_race.layout | 12 ++--- files/mygui/openmw_list.skin.xml | 47 +++++++++--------- files/vfs/CMakeLists.txt | 18 +++++++ .../vfs/textures/omw_menu_scroll_center_h.dds | Bin 0 -> 640 bytes .../vfs/textures/omw_menu_scroll_center_v.dds | Bin 0 -> 640 bytes files/vfs/textures/omw_menu_scroll_down.dds | Bin 0 -> 1152 bytes files/vfs/textures/omw_menu_scroll_left.dds | Bin 0 -> 1152 bytes files/vfs/textures/omw_menu_scroll_right.dds | Bin 0 -> 1152 bytes files/vfs/textures/omw_menu_scroll_up.dds | Bin 0 -> 1152 bytes 13 files changed, 52 insertions(+), 33 deletions(-) create mode 100644 files/vfs/CMakeLists.txt create mode 100644 files/vfs/textures/omw_menu_scroll_center_h.dds create mode 100644 files/vfs/textures/omw_menu_scroll_center_v.dds create mode 100644 files/vfs/textures/omw_menu_scroll_down.dds create mode 100644 files/vfs/textures/omw_menu_scroll_left.dds create mode 100644 files/vfs/textures/omw_menu_scroll_right.dds create mode 100644 files/vfs/textures/omw_menu_scroll_up.dds diff --git a/CHANGELOG.md b/CHANGELOG.md index c5c6a0885..35b901033 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index c67aaffa4..07127d28b 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -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 diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index 51a256345..a39dd2e39 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -192,6 +192,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat cfgMgr.processPaths(dataDirs); + engine.setResourceDir(variables["resources"].as().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().toStdString()); - StringsVector content = variables["content"].as().toStdStringVector(); if (content.empty()) { diff --git a/files/CMakeLists.txt b/files/CMakeLists.txt index 75cb6a9b0..98123acb9 100644 --- a/files/CMakeLists.txt +++ b/files/CMakeLists.txt @@ -1,2 +1,3 @@ add_subdirectory(mygui) add_subdirectory(shaders) +add_subdirectory(vfs) diff --git a/files/mygui/openmw_chargen_race.layout b/files/mygui/openmw_chargen_race.layout index 3b0a0191f..71f6dc476 100644 --- a/files/mygui/openmw_chargen_race.layout +++ b/files/mygui/openmw_chargen_race.layout @@ -19,37 +19,37 @@ - + - + - + - + - + - + diff --git a/files/mygui/openmw_list.skin.xml b/files/mygui/openmw_list.skin.xml index 8795d9bbd..ccaeb0319 100644 --- a/files/mygui/openmw_list.skin.xml +++ b/files/mygui/openmw_list.skin.xml @@ -22,10 +22,10 @@ - + - + @@ -35,10 +35,10 @@ - - - - + + + + @@ -64,10 +64,10 @@ - + - + @@ -80,11 +80,10 @@ - + - - - + + @@ -205,27 +204,27 @@ - - - + + + - - - + + + - - - + + + - - - + + + diff --git a/files/vfs/CMakeLists.txt b/files/vfs/CMakeLists.txt new file mode 100644 index 000000000..a97210d1d --- /dev/null +++ b/files/vfs/CMakeLists.txt @@ -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}") diff --git a/files/vfs/textures/omw_menu_scroll_center_h.dds b/files/vfs/textures/omw_menu_scroll_center_h.dds new file mode 100644 index 0000000000000000000000000000000000000000..38c09a59053b4239c1f52f1f3db693d82f8c3f1a GIT binary patch literal 640 zcmZ>930A0KU|?Vu;9w8{(h5M#zyu-~7#M-r-P1Qf*Tp56k%1X3hL2DHO0od4OGJn% zR&^i?(7^xyo|9C7Xv10Gy?f&R?LzSLj;=oSb00GQ(*Ixv82{qgyrYkm_rHblKc3A$ zI-~up7>o~+4~kyB0-68r-n=dtf5Tb7qtSooIKlXr&h{VuAC~S7R-e77l8ix$HZ<2<9`IY?|MWB0`fxZI(l?*Oy literal 0 HcmV?d00001 diff --git a/files/vfs/textures/omw_menu_scroll_center_v.dds b/files/vfs/textures/omw_menu_scroll_center_v.dds new file mode 100644 index 0000000000000000000000000000000000000000..156255614bdd6e69135ddbf6335cd09932d0b489 GIT binary patch literal 640 zcmZ>930A0KU|?Vu;9yVy(gHxtzyu-~7#M-r-P1Qf*Tp56k%1X3hL2DHO0od4OGJn% zR&`**QDy%B_nf2xL>tcf9nF=sYlrbKp3OTNzwZBH82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sr70;+f|$h<^f#QQ2}1R__H=kX4*txtWigfg&v9aRs?;JZZrjsm{KpI_QJE(gTUw3ITZs zqDX&+2pOa|6N$^Mi{+(jD)uPMPx$h3q$+KYsvWfc$}=!Al4SlePk2BWohR;sZ> zs^MnjOj=V+EGs3HT^nfIUSn7rlTlEGT-Rx6j1I_{^l6b?(@F&LZAJeiNMBZ<$ieM< zkKhfCf;--_X7%`fDGhmV(FsdYLPd~P8)L&-i7JB%bPTfuXzUn)!{39;59V=gdJ)6(OBk77#@LJZxcc-p z9JQ^mme;SzwArf?RaQXCn1y^DuA+gpmDj=F){Dw3H{lzeMD5UB^ge!x>#sgzV&N0U zXWwCR=mHI*3D+Eie-}oBH5t9)R;~Kk|K@ zs2`n#r*#N{@hMomL5P^bTfCkodIIwO92Djfm@8UfI@Sb^Xbzw0hTY!$-ewrf znh<9w`66bDMrArrXo$4d$`XLqSddv7fG02jTlEE)D$gU|-%Zd3O>Q~j^f@b0V%5dS z_!K4Imp5ALB3Rc;i9WZg4eo}1xa#|0aMvNpb^-#0<)5+gNs ILJx6&110nm2mk;8 literal 0 HcmV?d00001 diff --git a/files/vfs/textures/omw_menu_scroll_up.dds b/files/vfs/textures/omw_menu_scroll_up.dds new file mode 100644 index 0000000000000000000000000000000000000000..9261490c1f6ba4a58b499016a85c93fca4c3fd0e GIT binary patch literal 1152 zcmbu6Yej3`<4nviUT z$1<1&7Y`wc%4~lalf4~eecI$&LZl1t%h`x!S;0v)IDcadYDAEYcnOaeC@KdPbkaUmZ;wDYEl4Tid>5 z5T76ekt!p^5`WDzbCnZurOjwQcME5p&cfQ(14~WYc(SeGuYFjj2+!1}ReVdV?m}9{ zZtS{z7eg~&(Kq=4is1OqieOXoQpqKuIj(CzZPK`*v;_(Fy+|z=_zQ36FgQJjWLqO- zjNy?|qn8n~_@naB6c;NE+hp_)Pld6p9f?(YkYejV>%}`bJN*R%FFvB<${6ITxOs_O zWfN*xjKQB}YV#|7K|N9{oiLZR!c@Es*3Oe?yFQNIiFfFmnnhuA&rhY=FiPD$g&4x@ z8xmj0B$j{Auy-P-?g+9Shbdo=+@_=0Idt2_9)B_e=hb@%(WQP0)W&TQNDtzzjB)b~ zP8eYl%3v&M1Y5HYM(Yk3^0uOY^0hse(9nMq-S=PP*yu|bESnLaHBN}!B(x8NF#1AW zpe`4x*kS}3GNIIEP^Ci=kpUa!%UimUWNm}Fs0Ge}VKg1;hg@U&q0pEdJWsi6JgbT= zfkJD7Uuc4$NDHKzB-ouN5TDj`AGk1w~po j-_R6}@*L$k%5&;iD<@%MPVqj{4UxU>p7LnEhX1i&0r(S{ literal 0 HcmV?d00001