Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Apr 17, 2024
1 parent 7dc979a commit 8609bb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/gauge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using namespace ruis;
gauge::gauge(utki::shared_ref<ruis::context> c, all_parameters p) :
widget(std::move(c), {.widget_params = std::move(p.widget_params)}),
blending_widget(this->context, std::move(p.blending_params)),
fraction_widget(this->context),
fraction_widget(this->context, {}),
params(std::move(p.params))
{}

Expand Down Expand Up @@ -69,7 +69,7 @@ void gauge::render(const matrix4& matrix) const
matrix4 mmm;
mmm.set_identity();
mmm.rotate(
-(this->params.start_angle_rad + (this->params.end_angle_rad - this->params.start_angle_rad) * this->fraction())
-(this->params.start_angle_rad + (this->params.end_angle_rad - this->params.start_angle_rad) * this->get_fraction())
);
{
auto div = this->arrow_tex->dims.x() * this->params.arm_fraction;
Expand Down
2 changes: 1 addition & 1 deletion src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ utki::shared_ref<ruis::widget> carcockpit::make_root_layout(utki::shared_ref<rui
auto& slider = w.get().get_widget_as<ruis::fraction_widget>("gauge_slider");

slider.fraction_change_handler = [&g = gauge](ruis::fraction_widget& s) {
g.set_fraction(s.fraction());
g.set_fraction(s.get_fraction());
};

auto car = w.get().try_get_widget_as<car_widget>("car_widget");
Expand Down

0 comments on commit 8609bb8

Please sign in to comment.