MCPcopy Create free account
hub / github.com/YCAMInterlab/Duration / createTooltips

Method createTooltips

Duration/src/DurationController.cpp:1650–1756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1648}
1649
1650void DurationController::createTooltips(){
1651
1652 //switch project
1653 Tooltip projectTip;
1654 projectTip.text = translation.translateKey("switch project");
1655 projectTip.sourceRect = *projectDropDown->getRect();
1656 projectTip.displayPoint = ofVec2f(projectTip.sourceRect.x, 55);
1657 tooltips.push_back(projectTip);
1658
1659 //save
1660 Tooltip saveTip;
1661 saveTip.text = translation.translateKey("save");
1662 saveTip.sourceRect = *saveButton->getRect();
1663 saveTip.displayPoint = ofVec2f(saveTip.sourceRect.x, 55);
1664 tooltips.push_back(saveTip);
1665
1666 //play/pause
1667 Tooltip playpauseTip;
1668 playpauseTip.text = translation.translateKey("play")+"/"+translation.translateKey("pause"); //TODO: switch dynamically
1669 playpauseTip.sourceRect = *playpauseToggle->getRect();
1670 playpauseTip.displayPoint = ofVec2f(playpauseTip.sourceRect.x, 55);
1671 tooltips.push_back(playpauseTip);
1672
1673 ofVec2f zone2 = playpauseTip.displayPoint;
1674
1675 //edit duration
1676 Tooltip editDurationTip;
1677 editDurationTip.text = translation.translateKey("edit duration");
1678 editDurationTip.displayPoint = zone2;
1679 editDurationTip.sourceRect = *durationLabel->getRect();
1680 tooltips.push_back(editDurationTip);
1681
1682 //current time
1683 Tooltip currentTimeTip;
1684 currentTimeTip.text = translation.translateKey("current time");
1685 currentTimeTip.displayPoint = zone2;
1686 currentTimeTip.sourceRect = *timeLabel->getRect();
1687 tooltips.push_back(currentTimeTip);
1688
1689 //stop
1690 Tooltip stopTip;
1691 stopTip.text = translation.translateKey("stop");
1692 stopTip.sourceRect = *stopButton->getRect();
1693 stopTip.displayPoint = ofVec2f(stopTip.sourceRect.x, 55);
1694 tooltips.push_back(stopTip);
1695
1696 //loop
1697 Tooltip loopTip;
1698 loopTip.text = translation.translateKey("toggle loop");
1699 loopTip.sourceRect = *loopToggle->getRect();
1700 loopTip.displayPoint = ofVec2f(loopTip.sourceRect.x, 55);
1701 tooltips.push_back(loopTip);
1702
1703 //enable Snap to BPM
1704 Tooltip bpmTip;
1705 bpmTip.text = translation.translateKey("snap to measures");
1706 bpmTip.sourceRect = *useBPMToggle->getRect();
1707 bpmTip.displayPoint = ofVec2f(bpmTip.sourceRect.x, 55);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected