TIL that zip resource packs, when disabled, actually have the effect of
not showing up in the game at all. Since this can be useful to someone,
I moved the logic for it to the resources.
Signed-off-by: flow <flowlnlnln@gmail.com>
In order to access the ModFolderModel from the ModFolderPage, i created
a new m_model for the correct type, shadowing the m_model of type
ResourceFolderModel. This creates two shared_ptr references to the same object,
but since they will have the same lifetime, it doesn't generate a memory
leak.
Signed-off-by: flow <flowlnlnln@gmail.com>
This aims to continue decoupling other types of resources (e.g. resource
packs, shader packs, etc) from mods, so that we don't have to
continuously watch our backs for changes to one of them affecting the
others.
To do so, this creates a more general list model for resources, based on
the mods one, that allows you to extend it with functionality for other
resources.
I had to do some template and preprocessor stuff to get around the
QObject limitation of not allowing templated classes, so that's sadge :c
On the other hand, I tried cleaning up most general-purpose code in the
mod model, and added some documentation, because it looks nice :D
Signed-off-by: flow <flowlnlnln@gmail.com>
For some reason, using setFilterFixedString() doesn't seem to update the
QRegularExpression object with a new value, instead leaving it empty. It
updates QRegExp just fine, so maybe that's an Qt bug? o.O
Anyway, using regex in the filter is kinda cool actually :D
Signed-off-by: flow <flowlnlnln@gmail.com>
Integrates support for Feral Gamemode, discrete GPU support for Mesa and the proprietary Nvidia driver and MangoHud support
Signed-off-by: Jan200101 <sentrycraft123@gmail.com>
Previously, the Shaders, Texture packs and Resource packs tabs had as
parent the ModFolderPage, making it so that making changes only to the
Mods page would require checking the id of the page for the correct one.
This was hackish and error-prone.
Now, those pages all inherit from a single class, ExternalResourcesPage,
that handles the basic behaviour of all of them, while allowing for
individual modification in code.
This is still not a clear separation, since internally, all those
resources are derived from Mods, so for now there's still some awkward
common code :/
Since the readable/writable filter was removed to do this, extra code was added to enable/disable certain buttons based on whether the screenshot is readable or writable.