From b9b358dc0d5c268a923c3a961ac8c072ccc691cf Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 29 Jan 2014 00:23:03 +0300 Subject: add option for changing scale. --- src/gui/widgets/tabs/setup_visual.cpp | 17 ++++++++++++++++- src/gui/widgets/tabs/setup_visual.h | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/tabs/setup_visual.cpp b/src/gui/widgets/tabs/setup_visual.cpp index 7e565a291..067c6e5e9 100644 --- a/src/gui/widgets/tabs/setup_visual.cpp +++ b/src/gui/widgets/tabs/setup_visual.cpp @@ -87,7 +87,8 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) : mAmbientFxList(new NamesModel), mParticleList(new SetupItemNames), mParticleTypeList(new NamesModel), - mVSyncList(new NamesModel) + mVSyncList(new NamesModel), + mScaleList(new SetupItemNames) { // TRANSLATORS: settings tab name setName(_("Visual")); @@ -98,6 +99,18 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) : mPreferredFirstItemSize = 150; + // TRANSLATORS: settings option + new SetupItemLabel(_("Scale"), "", this); + + for (int f = 1; f <= 7; f ++) + { + // TRANSLATORS: particle details + mScaleList->push_back(toString(f) + "x"); + } + new SetupItemSlider2(_("Scale "), "", "scale", + this, "scaleEvent", 1, 7, + mScaleList, true); + // TRANSLATORS: settings option new SetupItemLabel(_("Notifications"), "", this); @@ -204,6 +217,8 @@ Setup_Visual::~Setup_Visual() mParticleTypeList = nullptr; delete mVSyncList; mVSyncList = nullptr; + delete mScaleList; + mScaleList = nullptr; } void Setup_Visual::apply() diff --git a/src/gui/widgets/tabs/setup_visual.h b/src/gui/widgets/tabs/setup_visual.h index 3967fd1de..8aef0d294 100644 --- a/src/gui/widgets/tabs/setup_visual.h +++ b/src/gui/widgets/tabs/setup_visual.h @@ -43,6 +43,7 @@ class Setup_Visual final : public SetupTabScroll SetupItemNames *mParticleList; NamesModel *mParticleTypeList; NamesModel *mVSyncList; + SetupItemNames *mScaleList; }; #endif // GUI_WIDGETS_TABS_SETUP_VISUAL_H -- cgit v1.2.3-70-g09d2