Skip to content

Commit

Permalink
fix: Fix spare parts properties window position
Browse files Browse the repository at this point in the history
  • Loading branch information
lcgamboa committed Jun 15, 2024
1 parent 30f30c1 commit efe3883
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/picsimlab5.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ void CPWindow5::pmenu2_Properties_EvMenuActive(CControl* control) {
Windows[PW_WPROP]->SetTitle(SpareParts.GetPart(PartSelected)->GetName() +
" [id=" + std::to_string(SpareParts.GetPart(PartSelected)->GetId()) + "]");
Windows[PW_WPROP]->SetWidth(370);
Windows[PW_WPROP]->SetX(SpareParts.GetPart(PartSelected)->GetX() + GetX() - offsetx);
Windows[PW_WPROP]->SetY(SpareParts.GetPart(PartSelected)->GetY() + GetY() - offsety);
Windows[PW_WPROP]->SetX(GetX() +
((SpareParts.GetPart(PartSelected)->GetX() + offsetx) * SpareParts.GetScale()));
Windows[PW_WPROP]->SetY(GetY() +
((SpareParts.GetPart(PartSelected)->GetY() + offsety) * SpareParts.GetScale()));

CLabel* label;
CCombo* combo;
Expand Down

0 comments on commit efe3883

Please sign in to comment.