mirror of https://github.com/stella-emu/stella.git
Fix methods aliasing superclass methods without using virtual/override.
This commit is contained in:
parent
04e629450a
commit
acbddf6d44
|
@ -38,8 +38,8 @@ class DataGridOpsWidget : public Widget, public CommandSender
|
|||
DataGridOpsWidget(GuiObject* boss, const GUI::Font& font, int x, int y);
|
||||
~DataGridOpsWidget() override = default;
|
||||
|
||||
void setTarget(CommandReceiver* target);
|
||||
void setEnabled(bool e);
|
||||
void setTarget(CommandReceiver* target) override;
|
||||
void setEnabled(bool e) override;
|
||||
|
||||
private:
|
||||
ButtonWidget* _zeroButton{nullptr};
|
||||
|
|
|
@ -28,12 +28,6 @@ class QuadTariWidget: public ControllerWidget
|
|||
Controller& controller);
|
||||
~QuadTariWidget() override = default;
|
||||
|
||||
protected:
|
||||
virtual string getHeader()
|
||||
{
|
||||
return (isLeftPort() ? "Left (" : "Right (") + string("QuadTari)");
|
||||
}
|
||||
|
||||
private:
|
||||
StaticTextWidget* myPointer{nullptr};
|
||||
|
||||
|
|
|
@ -61,8 +61,8 @@ class CommandSender
|
|||
|
||||
virtual ~CommandSender() = default;
|
||||
|
||||
void setTarget(CommandReceiver* target) { _target = target; }
|
||||
CommandReceiver* getTarget() const { return _target; }
|
||||
virtual void setTarget(CommandReceiver* target) { _target = target; }
|
||||
virtual CommandReceiver* getTarget() const { return _target; }
|
||||
|
||||
virtual void sendCommand(int cmd, int data, int id)
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ class PopUpWidget : public EditableWidget
|
|||
const string& label = "", int labelWidth = 0, int cmd = 0);
|
||||
~PopUpWidget() override = default;
|
||||
|
||||
void setID(uInt32 id);
|
||||
void setID(uInt32 id) override;
|
||||
|
||||
int getTop() const override { return _y + 1; }
|
||||
int getBottom() const override { return _y + 1 + getHeight(); }
|
||||
|
|
|
@ -35,10 +35,10 @@ class RadioButtonWidget : public CheckboxWidget
|
|||
int cmd = 0);
|
||||
|
||||
void handleMouseUp(int x, int y, MouseButton b, int clickCount) override;
|
||||
void setState(bool state, bool send = true);
|
||||
void setState(bool state, bool send = true) override;
|
||||
|
||||
protected:
|
||||
void setFill(FillType type);
|
||||
void setFill(FillType type) override;
|
||||
void drawWidget(bool hilite) override;
|
||||
static uInt32 buttonSize(const GUI::Font& font)
|
||||
{
|
||||
|
|
|
@ -50,13 +50,13 @@ TimeLineWidget::TimeLineWidget(GuiObject* boss, const GUI::Font& font,
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void TimeLineWidget::setValue(uInt32 value)
|
||||
void TimeLineWidget::setValue(int value)
|
||||
{
|
||||
value = BSPF::clamp(value, _valueMin, _valueMax);
|
||||
const uInt32 v = BSPF::clamp(static_cast<uInt32>(value), _valueMin, _valueMax);
|
||||
|
||||
if(value != _value)
|
||||
if(v != _value)
|
||||
{
|
||||
_value = value;
|
||||
_value = v;
|
||||
setDirty();
|
||||
sendCommand(_cmd, _value, _id);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class TimeLineWidget : public ButtonWidget
|
|||
int x, int y, int w, int h, const string& label = "",
|
||||
uInt32 labelWidth = 0, int cmd = 0);
|
||||
|
||||
void setValue(uInt32 value);
|
||||
void setValue(int value) override;
|
||||
uInt32 getValue() const { return _value; }
|
||||
|
||||
void setMinValue(uInt32 value);
|
||||
|
|
|
@ -545,8 +545,8 @@ StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font,
|
|||
int x, int y,
|
||||
const string& text, TextAlign align,
|
||||
ColorId shadowColor)
|
||||
: StaticTextWidget(boss, font, x, y, font.getStringWidth(text), font.getLineHeight(),
|
||||
text, align, shadowColor)
|
||||
: StaticTextWidget(boss, font, x, y, font.getStringWidth(text),
|
||||
font.getLineHeight(), text, align, shadowColor)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ class Widget : public GuiObject
|
|||
}
|
||||
|
||||
/** Set/clear FLAG_ENABLED */
|
||||
void setEnabled(bool e);
|
||||
virtual void setEnabled(bool e);
|
||||
|
||||
bool isEnabled() const { return _flags & FLAG_ENABLED; }
|
||||
bool isVisible() const override { return !(_flags & FLAG_INVISIBLE); }
|
||||
|
@ -103,7 +103,7 @@ class Widget : public GuiObject
|
|||
bool wantsTab() const { return _flags & FLAG_WANTS_TAB; }
|
||||
bool wantsRaw() const { return _flags & FLAG_WANTS_RAWDATA; }
|
||||
|
||||
void setID(uInt32 id) { _id = id; }
|
||||
virtual void setID(uInt32 id) { _id = id; }
|
||||
uInt32 getID() const { return _id; }
|
||||
|
||||
virtual const GUI::Font& font() const { return _font; }
|
||||
|
@ -222,7 +222,7 @@ class StaticTextWidget : public Widget, public CommandSender
|
|||
|
||||
void setCmd(int cmd) { _cmd = cmd; }
|
||||
|
||||
void setValue(int value);
|
||||
virtual void setValue(int value);
|
||||
void setLabel(const string& label);
|
||||
void setAlign(TextAlign align) { _align = align; setDirty(); }
|
||||
const string& getLabel() const { return _label; }
|
||||
|
@ -331,9 +331,9 @@ class CheckboxWidget : public ButtonWidget
|
|||
~CheckboxWidget() override = default;
|
||||
|
||||
void setEditable(bool editable);
|
||||
void setFill(FillType type);
|
||||
virtual void setFill(FillType type);
|
||||
|
||||
void setState(bool state, bool changed = false);
|
||||
virtual void setState(bool state, bool changed = false);
|
||||
void toggleState() { setState(!_state); }
|
||||
bool getState() const { return _state; }
|
||||
|
||||
|
@ -390,7 +390,7 @@ class SliderWidget : public ButtonWidget
|
|||
int valueLabelGap = 0, bool forceLabelSign = false);
|
||||
~SliderWidget() override = default;
|
||||
|
||||
void setValue(int value);
|
||||
void setValue(int value) override;
|
||||
int getValue() const { return BSPF::clamp(_value, _valueMin, _valueMax); }
|
||||
|
||||
void setMinValue(int value);
|
||||
|
|
Loading…
Reference in New Issue