diff options
| author | navewindre <boneyaard@gmail.com> | 2018-09-16 19:47:02 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-09-16 19:47:02 +0200 |
| commit | fb2b56fd3c26d37ef198fe6dbf651104656f8a34 (patch) | |
| tree | a945e6ca2ca0691656634644998b29b5619672eb /internal_rewrite/ui_color_picker.h | |
| parent | 559a0f5669f537e21f3d39780e6e3d77591ff8c1 (diff) | |
fd
Diffstat (limited to 'internal_rewrite/ui_color_picker.h')
| -rw-r--r-- | internal_rewrite/ui_color_picker.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal_rewrite/ui_color_picker.h b/internal_rewrite/ui_color_picker.h index 7155691..8404e19 100644 --- a/internal_rewrite/ui_color_picker.h +++ b/internal_rewrite/ui_color_picker.h @@ -147,7 +147,7 @@ namespace ui }; auto is_alpha_slider_hovered = [&]( ) -> bool { - return mouse_x > x + 1 && mouse_x < x + 122 + return mouse_x > x + 0 && mouse_x < x + 122 && mouse_y > y + 110 && mouse_y < y + 124; }; @@ -172,7 +172,7 @@ namespace ui draw_slider_alpha( ); if ( is_alpha_slider_hovered( ) && g_input.is_key_pressed( KEYS_MOUSE1 ) ) { - int delta = std::clamp( mouse_x - x, 0, 121 ); + int delta = std::clamp( mouse_x - x, -1, 122 ); m_alpha = ( int )( float( delta ) * 255.f / 121.f ); } |
