Commit Graph

144 Commits (8cb5f2a5673165d732790e6440e9cd90b71074d4)

Author SHA1 Message Date
AnyOldName3 f1795a4698 c a p i t u l a t e 5 months ago
AnyOldName3 cd7941dc9f Some launcher fixes
I tried to fix https://gitlab.com/OpenMW/openmw/-/issues/8080 by making it so that instead of crashing, we showed an error.

In doing so, I discovered some problems with plugin sorting and the refresh button, like:
* it forgetting the non-user content files somewhere
* nothing guaranteeing that built-in content files stay at the top of the list and them only being there because the first data directory that provides them is usually the first data directory
* it forgetting the non-user content files somewhere else
* it looking like it'd forget any kind of non-user setting under certain circumstances

I fixed those problems too
5 months ago
Dave Corley d03f25437b CLEANUP(contentmodel): Use `auto` for insertPosition declaration to
avoid possible narrowing
6 months ago
Dave Corley fbdc4f4881 CLEANUP(contentmodel): Use ranges::find_if instead of a loop 6 months ago
Dave Corley 40aee53831 CLEANUP(contentmodel): Actually, no, I hate while loops 6 months ago
Dave Corley b43743212e FIX: check we're not going out of range while listing content files, fix #8029 6 months ago
Alexei Kotov eca30f7921 Don't force Tribunal to be enabled to load Bloodmoon (#7993)
Sort Bloodmoon to be after Tribunal and warn the user if Bloodmoon is loaded before enabled Tribunal
7 months ago
AnyOldName3 b55a0fd32a || and && have different binding precedence 8 months ago
AnyOldName3 d148bd1cde Add bounds check 8 months ago
psi29a 99a0755094 Merge branch 'remove_natural_sort' into 'master'
Remove dead code

See merge request OpenMW/openmw!4047
8 months ago
Andrei Kortunov 6390fdee7a Remove dead code 8 months ago
Andrei Kortunov 1bb48bcef7 Treat editor icons as scalable 8 months ago
AnyOldName3 48f1f08537 Hide things that depend on present-but-inactive game files
https://gitlab.com/OpenMW/openmw/-/merge_requests/3925#note_1843962919
9 months ago
AnyOldName3 1ae2cc82a1 I do not know how this escaped formatting locally. 10 months ago
AnyOldName3 a130ca57a4 Track source of settings
This one's a biggie.

The basic idea's that GameSettings should know:
* what the interpreted value of a setting is, so it can actually be used.
* what the original value the user put in their config was, so it can be put back when the config's saved.
* which path it's processing the openmw.cfg from so relative paths can be resolved correctly.
* whether a setting's a user setting that can be modified, or from one of the other openmw.cfg files that can't necessarily be modified.

This had fairly wide-reaching implications.

The first is that paths are resolved properly in cases where they previously wouldn't have been.
Without this commit, if the launcher saw a relative path in an openmw.cfg, it'd be resolved relative to the process' working directory (which we always set to the binary directory for reasons I won't get into).
That's not what the engine does, so is bad.
It's also not something a user's likely to suspect.
This mess is no longer a problem as paths are resolved correctly when they're loaded instead of on demand when they're used by whatever uses them.

Another problem was that if paths used slugs like ?userconfig? would be written back to openmw.cfg with the slugs replaced, which defeats the object of using the slugs.
This is also fixed.

Tracking which settings are user settings and which are in a non-editable openmw.cfg allows the launcher to grey out rows so they can't be edited (which is sensible as they can't be edited on-disk) while still being aware of content files that are provided by non-user data directories etc.
This is done in a pretty straightforward way for the data directories and fallback-archives, as those bits of UI are basic, but it's more complicated for content files as that uses a nmodel/view approach and has a lot more moving parts.
Thankfully, I'd already implemented that when dealing with builtin.omwscripts, so it just needed wiring up.

One more thing of note is that I made the SettingValue struct storable as a QVariant so it could be attached to the UI widgets as userdata, and then I could just grab the original representation and use it instead of needing any complicated mapping from display value to on-disk value.
10 months ago
AnyOldName3 d111b4bbd9 Handle built-in content files in content model
There's also handling for files declared as originating from a lower-priority openmw.cfg, e.g. anything in the local config or any intermediate ones, as they can't be disabled or reordered.
There's no way to mark such files yet, but the logic's the same as built-in files, so everything will be fine once that's set up.
10 months ago
AnyOldName3 626f438dcc Make builtin.omwscripts actually mandatory
Previously it was quasi-mandatory - lots of things would add it, e.g. when running openmw through the CS, but it could technically be disabled.

