projects
/
vrfileman
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implemented a laser pointer
[vrfileman]
/
src
/
fs.cc
diff --git
a/src/fs.cc
b/src/fs.cc
index
aedeacd
..
3db0012
100644
(file)
--- 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 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<int>(1, umax * 12);
int max_ncols = std::max<int>(1, umax * 12);
@@
-152,7
+153,7
@@
void draw_fs()
Mat4 xform;
xform.rotate_y(angle);
Mat4 xform;
xform.rotate_y(angle);
- xform.translate(0, -0.3, 0);
+ xform.translate(0, -0.6, 0);
glPushMatrix();
glMultMatrixf(xform[0]);
glPushMatrix();
glMultMatrixf(xform[0]);
@@
-167,9
+168,9
@@
void draw_fs()
glTexCoord2f(1, 0);
glVertex3f(0.2, 0, 0.05);
glTexCoord2f(1, 1);
glTexCoord2f(1, 0);
glVertex3f(0.2, 0, 0.05);
glTexCoord2f(1, 1);
- glVertex3f(0.2, 0, -5.0);
+ glVertex3f(0.2, 0, -10.0);
glTexCoord2f(0, 1);
glTexCoord2f(0, 1);
- glVertex3f(-0.2, 0, -5.0);
+ glVertex3f(-0.2, 0, -10.0);
glColor3f(1, 1, 1);
glEnd();
glPopMatrix();
glColor3f(1, 1, 1);
glEnd();
glPopMatrix();
@@
-189,7
+190,7
@@
void draw_fs()
float angle = (float)col++ / (float)(num_dirs - 1) * max_icon_angle - max_icon_angle * 0.5;
float angle = (float)col++ / (float)(num_dirs - 1) * max_icon_angle - max_icon_angle * 0.5;
- draw_node_name(node, angle, -0.3, radius, false);
+ draw_node_name(node, angle, -0.6, radius * 1.2, false);
}
// then draw file icons
}
// then draw file icons
@@
-209,7
+210,7
@@
void draw_fs()
float angle = icon_angle(col, ncols, max_icon_angle);
Mat4 xform = rot_xform;
float angle = icon_angle(col, ncols, max_icon_angle);
Mat4 xform = rot_xform;
- xform.translate(0, row * row_spacing, -radius);
+ xform.translate(0, row * row_spacing + first_row_y, -radius);
xform.rotate_y(angle);
glPushMatrix();
xform.rotate_y(angle);
glPushMatrix();
@@
-239,7
+240,7
@@
void draw_fs()
float angle = icon_angle(col, ncols, max_icon_angle);
float angle = icon_angle(col, ncols, max_icon_angle);
- draw_node_name(node, angle, row * row_spacing - 0.1, radius, false);
+ draw_node_name(node, angle, row * row_spacing + first_row_y - 0.08, radius, false);
if(++col >= ncols) {
col = 0;
if(++col >= ncols) {
col = 0;
@@
-260,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;
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));
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);
}
} else {
xform.scale(0.0012);
}