Topic: need some explanation
mh... i really dont understand the following code:
int PrevColor = *paColors[i];
int Color = 0;
for(int s = 0; s < 3; s++)
{
CUIRect Text;
RightView.HSplitTop(19.0f, &Button, &RightView);
Button.VSplitLeft(30.0f, 0, &Button);
Button.VSplitLeft(70.0f, &Text, &Button);
Button.VSplitRight(5.0f, &Button, 0);
Button.HSplitTop(4.0f, 0, &Button);
float k = ((PrevColor>>((2-s)*8))&0xff) / 255.0f;
k = DoScrollbarH(&s_aColorSlider[i][s], &Button, k);
Color <<= 8;
Color += clamp((int)(k*255), 0, 255);
UI()->DoLabel(&Text, paLabels[s], 15.0f, -1);
}
could somebody explain it line-by-line?
(its in menus_settings.cpp, CMenus::RenderSettingsPlayer(), around line 200)