Renaming, I don't like this
This commit is contained in:
@@ -368,13 +368,13 @@ void OnCommand(Event event) {
|
||||
if (mouse_in_scrollbar) {
|
||||
ScrollbarSelected = it->id;
|
||||
|
||||
View *view = GetView(it->active_view);
|
||||
Vec2 mouse_vec2 = MouseVec2();
|
||||
Scroller s = ComputeScrollerRect(it);
|
||||
double size_y = (double)GetSize(it->scrollbar_rect).y;
|
||||
double p = mouse_vec2.y - it->scrollbar_rect.min.y;
|
||||
View *view = GetView(it->active_view);
|
||||
Vec2 mouse_vec2 = MouseVec2();
|
||||
Scroller s = ComputeScrollerRect(it);
|
||||
double size_y = (double)GetSize(it->scrollbar_rect).y;
|
||||
double p = mouse_vec2.y - it->scrollbar_rect.min.y;
|
||||
if (mouse_vec2.y < s.rect.min.y || mouse_vec2.y > s.rect.max.y) {
|
||||
view->scroll.y = (Int)(p / size_y * (double)s.line_count * (double)it->font->line_spacing);
|
||||
view->scroll.y = (Int)(p / size_y * (double)s.line_count * (double)it->font->line_spacing);
|
||||
it->mouse_scroller_offset = -(double)GetSize(s.rect).y / 2.0 / size_y;
|
||||
} else {
|
||||
it->mouse_scroller_offset = (s.rect.min.y - p) / size_y;
|
||||
|
||||
Reference in New Issue
Block a user