mirror of https://github.com/stella-emu/stella.git
experiments with transparency
This commit is contained in:
parent
cf926fdf07
commit
b553a5fa4d
|
@ -181,7 +181,7 @@ TimeMachineDialog::TimeMachineDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
};
|
};
|
||||||
|
|
||||||
const GUI::Font& font = instance().frameBuffer().font();
|
const GUI::Font& font = instance().frameBuffer().font();
|
||||||
const int H_BORDER = 8, BUTTON_GAP = 4, V_BORDER = 4, V_GAP = 4;
|
const int H_BORDER = 6, BUTTON_GAP = 4, V_BORDER = 4, V_GAP = 4;
|
||||||
const int buttonWidth = BUTTON_W + 8,
|
const int buttonWidth = BUTTON_W + 8,
|
||||||
buttonHeight = BUTTON_H + 10,
|
buttonHeight = BUTTON_H + 10,
|
||||||
rowHeight = font.getLineHeight();
|
rowHeight = font.getLineHeight();
|
||||||
|
@ -191,9 +191,10 @@ TimeMachineDialog::TimeMachineDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
|
|
||||||
// Set real dimensions
|
// Set real dimensions
|
||||||
_w = 20 * (buttonWidth + BUTTON_GAP) + 20;
|
_w = 20 * (buttonWidth + BUTTON_GAP) + 20;
|
||||||
_h = V_BORDER * 2 + rowHeight + buttonHeight + 4;
|
_h = V_BORDER * 2 + rowHeight + buttonHeight + 2;
|
||||||
|
|
||||||
//this->clearFlags(WIDGET_CLEARBG); // TODO: does NOT work as expected
|
//this->clearFlags(WIDGET_CLEARBG); // does only work combined with blending!
|
||||||
|
//this->clearFlags(WIDGET_BORDER);
|
||||||
|
|
||||||
xpos = H_BORDER;
|
xpos = H_BORDER;
|
||||||
ypos = V_BORDER;
|
ypos = V_BORDER;
|
||||||
|
@ -206,6 +207,7 @@ TimeMachineDialog::TimeMachineDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
|
|
||||||
// Add time info
|
// Add time info
|
||||||
myCurrentTimeWidget = new StaticTextWidget(this, font, xpos, ypos + 3, "04:32 59");
|
myCurrentTimeWidget = new StaticTextWidget(this, font, xpos, ypos + 3, "04:32 59");
|
||||||
|
//myCurrentTimeWidget->setFlags(WIDGET_CLEARBG);
|
||||||
myLastTimeWidget = new StaticTextWidget(this, font, _w - H_BORDER - font.getStringWidth("XX:XX XX"), ypos + 3,
|
myLastTimeWidget = new StaticTextWidget(this, font, _w - H_BORDER - font.getStringWidth("XX:XX XX"), ypos + 3,
|
||||||
"12:25 59");
|
"12:25 59");
|
||||||
xpos = myCurrentTimeWidget->getRight() + BUTTON_GAP * 4;
|
xpos = myCurrentTimeWidget->getRight() + BUTTON_GAP * 4;
|
||||||
|
@ -230,10 +232,10 @@ TimeMachineDialog::TimeMachineDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
BUTTON_W, BUTTON_H, kPause);
|
BUTTON_W, BUTTON_H, kPause);
|
||||||
wid.push_back(myPauseWidget);
|
wid.push_back(myPauseWidget);
|
||||||
myPauseWidget->clearFlags(WIDGET_ENABLED);*/
|
myPauseWidget->clearFlags(WIDGET_ENABLED);*/
|
||||||
myPlayWidget = new ButtonWidget(this, font, xpos, ypos - 2, buttonWidth + 4, buttonHeight + 4, PLAY,
|
myPlayWidget = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, PLAY,
|
||||||
BUTTON_W, BUTTON_H, kPlay);
|
BUTTON_W, BUTTON_H, kPlay);
|
||||||
wid.push_back(myPlayWidget);
|
wid.push_back(myPlayWidget);
|
||||||
xpos += buttonWidth + BUTTON_GAP*2 + 4;
|
xpos += buttonWidth + BUTTON_GAP*2;
|
||||||
|
|
||||||
myUnwind1Widget = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, UNWIND_1,
|
myUnwind1Widget = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, UNWIND_1,
|
||||||
BUTTON_W, BUTTON_H, kUnwind1);
|
BUTTON_W, BUTTON_H, kUnwind1);
|
||||||
|
@ -266,6 +268,10 @@ void TimeMachineDialog::center()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void TimeMachineDialog::loadConfig()
|
void TimeMachineDialog::loadConfig()
|
||||||
{
|
{
|
||||||
|
surface().attributes().blending = true;
|
||||||
|
surface().attributes().blendalpha = 80;
|
||||||
|
surface().applyAttributes();
|
||||||
|
|
||||||
handleWinds();
|
handleWinds();
|
||||||
myMessageWidget->setLabel("");
|
myMessageWidget->setLabel("");
|
||||||
}
|
}
|
||||||
|
@ -274,7 +280,7 @@ void TimeMachineDialog::loadConfig()
|
||||||
void TimeMachineDialog::handleCommand(CommandSender* sender, int cmd,
|
void TimeMachineDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
int data, int id)
|
int data, int id)
|
||||||
{
|
{
|
||||||
cerr << cmd << endl;
|
//cerr << cmd << endl;
|
||||||
switch(cmd)
|
switch(cmd)
|
||||||
{
|
{
|
||||||
case kPlay:
|
case kPlay:
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
<AdditionalOptions>/MP /std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/MP /std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
<AdditionalOptions>/MP /std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/MP /std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
|
@ -204,7 +204,7 @@
|
||||||
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
|
|
Loading…
Reference in New Issue