diff --git a/Wabbajack.Common/Extensions/RxExt.cs b/Wabbajack.Common/Extensions/RxExt.cs index 25ac87b2..0018d3a8 100644 --- a/Wabbajack.Common/Extensions/RxExt.cs +++ b/Wabbajack.Common/Extensions/RxExt.cs @@ -60,6 +60,32 @@ namespace Wabbajack .Switch(); } + /// + /// Convenience operator to subscribe to the source observable, only when a second "switch" observable is on. + /// When the switch is on, the source will be subscribed to, and its updates passed through. + /// When the switch is off, the subscription to the source observable will be stopped, and no signal will be published. + /// + /// Source observable to subscribe to if on + /// On/Off signal of whether to subscribe to source observable + /// Value to fire when switching off + /// Observable that publishes data from source, if the switch is on. + public static IObservable FilterSwitch(this IObservable source, IObservable filterSwitch, T valueWhenOff) + { + return filterSwitch + .DistinctUntilChanged() + .Select(on => + { + if (on) + { + return source; + } + else + { + return Observable.Return(valueWhenOff); + } + }) + .Switch(); + } /// Inspiration: /// http://reactivex.io/documentation/operators/debounce.html diff --git a/Wabbajack/Themes/Styles.xaml b/Wabbajack/Themes/Styles.xaml index b9cb0511..e5ce7573 100644 --- a/Wabbajack/Themes/Styles.xaml +++ b/Wabbajack/Themes/Styles.xaml @@ -1,27 +1,29 @@ - + - + - - + + - + #121212 #292929 #414141 #3D3D3D #424242 + #394140 #666666 - + #EFEFEF #BDBDBD @@ -34,6 +36,7 @@ #BB86FC #3700B3 #03DAC6 + #0e8f83 #C7FC86 #868CFC #F686FC @@ -50,102 +53,103 @@ - - - + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - + - - + + - - - - - - - - + + + + + + + + - - - - + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - + + - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + M-0.7,5.2 L-2.2,6.7 3.6,12.6 9.5,6.7 8,5.2 3.6,9.6 z M-2.2,10.9 L-0.7,12.4 3.7,8 8,12.4 9.5,10.9 3.7,5 z @@ -158,40 +162,40 @@ M3.5445026,0 L7.0890052,7.0890053 L3.0459049E-09,7.0890053 z M-0,6 L-0,8 8,8 8,-0 6,-0 6,6 z M5,-0 L9,5 1,5 z - - + + - + - + @@ -240,138 +244,149 @@ - + - + - - + - + - + - + + + + + + - - + + + - - + + + - - + + @@ -1297,53 +1457,57 @@ - + - + - + - + - + - + - + - + - + - + - + - - + + - - - - - - + + + + + + - - - + + + - - + + - + - - + + - - - + + + - - + + - - - - + - - - + + + - + - - + + - - + + - + @@ -2491,170 +2810,194 @@ - + - + - - + + - - - + + + - - - + + + - + - + - - + + - - - + + + - + - - - + + + - + - - + + - - - + + + - + - - + + - + - - - - - - + + + + + + - - - + + + - - - + + + - + - - + + - - + + - + @@ -2663,113 +3006,118 @@ - + - + - - + + - - - + + + - - - - + + + + - - + + - - - + + + - - + + - - + + - - - + + + - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + diff --git a/Wabbajack/Views/Compilers/CompilerView.xaml b/Wabbajack/Views/Compilers/CompilerView.xaml index 6916376e..89636ccc 100644 --- a/Wabbajack/Views/Compilers/CompilerView.xaml +++ b/Wabbajack/Views/Compilers/CompilerView.xaml @@ -85,7 +85,10 @@ - diff --git a/Wabbajack/Views/Compilers/VortexCompilerConfigView.xaml b/Wabbajack/Views/Compilers/VortexCompilerConfigView.xaml index 19b2a7bd..24649bd6 100644 --- a/Wabbajack/Views/Compilers/VortexCompilerConfigView.xaml +++ b/Wabbajack/Views/Compilers/VortexCompilerConfigView.xaml @@ -46,7 +46,7 @@ ToolTip="The game you wish to target"> - +