Skip to content

Commit

Permalink
made background curves dimmer
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed May 22, 2024
1 parent 8dcfb32 commit d516b0f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions fyrox-ui/src/curve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::{
text::TextBuilder,
widget::{Widget, WidgetBuilder, WidgetMessage},
BuildContext, Control, RcUiNodeHandle, Thickness, UiNode, UserInterface, VerticalAlignment,
BRUSH_BRIGHT,
BRUSH_BRIGHT, BRUSH_LIGHT,
};
use fxhash::FxHashSet;
use fyrox_graph::BaseSceneGraph;
Expand Down Expand Up @@ -818,6 +818,10 @@ impl Control for CurveEditor {
match msg {
CurveEditorMessage::SyncBackground(curves) => {
self.background_curves = CurvesContainer::from_native(curves);

for curve in self.background_curves.iter_mut() {
curve.brush = BRUSH_LIGHT;
}
}
CurveEditorMessage::Sync(curves) => {
let color_map = self
Expand Down Expand Up @@ -1693,7 +1697,11 @@ impl CurveEditorBuilder {
}

pub fn build(mut self, ctx: &mut BuildContext) -> Handle<UiNode> {
let background_curves = CurvesContainer::from_native(&self.curves);
let mut background_curves = CurvesContainer::from_native(&self.curves);
for curve in background_curves.iter_mut() {
curve.brush = BRUSH_LIGHT;
}

let curves = CurvesContainer::from_native(&self.curves);

let add_key;
Expand Down

0 comments on commit d516b0f

Please sign in to comment.