1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 19:59:55 +00:00
Commit graph

89 commits

Author SHA1 Message Date
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.
2024-03-06 00:36:13 +00:00
Yury Stepovikov
c90ebcc86b Allow multiselect in the archives tab (#7606) 2024-01-28 21:33:10 +00:00
Alexei Kotov
f68bd3ba97 Launcher: Improve directory appending UX and heuristics (bug #7502)
- Recognize more asset directories and omwgame files
- Always let the user append the selected directory
- Automatically pick the user-selected directory if it's the only valid directory
- Add a caption to directory selection dialog, properly handle cancellation
2023-10-22 16:20:19 +03:00
elsid
9815f930d9
Setup launcher configuration manager and logging before initializing UI 2023-03-21 21:29:57 +01:00
elsid
de112a2950
Simplify converting file names into absolute file paths 2023-03-21 09:34:27 +01:00
elsid
5a691380ea
Use single set to check presence of archives 2023-03-21 09:34:27 +01:00
elsid
8be2fc9fd7
Stop updating navmeshtool progress on first bad message 2023-01-27 19:10:53 +01:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
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.
2022-04-23 09:54:45 +02:00
elsid
2d5ccc804b
Exchange binary messages between navmeshtool and launcher 2022-03-30 19:24:54 +02:00
Bret Curtis
74e7cfc023 remove unused includes: part1
remove unused imports: part2

revert one tidy we will keep for c++20
2022-01-23 17:30:25 +01:00
elsid
9e0451c714
Support navmesh generation from launcher 2021-12-11 00:22:04 +01:00
psi29a
b10a817f7e Merge branch 'useuless_launcher' into 'master'
Remove some useless includes from the launcher

See merge request OpenMW/openmw!775

(cherry picked from commit a84bd643b334eb6ac715681c497184ac22212ced)

d3fff8cf Remove some useless includes from the launcher
2021-05-04 21:09:39 +00:00
fredzio
dbdd397716 Remove deadcode. 2021-01-01 16:54:45 +01:00
Andrei Kortunov
8084a336b5 Replace zeroes and nulls by nullptrs 2020-11-29 11:14:07 +04:00
James Moore
a37bdfd492 Implement a refresh button on data files page 2020-03-21 19:35:20 +00:00
Capostrophic
686049679c Launcher: Clone content list button (feature #4784) 2019-05-15 18:17:57 +03:00
Thunderforge
dfa9968565 Renaming Launcher::DataFilesPage::signalSelectedFilesChanged to signalLoadedCellsChanged 2018-06-08 19:18:23 -05:00
Thunderforge
26dfef7970 Changing where we are loading cells to prevent Qt access issue 2018-05-27 17:15:36 -05:00
Thunderforge
c2fff61ccd Changing so that data changes happen only after the addon is checked 2018-05-26 20:35:28 -05:00
Thunderforge
d58cce9c72 Adding WIP code to dynamically change the autocomplete fields 2018-05-22 20:50:31 -05:00
Thunderforge
fb27f34a32 Add autocomplete to the "Start default character at" field 2018-04-07 21:27:36 -05:00
dteviot
cac250a90d Fixed typo in comment. 2015-02-06 12:45:15 +13:00
dteviot
9d9cabf40d Fix: Importer creates a single Content List (Fixes #2345) 2015-02-06 12:24:06 +13:00
dteviot
e298589e7f Reorganised DataFilesPage.cpp code.
Removed some recursive calling of saveSettings() and loadSettings().
2015-01-26 18:46:18 +13:00
dteviot
a62e15d93d Read profile files from LauncherSettings in load order. 2014-12-30 17:25:19 +13:00
scrawl
1937ace1b7 Launcher: fix bugs deleting profiles (Fixes #2188) 2014-12-10 21:52:30 +01:00
pvdk
6348af586e Fixed some problems with the launcher and the wizard 2014-05-30 02:12:48 +02:00
pvdk
af883991e2 Reimplemented the old new profile dialog behaviour 2014-04-17 02:17:18 +02:00
pvdk
30c3c3e245 Working on importing content lists in the launcher 2014-04-17 00:01:19 +02:00
pvdk
095ff4e17a Moved launcher settings stuff into components, so they can be reused in the wizard 2013-12-25 00:50:25 +01:00
graffy76
973803eb2f Fixed pathing issues in launcher 2013-11-03 00:02:46 -05:00
graffy76
1a23cccce3 Implemented Launcher namespace 2013-10-25 11:17:26 -05:00
graffy76
f9591ddda6 Reimplemented constentselector view class 2013-10-22 21:52:35 -05:00
graffy76
217a4d75b4 Implemented profile function in launcher datafiles page
Implemented dependency sorting to ensure dependent files appear latest
in the list.
2013-10-06 21:13:47 -05:00
graffy76
00c78a4aa1 Implementing ContentSelector class in DataFilesPage
Moved AdjusterWidget / FileWidget to ContentSelectorView
2013-10-01 21:29:45 -05:00
graffy76
cfdc19c427 Renamed esxSelector to contentSelector
Fixed datafilespage model implementation in launcher
Filtered addons in table view by selected game file
2013-09-21 23:06:29 -05:00
graffy76
0eb06ada39 Implemneting drag and drop 2013-09-18 02:36:23 -05:00
graffy76
f6217f9c6a Moved esx selector classes out of global namespace 2013-08-18 15:11:29 -05:00
graffy76
a14e0b32d8 Restructured esxselector directory
Added ./view
Removed ./utils and ./model/esm
Relocated code accordingly.
2013-08-18 09:48:13 -05:00
graffy76
2878f51cd3 Reimplemented dependency selection feature
Moved more code to ContentSelector
Added support for omwgame and omwaddon files
2013-08-17 19:40:28 -05:00
graffy76
b24dd5c6ac Continued migration of code to ContentSelector 2013-08-17 05:55:43 -05:00
graffy76
61602789e1 Began migrating code to ContentSelector base 2013-08-16 22:23:21 -05:00
Pieter van der Kloet
b4d408af5d Added actions to datafiles.ui and implemented them in the launcher 2013-03-11 01:48:01 +01:00
Pieter van der Kloet
75cf009101 Finished implementing the .ui file for the DataFilesPage 2013-03-05 03:47:57 +01:00
Pieter van der Kloet
4c9d0563fe WIP: Implementing the .ui for the DataFilesPage 2013-03-05 03:13:39 +01:00
Pieter van der Kloet
9198afeefb Improved context menu, added context menu for masters and added multi-selection support 2013-02-24 03:10:27 +01:00
Pieter van der Kloet
35b68a3c40 Fixed accidental profile deletion and added sorting by date 2013-02-19 15:58:01 +01:00
Pieter van der Kloet
178cf2154e Made checking/unchecking work with the new datafiles model 2013-02-18 17:59:08 +01:00
Pieter van der Kloet
ee27e3bb58 Merge remote-tracking branch 'upstream/next' into settingsnext
Conflicts:
	apps/launcher/CMakeLists.txt
	apps/launcher/datafilespage.cpp
	apps/launcher/datafilespage.hpp
	apps/launcher/graphicspage.cpp
	components/fileorderlist/utils/filedialog.cpp
	components/fileorderlist/utils/filedialog.hpp
2013-02-15 15:21:14 +01:00