Now it's treated like the resources/vfs directory and implicitly added by the engine etc.
10 months ago
Andrei Kortunov 43307bee28 Make ContentSelector errors localizable 11 months ago
Evil Eye 0db8026356 Stop adding and deleting rows 12 months ago
Evil Eye 672cefd594 Track checked EsmFile pointers instead of full paths 12 months ago
Evil Eye 521394d67b Override launcher file info with higher priority info 12 months ago
Alexei Kotov 327fafe739 Contect selector: fix ESM date and version data encoding/decoding (#7764) 12 months ago
Andrei Kortunov 93e50cc7aa Improve format version in content selector 1 year ago
AnyOldName3 4567374e1f Merge branch 'localize_tooltip' into 'master'
Make content selector tooltip localizable

See merge request OpenMW/openmw!3687
1 year ago
Andrei Kortunov f2c284688b Make content selector tooltip localizable 1 year ago
Andrei Kortunov 1ca2a0ef66 Store generated UI by pointer to avoid redundant processing 1 year ago
Andrei Kortunov 2e041073fc Move *.ui files for different applications to different folders 1 year ago
Andrei Kortunov ca19f7006c Make hardcoded strings in Launcher and Wizard localizable 1 year ago
Andrei Kortunov 5e96825e6b Highlight new items in launcher by text formatting, not by color 1 year ago
psi29a 3151452e25 Merge branch 'pandorasbox' into 'master'
Launcher, content selector: support ESM4 files, allow using game files as addon files

See merge request OpenMW/openmw!3219
1 year ago
Andrei Kortunov d3d7a663c6 Move some objects instead of copying 1 year ago
Alexei Dobrohotov 5adda00f5e Content selector: allow using non-primary game files as addon files 1 year ago
Alexei Dobrohotov d589b46f96 Launcher, content selector: support ESM4 files
Cell name loader ignores ESM4 files
1 year ago
fredzio 37c4587ca4 Display directories that contains omwscripts.
Display newly added omwscripts as new.
2 years ago
elsid 0b852edc7f
Remove redundant inline 2 years ago
elsid 8dd6b16fee
Avoid double lookup 2 years ago
elsid 080700f8fe
Name all custom ESM format versions and add tests 2 years ago
Andrei Kortunov 5836d27928 Fix ContentSelector usage with non-ASCII paths 2 years ago
Andrei Kortunov 792feae39e Do not use deprecated implicit conversion 2 years ago
Andrei Kortunov 0864d997d0 Add missing includes 2 years ago
Andrei Kortunov 902c48d1bb Rework launcher UI 2 years ago
Andrei Kortunov 307a60e87c Migrate from QRegExp to more modern QRegularExpression 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
mpeco 1868534071 functor-based Qt signal-slot syntax components 2 years ago
jvoisin 8b9ed57348 Clean up Qt includes 3 years ago
fredzio bab5e56768 Make the launcher dara directory and bsa list play nicer with dark
themes.

Known issue: the padding icon for disabled data directories is of wrong
color.
3 years ago
fredzio b88d32ff5b Add 3 tabs in the "Data Files" page
1 with the data directories
2 with the BSA archives
3 with the content selector

When user select a directory to be added, first we walk the directory
hierarchy to make a list of all potential data= entries. If we find
none, the selected directory is added.

If more than one data directory is found, user is presented with a
directory list to check which one(s) are to be added.

Directories containing one or more content file are marked with an icon.

data= and fallback-archive= lines are handled like content= lines:
- they are part of the profile in launcher.cfg, prefixed by the profile
name
- they are updated in openmw.cfg when profile is selected / created

Directories can be moved in the list by drag and drop or by buttons.
Insertion is possible anywhere in the list.
Global data path and data local are shown but are greyed out, as they
are always included.

No attempt is made to ensure that the user choice are valid
(dependencies, overwrite of content).

After a profile is loaded, any added content is highlighted in green.
3 years ago
elsid c044bef6a7
Add StatelessUtf8Encoder to support caller provided buffer for output 3 years ago
Bret Curtis d1fb854521 move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4
esm typo

esm typo
3 years ago
Petr Mikheev ded8997362 Avoid problems if `builtin.omwscripts` is above `Morrowind.esm` in content list. 3 years ago