void CPetGlyph::updateTooltip() { CPetText *petText = getPetSection()->getText(); if (petText) { petText->setColor(getPetSection()->getColor(0)); getTooltip(petText); if (_owner) getPetSection()->stopTextTimer(); } }
void CPetRoomsGlyph::getTooltip(CPetText *text) { CRoomFlags roomFlags(_roomFlags); CPetRooms *owner = static_cast<CPetRooms *>(getPetSection()); CString msg; if (isCurrentlyAssigned()) { msg = "Your assigned room: "; } else if (isPreviouslyAssigned()) { msg = "A previously assigned room: "; } else if (!_field38) { msg = "Saved Chevron: "; } else if (_field38 == 1 && owner->getRoomFlags() == _roomFlags) { msg = "Current location: "; } // Get the room description CString roomStr = roomFlags.getRoomDesc(); if (roomStr == "The Elevator") { int elevNum = owner->getElevatorNum(); roomStr = CString::format("Elevator %d", elevNum); } roomStr += " (shift-click edits)"; text->setText(roomStr); }
void CPetInventoryGlyph::setItem(CGameObject *item, bool isLoading) { _item = item; if (_owner && item) { int v1 = populateItem(item, isLoading); _background = static_cast<CPetInventoryGlyphs *>(_owner)->getBackground(v1); _image = static_cast<CPetInventory *>(getPetSection())->getImage(v1); } }
void CPetLoadSave::highlightChange() { CPetSection *section = getPetSection(); uint col = section ? section->getColor(3) : 0; for (int idx = 0; idx < SAVEGAME_SLOTS_COUNT; ++idx) _slotNames[idx].setLineColor(0, col); if (_savegameSlotNum != -1) { col = section ? section->getColor(4) : 0; _slotNames[_savegameSlotNum].setLineColor(0, col); } }
bool CPetQuit::reset() { CPetControl *pet = getPetControl(); if (!pet) return false; setName("PetExit", pet); uint col = getPetSection()->getColor(0); _text.setText("Are you sure you want to quit?"); _text.setLineColor(0, col); _btnYes.reset("PetQuitOut", pet, MODE_UNSELECTED); _btnYes.reset("PetQuitIn", pet, MODE_SELECTED); return true; }