Ejemplo n.º 1
0
void RFile::drawNameText(float alpha) {
    if(!selected && alpha <= 0.01) return;

    float name_alpha = selected ? 1.0 : alpha;

    if(selected) {
        file_selected_font.draw(screenpos.x, screenpos.y, name);
    } else {
        file_font.setAlpha(name_alpha);
        file_font.draw(screenpos.x, screenpos.y, gGourceSettings.file_extensions ? ext : name);
    }
}
Ejemplo n.º 2
0
void RDirNode::drawDirName(FXFont& dirfont) const{
    if(parent==0) return;
    if(gGourceSettings.hide_dirnames) return;

    if(!gGourceSettings.highlight_dirs && since_last_node_change > 5.0) return;

    float alpha = gGourceSettings.highlight_dirs ? 1.0 : std::max(0.0f, 5.0f - since_last_node_change) / 5.0f;

    vec2f mid = spline.getMidPoint();

    dirfont.setAlpha(alpha);
    dirfont.draw(mid.x, mid.y, path_token);
}