Skip to content

Commit

Permalink
format usage
Browse files Browse the repository at this point in the history
  • Loading branch information
LiangliangNan committed Sep 13, 2024
1 parent 83ab6ea commit 1fb6c57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions applications/FigureMaker/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@ int main(int argc, char** argv) {
// usage
viewer.set_usage(
"Usage:\n"
"\tCtrl + o: add model(s) to the viewer\n"
"\tCtrl + l: toggle lighting\n"
"\tCtrl + d: toggle dividign lines"
"--------------------------------------\n"
" Ctrl + o: add model(s) to the viewer\n"
" ------------------------------------\n"
" s: snapshot\n"
" ------------------------------------\n"
" l: toggle lighting\n"
" d: toggle dividign lines\n"
"--------------------------------------\n"
);

// run the viewer
Expand Down
4 changes: 2 additions & 2 deletions applications/FigureMaker/viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ namespace easy3d {
}

bool FigureMaker::key_press_event(int key, int modifiers) {
if (key == KEY_D && modifiers == MODIF_CTRL)
if (key == KEY_D)
set_division_visible(!division_visible_);
else if (key == KEY_L && modifiers == MODIF_CTRL) {
else if (key == KEY_L) {
for (const auto model : models_) {
const auto& tri_drawables = model->renderer()->triangles_drawables();
for (auto d : tri_drawables) d->set_lighting(!d->lighting());
Expand Down

0 comments on commit 1fb6c57

Please sign in to comment.