*** empty log message ***
This commit is contained in:
parent
8c34280f6c
commit
ffd517c79b
|
|
@ -613,15 +613,30 @@ void GuiButton::set_priority(GuiItem* i, const GuiItem::Priority p) {
|
|||
}
|
||||
|
||||
int GuiButton::set_draw_order(int v) {
|
||||
int o = _up->set_draw_order(v);
|
||||
o = _down->set_draw_order(o);
|
||||
if (_up_rollover != (GuiLabel*)0L)
|
||||
o = _up_rollover->set_draw_order(o);
|
||||
if (_down_rollover != (GuiLabel*)0L)
|
||||
o = _down_rollover->set_draw_order(o);
|
||||
if (_inactive != (GuiLabel*)0L)
|
||||
o = _inactive->set_draw_order(o);
|
||||
return GuiBehavior::set_draw_order(o);
|
||||
// No two of these labels will ever be drawn simultaneously, so
|
||||
// there's no need to cascade the draw orders. They can each be
|
||||
// assigned the same value, and the value we return is the maximum
|
||||
// of any of the values returned by the labels.
|
||||
int o = _rgn->set_draw_order(v);
|
||||
int o1 = _up->set_draw_order(v);
|
||||
o = max(o, o1);
|
||||
o1 = _down->set_draw_order(v);
|
||||
o = max(o, o1);
|
||||
if (_up_rollover != (GuiLabel*)0L) {
|
||||
o1 = _up_rollover->set_draw_order(v);
|
||||
o = max(o, o1);
|
||||
}
|
||||
if (_down_rollover != (GuiLabel*)0L) {
|
||||
o1 = _down_rollover->set_draw_order(v);
|
||||
o = max(o, o1);
|
||||
}
|
||||
if (_inactive != (GuiLabel*)0L) {
|
||||
o1 = _inactive->set_draw_order(v);
|
||||
o = max(o, o1);
|
||||
}
|
||||
o1 = GuiBehavior::set_draw_order(v);
|
||||
o = max(o, o1);
|
||||
return o;
|
||||
}
|
||||
|
||||
void GuiButton::output(ostream& os) const {
|
||||
|
|
|
|||
|
|
@ -47,3 +47,8 @@ INLINE LVector4f GuiRegion::get_frame(void) const {
|
|||
_region->test_ref_count_integrity();
|
||||
return LVector4f(_left, _right, _bottom, _top);
|
||||
}
|
||||
|
||||
INLINE int GuiRegion::set_draw_order(int draw_order) {
|
||||
_region->set_sort(draw_order);
|
||||
return draw_order + 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ PUBLISHED:
|
|||
|
||||
INLINE void set_region(float, float, float, float);
|
||||
INLINE LVector4f get_frame(void) const;
|
||||
INLINE int set_draw_order(int);
|
||||
|
||||
public:
|
||||
// type interface
|
||||
|
|
|
|||
Loading…
Reference in New Issue