Skip to content

Commit

Permalink
fix bunch of sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr.Abc committed Sep 1, 2024
1 parent 3accc61 commit b9475fa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Source/HUD/vgui/dmgtiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void CTileIconItem::SetImage(const char* image){

void CTileIconItem::Show(){
SetVisible(true);
vgui::GetAnimationController()->CancelAnimationsForPanel(GetParent());
GetAnimationController()->StartAnimationSequence(GetParent(), GetName());
}

Expand Down
1 change: 1 addition & 0 deletions src/Source/HUD/vgui/flashlight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ void CFlashLightPanel::SetParent(vgui::VPANEL parent) {
}

void CFlashLightPanel::SetFlashLight(bool on, int battery){
vgui::GetAnimationController()->CancelAnimationsForPanel(GetParent());
vgui::GetAnimationController()->StartAnimationSequence(this, on ? "FlashLightOn" : "FlashLightOff");
m_pOnImage->SetVisible(on);
m_pOffImage->SetVisible(!on);
Expand Down
4 changes: 3 additions & 1 deletion src/Source/HUD/vgui/itemhighlight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ class CItemPickupPanel : public vgui::Panel {
m_pText = new vgui::Label(this, "Text", "#GameUI_ABC_ItemPickupNotice");
}
virtual void SetVisible(bool state) override {
if (state && !IsVisible())
if (state && !IsVisible()) {
vgui::GetAnimationController()->CancelAnimationsForPanel(GetParent());
vgui::GetAnimationController()->StartAnimationSequence(GetParent(), "ItemPickupNoticePopUp");
}
BaseClass::SetVisible(state);
}
virtual void PerformLayout() override {
Expand Down
1 change: 1 addition & 0 deletions src/Source/HUD/vgui/weaponchoose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ void CWeaponChoosePanel::ShowPanel(bool state) {
return;
SetVisible(state);
if (state) {
vgui::GetAnimationController()->CancelAnimationsForPanel(GetParent());
vgui::GetAnimationController()->StartAnimationSequence(GetParent(), "WeaponChooseIn");
InvalidateLayout();
}
Expand Down

0 comments on commit b9475fa

Please sign in to comment.