MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / update

Method update

source/windowing/StarLargeCharPlateWidget.cpp:167–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void 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}

Callers

nothing calls this directly

Calls 6

getBoolMethod · 0.80
humanoidMethod · 0.80
setEmoteStateMethod · 0.80
animateMethod · 0.80
isHoveredMethod · 0.45
setStateMethod · 0.45

Tested by

no test coverage detected