mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Allocate the correct number of widget ids for multiplicity icons.
This commit is contained in:
parent
aba6f6654e
commit
1cf74cecdb
@ -187,10 +187,10 @@ impl<'a> Widget for BuffsBar<'a> {
|
||||
if state.ids.debuff_timers.len() < debuff_count {
|
||||
state.update(|state| state.ids.debuff_timers.resize(debuff_count, gen));
|
||||
};
|
||||
if state.ids.buff_multiplicities.len() < buff_count {
|
||||
if state.ids.buff_multiplicities.len() < 2 * buff_count {
|
||||
state.update(|state| state.ids.buff_multiplicities.resize(2 * buff_count, gen));
|
||||
};
|
||||
if state.ids.debuff_multiplicities.len() < debuff_count {
|
||||
if state.ids.debuff_multiplicities.len() < 2 * debuff_count {
|
||||
state.update(|state| {
|
||||
state
|
||||
.ids
|
||||
@ -382,7 +382,7 @@ impl<'a> Widget for BuffsBar<'a> {
|
||||
if state.ids.buff_txts.len() < buff_count {
|
||||
state.update(|state| state.ids.buff_txts.resize(buff_count, gen));
|
||||
};
|
||||
if state.ids.buff_multiplicities.len() < buff_count {
|
||||
if state.ids.buff_multiplicities.len() < 2 * buff_count {
|
||||
state.update(|state| state.ids.buff_multiplicities.resize(2 * buff_count, gen));
|
||||
};
|
||||
|
||||
|
@ -452,7 +452,7 @@ impl<W: Positionable> Position for W {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub enum BuffIconKind<'a> {
|
||||
Buff {
|
||||
kind: BuffKind,
|
||||
@ -550,7 +550,7 @@ impl<'a> PartialEq for BuffIconKind<'a> {
|
||||
|
||||
impl<'a> Eq for BuffIconKind<'a> {}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct BuffIcon<'a> {
|
||||
kind: BuffIconKind<'a>,
|
||||
is_buff: bool,
|
||||
|
Loading…
Reference in New Issue
Block a user