History

move avatar size changes to Avatar slots

Stephen Birarda committed 13 years ago

Commit 811fc871 parent 92b64595 files · +39 −32Browse files

Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all

Unified · Split

interface/src/Application.cpp+2−21
@@ -710,10 +710,10 @@ void Application::keyPressEvent(QKeyEvent* event) { · 709 unmodified lines
710 }710 }
711 break;711 break;
712 case Qt::Key_Plus:712 case Qt::Key_Plus:
713 increaseAvatarSize();713 _myAvatar.increaseSize();
714 break;714 break;
715 case Qt::Key_Minus:715 case Qt::Key_Minus:
716 decreaseAvatarSize();716 _myAvatar.decreaseSize();
717 break;717 break;
718 718
719 case Qt::Key_1:719 case Qt::Key_1:
@@ -1142,25 +1142,6 @@ void Application::setFullscreen(bool fullscreen) { · 422 unmodified lines
1142 updateCursor();1142 updateCursor();
1143}1143}
1144 1144
1145void Application::increaseAvatarSize() {
1146 if ((1.f + SCALING_RATIO) * _myAvatar.getNewScale() < MAX_SCALE) {
1147 _myAvatar.setNewScale((1.f + SCALING_RATIO) * _myAvatar.getNewScale());
1148 qDebug("Changed scale to %f\n", _myAvatar.getNewScale());
1149 }
1150}
1151
1152void Application::decreaseAvatarSize() {
1153 if (MIN_SCALE < (1.f - SCALING_RATIO) * _myAvatar.getNewScale()) {
1154 _myAvatar.setNewScale((1.f - SCALING_RATIO) * _myAvatar.getNewScale());
1155 qDebug("Changed scale to %f\n", _myAvatar.getNewScale());
1156 }
1157}
1158
1159void Application::resetAvatarSize() {
1160 _myAvatar.setNewScale(1.f);
1161 qDebug("Reseted scale to %f\n", _myAvatar.getNewScale());
1162}
1163
1164void Application::setFrustumOffset(bool frustumOffset) {1145void Application::setFrustumOffset(bool frustumOffset) {
1165 // reshape so that OpenGL will get the right lens details for the camera of choice 1146 // reshape so that OpenGL will get the right lens details for the camera of choice
1166 resizeGL(_glWidget->width(), _glWidget->height());1147 resizeGL(_glWidget->width(), _glWidget->height());

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t