X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrfileman;a=blobdiff_plain;f=src%2Ffs.cc;h=3db00122e9b70a35d803e1c411dbac75257df323;hp=032fd66865b6cb15b3b6b92e9c2468c4a7d5ab94;hb=HEAD;hpb=47fdbdc2feec8d097d296fe019fbeb653c0b0efc diff --git a/src/fs.cc b/src/fs.cc index 032fd66..3db0012 100644 --- a/src/fs.cc +++ b/src/fs.cc @@ -107,6 +107,7 @@ void draw_fs() static const float radius = 0.6; static const float umax = 0.42; static const float max_icon_angle = M_PI * 2.0 * umax; + static const float first_row_y = -row_spacing; int max_ncols = std::max(1, umax * 12); @@ -122,7 +123,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 +138,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= ncols) { col = 0; @@ -255,11 +261,11 @@ static void draw_node_name(FSNode *node, float angle, float ypos, float dist, bo const char *name = full ? node->name_lines[i].c_str() : node->short_name.c_str(); glPushMatrix(); Mat4 xform; - xform.translate(-dtx_string_width(name) / 2.0, -line_height * i, 0); + xform.translate(-dtx_string_width(name) / 2.0, -line_height * i - line_height * 0.5, 0); if(node->type == FSTYPE_DIR) { xform.rotate_z(deg_to_rad(90)); xform.rotate_x(deg_to_rad(-90)); - xform.scale(0.0017); + xform.scale(0.0018); } else { xform.scale(0.0012); }