History

added scale in avatar packets eand slots to change it from the menu

atlante45 committed 13 years ago

Commit 280afed1 parent 786459611 files · +82 −52Browse files

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

Unified · Split

interface/src/Application.cpp+22−5
@@ -1182,6 +1182,24 @@ void Application::setRenderThirdPerson(bool thirdPerson) { · 1181 unmodified lines
11821182 }
11831183 }
11841184
1185+void Application::increaseAvatarSize() {
1186+ if (3.0f < _myAvatar.getScale() + 0.25f) {
1187+ return;
1188+ }
1189+
1190+ _myAvatar.setScale(_myAvatar.getScale() + 0.25f);
1191+ _myCamera.setScale(_myAvatar.getScale() + 0.25f);
1192+}
1193+
1194+void Application::decreaseAvatarSize() {
1195+ if (_myAvatar.getScale() + 0.25f < 0.25f) {
1196+ return;
1197+ }
1198+
1199+ _myAvatar.setScale(_myAvatar.getScale() - 0.25f);
1200+ _myCamera.setScale(_myAvatar.getScale() - 0.25f);
1201+}
1202+
11851203 void Application::setFrustumOffset(bool frustumOffset) {
11861204 // reshape so that OpenGL will get the right lens details for the camera of choice
11871205 resizeGL(_glWidget->width(), _glWidget->height());
@@ -1555,7 +1573,7 @@ void Application::initMenu() { · 367 unmodified lines
15551573 _renderAvatarsOn->setChecked(true);
15561574 (_renderAvatarBalls = renderMenu->addAction("Avatar as Balls"))->setCheckable(true);
15571575 _renderAvatarBalls->setChecked(false);
1558− renderMenu->addAction("Cycle Voxeltar Mode", _myAvatar.getVoxels(), SLOT(cycleMode()));
1576+ renderMenu->addAction("Cycle Voxel Mode", _myAvatar.getVoxels(), SLOT(cycleMode()));
15591577 (_renderFrameTimerOn = renderMenu->addAction("Show Timer"))->setCheckable(true);
15601578 _renderFrameTimerOn->setChecked(false);
15611579 (_renderLookatOn = renderMenu->addAction("Lookat Vectors"))->setCheckable(true);
@@ -1564,6 +1582,9 @@ void Application::initMenu() { · 2 unmodified lines
15641582 "First Person", this, SLOT(setRenderFirstPerson(bool)), Qt::Key_P))->setCheckable(true);
15651583 (_manualThirdPerson = renderMenu->addAction(
15661584 "Third Person", this, SLOT(setRenderThirdPerson(bool))))->setCheckable(true);
1585+ renderMenu->addAction("Increase Avatar Size", this, SLOT(increaseAvatarSize()), Qt::SHIFT | Qt::Key_Plus);
1586+ renderMenu->addAction("Decrease Avatar Siz+e", this, SLOT(decreaseAvatarSize()), Qt::SHIFT | Qt::Key_Minus);
1587+
15671588
15681589 QMenu* toolsMenu = menuBar->addMenu("Tools");
15691590 (_renderStatsOn = toolsMenu->addAction("Stats"))->setCheckable(true);
@@ -1750,10 +1771,6 @@ void Application::init() { · 180 unmodified lines
17501771 _palette.addAction(_colorVoxelMode, 0, 2);
17511772 _palette.addAction(_eyedropperMode, 0, 3);
17521773 _palette.addAction(_selectVoxelMode, 0, 4);
1753−
1754− float scale = 1.0f;
1755− _myAvatar.uniformScale(scale);
1756− _myCamera.setScale(scale);
17571774 }
17581775
17591776 const float MAX_AVATAR_EDIT_VELOCITY = 1.0f;

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