| 165 | } |
| 166 | |
| 167 | void LargeCharPlateWidget::update(float dt) { |
| 168 | ButtonWidget::update(dt); |
| 169 | |
| 170 | if (!m_player || !m_config.getBool("animatePortrait", true)) |
| 171 | return; |
| 172 | |
| 173 | auto humanoid = m_player->humanoid(); |
| 174 | if (m_delete && m_delete->isHovered()) { |
| 175 | humanoid->setEmoteState(HumanoidEmote::Sad); |
| 176 | humanoid->setState(Humanoid::Run); |
| 177 | } else { |
| 178 | humanoid->setEmoteState(HumanoidEmote::Idle); |
| 179 | humanoid->setState(isHovered() ? Humanoid::Walk : Humanoid::Idle); |
| 180 | } |
| 181 | humanoid->animate(dt); |
| 182 | } |
| 183 | |
| 184 | } |