thicker lines in file icons
[vrfileman] / src / fs.cc
index 032fd66..aedeacd 100644 (file)
--- a/src/fs.cc
+++ b/src/fs.cc
@@ -122,7 +122,7 @@ void draw_fs()
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
        int nchildren = (int)cur_node->children.size();
-       int ncols = std::min(cur_node->nfiles, max_ncols);
+       int ncols = std::max(std::min(cur_node->nfiles, max_ncols), 1);
 
        int first = start_child % ncols;
        int col = 0, row = 0;
@@ -137,6 +137,8 @@ void draw_fs()
        }
 
        // draw the directory link lines
+       glUseProgram(glow_link_sdr);
+       set_uniform_float(glow_link_sdr, "tsec", time_sec);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE);
 
        for(int i=0; i<nchildren; i++) {
@@ -152,21 +154,22 @@ void draw_fs()
                xform.rotate_y(angle);
                xform.translate(0, -0.3, 0);
 
-               glUseProgram(glow_link_sdr);
                glPushMatrix();
                glMultMatrixf(xform[0]);
                glDepthMask(0);
 
+               set_uniform_float(glow_link_sdr, "phase", col * 42.0);
+
                glBegin(GL_QUADS);
                glColor3f(0.2, 0.3, 0.8);
                glTexCoord2f(0, 0);
-               glVertex3f(-0.25, 0, 0.05);
+               glVertex3f(-0.2, 0, 0.05);
                glTexCoord2f(1, 0);
-               glVertex3f(0.25, 0, 0.05);
+               glVertex3f(0.2, 0, 0.05);
                glTexCoord2f(1, 1);
-               glVertex3f(0.25, 0, -2.0);
+               glVertex3f(0.2, 0, -5.0);
                glTexCoord2f(0, 1);
-               glVertex3f(-0.25, 0, -2.0);
+               glVertex3f(-0.2, 0, -5.0);
                glColor3f(1, 1, 1);
                glEnd();
                glPopMatrix();
@@ -192,6 +195,7 @@ void draw_fs()
        // then draw file icons
        glDisable(GL_BLEND);
        glUseProgram(0);
+       glLineWidth(2.0);
        col = 0;
        for(int i=0; i<nchildren; i++) {
                int idx = (i + first) % nchildren;
@@ -218,6 +222,7 @@ void draw_fs()
                        ++row;
                }
        }
+       glLineWidth(1.0);
 
        // then draw the file labels
        glUseProgram(chrome_font_sdr);