Address some complaints about touch button opacity

This commit is contained in:
Henrik Rydgard 2013-08-10 19:23:50 +02:00
parent bc84c135b3
commit 1da49273b5
3 changed files with 3 additions and 3 deletions

View File

@ -138,7 +138,7 @@ void Config::Load(const char *iniFileName)
sound->Get("VolumeSFX", &iSFXVolume, 7);
IniFile::Section *control = iniFile.GetOrCreateSection("Control");
control->Get("ShowStick", &bShowAnalogStick, false);
control->Get("ShowAnalogStick", &bShowAnalogStick, true);
#ifdef BLACKBERRY
control->Get("ShowTouchControls", &bShowTouchControls, pixel_xres != pixel_yres);
#elif defined(USING_GLES2)

View File

@ -270,7 +270,7 @@ void GameSettingsScreen::CreateViews() {
controlsSettings->Add(new CheckBox(&g_Config.bShowAnalogStick, c->T("Show Left Analog Stick")));
controlsSettings->Add(new CheckBox(&g_Config.bAccelerometerToAnalogHoriz, c->T("Tilt", "Tilt to Analog (horizontal)")));
controlsSettings->Add(new Choice(gs->T("Control Mapping")))->OnClick.Handle(this, &GameSettingsScreen::OnControlMapping);
controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 15, 65, c->T("Button Opacity"), screenManager()));
controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 0, 85, c->T("Button Opacity"), screenManager()));
// System
ViewGroup *systemSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));

View File

@ -58,7 +58,7 @@ void MultiTouchButton::Draw(UIContext &dc) {
float scale = scale_;
if (IsDown()) {
scale *= 2.0f;
opacity = 100.0f;
opacity *= 1.15f;
}
uint32_t colorBg = colorAlpha(0xc0b080, opacity);
uint32_t color = colorAlpha(0xFFFFFF, opacity);