mirror of https://github.com/stella-emu/stella.git
fixed bug which removed highlighting for most widgets
This commit is contained in:
parent
cce4e0f5d5
commit
dec31a0f03
|
@ -212,7 +212,7 @@ void ToggleWidget::handleCommand(CommandSender* sender, int cmd,
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
string ToggleWidget::getToolTip(int x, int y) const
|
string ToggleWidget::getToolTip(int, int y) const
|
||||||
{
|
{
|
||||||
const int row = (y - getAbsY()) / _rowHeight;
|
const int row = (y - getAbsY()) / _rowHeight;
|
||||||
const int pos = row * _cols;// +col;
|
const int pos = row * _cols;// +col;
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
// - multi line tips
|
// - multi line tips
|
||||||
// - nicer formating of DataDridWidget tip
|
// - nicer formating of DataDridWidget tip
|
||||||
// - allow reversing ToogleWidget (TooglePixelWidget)
|
// - allow reversing ToogleWidget (TooglePixelWidget)
|
||||||
|
// - shift checkbox bits
|
||||||
|
// - RomListWidget (hex codes, maybe disassembly operands)
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
ToolTip::ToolTip(Dialog& dialog, const GUI::Font& font)
|
ToolTip::ToolTip(Dialog& dialog, const GUI::Font& font)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#define TOOL_TIP_HXX
|
#define TOOL_TIP_HXX
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class for providing tool tip functionality
|
* Class for providing tooltip functionality
|
||||||
*
|
*
|
||||||
* @author Thomas Jentzsch
|
* @author Thomas Jentzsch
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -475,6 +475,20 @@ ButtonWidget::ButtonWidget(GuiObject* boss, const GUI::Font& font,
|
||||||
_bmh = bmh;
|
_bmh = bmh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void ButtonWidget::handleMouseEntered()
|
||||||
|
{
|
||||||
|
if(isEnabled())
|
||||||
|
setFlags(Widget::FLAG_HILITED | Widget::FLAG_MOUSE_FOCUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void ButtonWidget::handleMouseLeft()
|
||||||
|
{
|
||||||
|
if(isEnabled())
|
||||||
|
clearFlags(Widget::FLAG_HILITED | Widget::FLAG_MOUSE_FOCUS);
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool ButtonWidget::handleEvent(Event::Type e)
|
bool ButtonWidget::handleEvent(Event::Type e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -236,6 +236,8 @@ class ButtonWidget : public StaticTextWidget, public CommandSender
|
||||||
bool handleMouseClicks(int x, int y, MouseButton b) override;
|
bool handleMouseClicks(int x, int y, MouseButton b) override;
|
||||||
void handleMouseDown(int x, int y, MouseButton b, int clickCount) override;
|
void handleMouseDown(int x, int y, MouseButton b, int clickCount) override;
|
||||||
void handleMouseUp(int x, int y, MouseButton b, int clickCount) override;
|
void handleMouseUp(int x, int y, MouseButton b, int clickCount) override;
|
||||||
|
void handleMouseEntered() override;
|
||||||
|
void handleMouseLeft() override;
|
||||||
bool handleEvent(Event::Type event) override;
|
bool handleEvent(Event::Type event) override;
|
||||||
|
|
||||||
void drawWidget(bool hilite) override;
|
void drawWidget(bool hilite) override;
|
||||||
|
|
Loading…
Reference in New Issue