Fix sliders displayed position. Pfew.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1609 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2010-09-11 00:37:43 +00:00
parent e44eb104fa
commit 79dbd3722a
2 changed files with 7 additions and 6 deletions

View File

@@ -1866,7 +1866,8 @@ void Window_draw_slider(T_Scroller_button * button)
button->Length-24,11,MC_Black/*MC_Dark*/);
if (button->Nb_elements>button->Nb_visibles)
slider_position+=Round_div(button->Position*(button->Length-24-button->Cursor_length),button->Nb_elements-button->Nb_visibles);
slider_position+=
((button->Length-24-button->Cursor_length)*(button->Position)+(button->Nb_elements-button->Nb_visibles)/2)/(button->Nb_elements-button->Nb_visibles);
Window_rectangle(slider_position,
button->Pos_Y,
@@ -1886,7 +1887,7 @@ void Window_draw_slider(T_Scroller_button * button)
if (button->Nb_elements>button->Nb_visibles)
slider_position+=
(button->Length-24-button->Cursor_length)*(button->Position)/(button->Nb_elements-button->Nb_visibles);
((button->Length-24-button->Cursor_length)*(button->Position)+(button->Nb_elements-button->Nb_visibles)/2)/(button->Nb_elements-button->Nb_visibles);
//
//(button->Position*) / (button->Nb_elements-button->Nb_visibles));