mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 22:41:57 +00:00
Make the toggle panel draw properly.
A toggle panel has no fore and background and need to draw depending on its state like a control, so use that drawing method.
This commit is contained in:
parent
0286721af5
commit
16c522f2c8
@ -125,7 +125,21 @@ public:
|
||||
const bool invalidate_background = false)
|
||||
{ tcontainer_::draw(surface, force, invalidate_background); }
|
||||
#else
|
||||
// FIXME test whether we need to implement draw_background.
|
||||
/** Inherited from tpanel. */
|
||||
void draw_background(surface& frame_buffer)
|
||||
{
|
||||
// We don't have a fore and background and need to draw depending on
|
||||
// our state, like a control. So we use the controls drawing method.
|
||||
tcontrol::draw_background(frame_buffer);
|
||||
}
|
||||
|
||||
/** Inherited from tpanel. */
|
||||
void draw_foreground(surface& frame_buffer)
|
||||
{
|
||||
// We don't have a fore and background and need to draw depending on
|
||||
// our state, like a control. So we use the controls drawing method.
|
||||
tcontrol::draw_foreground(frame_buffer);
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* Inherited from tpanel.
|
||||
|
Loading…
x
Reference in New Issue
Block a user