projects
/
vrfileman
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed scale in VR
[vrfileman]
/
src
/
fs.cc
diff --git
a/src/fs.cc
b/src/fs.cc
index
0da07e5
..
a3e5b81
100644
(file)
--- a/
src/fs.cc
+++ b/
src/fs.cc
@@
-25,7
+25,7
@@
static dtx_font *fat_font;
#define FAT_FONT_SZ 32
#define FAT_FONT_SZ 32
-bool init_fs()
+bool init_fs(const char *path)
{
iconrend = new ShapesIcons;
if(!iconrend->init()) {
{
iconrend = new ShapesIcons;
if(!iconrend->init()) {
@@
-37,7
+37,7
@@
bool init_fs()
return false;
}
return false;
}
- cur_node = get_fsnode(0);
+ cur_node = get_fsnode(path);
cur_node->expand();
return true;
}
cur_node->expand();
return true;
}
@@
-73,7
+73,7
@@
static float icon_angle(int col, int ncols, float max_angle = 0.0f)
void draw_fs()
{
static const float row_spacing = 2.0;
void draw_fs()
{
static const float row_spacing = 2.0;
- static const float radius = 5;
+ 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 umax = 0.42;
static const float max_icon_angle = M_PI * 2.0 * umax;
@@
-82,7
+82,7
@@
void draw_fs()
Mat4 base_xform;
base_xform.rotate(time_sec, 0, 0);
base_xform.rotate(0, 0, time_sec * 0.5);
Mat4 base_xform;
base_xform.rotate(time_sec, 0, 0);
base_xform.rotate(0, 0, time_sec * 0.5);
- base_xform.translate(0, 2, 0);
+ base_xform.translate(0, 1.65, 0);
glUseProgram(0);
glDisable(GL_TEXTURE_2D);
glUseProgram(0);
glDisable(GL_TEXTURE_2D);
@@
-115,8
+115,8
@@
void draw_fs()
glPushMatrix();
xform = Mat4::identity;
xform.translate(-dtx_string_width(node->path.get_name()) / 2.0, 0, 0);
glPushMatrix();
xform = Mat4::identity;
xform.translate(-dtx_string_width(node->path.get_name()) / 2.0, 0, 0);
- xform.scale(0.01);
- xform.translate(0, 1 + row * row_spacing, -radius);
+ xform.scale(0.001);
+ xform.translate(0, 1.54 + row * row_spacing, -radius);
xform.rotate_y(angle);
glMultMatrixf(xform[0]);
xform.rotate_y(angle);
glMultMatrixf(xform[0]);