MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / setInstance

Method setInstance

launcher/ui/widgets/ModFilterWidget.cpp:56–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void ModFilterWidget::setInstance(MinecraftInstance* instance)
57{
58 m_instance = instance;
59
60 ui->strictVersionButton->setText(
61 tr("Strict match (= %1)").arg(mcVersionStr()));
62
63 // we can't do this for snapshots sadly
64 if(mcVersionStr().contains('.'))
65 {
66 auto mcVersionSplit = mcVersionStr().split(".");
67 ui->majorVersionButton->setText(
68 tr("Major version match (= %1.%2.x)").arg(mcVersionSplit[0], mcVersionSplit[1]));
69 }
70 else
71 {
72 ui->majorVersionButton->setText(tr("Major version match (unsupported)"));
73 disableVersionButton(Major);
74 }
75 ui->allVersionsButton->setText(
76 tr("Any version"));
77 //ui->betweenVersionsButton->setText(
78 // tr("Between two versions"));
79}
80
81auto ModFilterWidget::getFilter() -> std::shared_ptr<Filter>
82{

Callers 2

launchMethod · 0.45
setFilterWidgetMethod · 0.45

Calls 2

setTextMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected