Coder Social home page Coder Social logo

modorganizer-installer_omod's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

modorganizer-installer_omod's Issues

Load order isn't used

OMODs can set the relative load order for pairs content files, and this is available to us via LoadOrderSet. This is used in CM Partners. Currently we don't do anything with this data other than yell at the user that they've found an OMOD feature we've not seen in the wild before, despite me having downloaded CM Partners in 2021 when I was doing some work on this.

It's not a huge deal as LOOT should have this data in its masterlist.

Modality problems

Currently, all installer_omod popups except the readme are application-modal. Custom WinForms widgets created by C# OMODs, like DarNified UI, are thread-modal. The readme is non-modal. This imposes the following problems:

  • When a DarNified UI popup is displayed, the whole of the MO2 UI is still responsive. Presumably, things can get broken if someone presses buttons.
  • When a DarNified UI popup is displayed, clicking on any other part of MO2 will bring MO2 on top of the popup. This could be misinterpreted as the installation having finished, then the user might interact with the main window and break things as described above.
  • When any non-DarNified UI popup is displayed, the readme becomes unresponsive. We want the readme to respond in case the user needs to read it to see what the options they're being shown do or they want to read it while extraction is happening.

#3 changes the RtfPopup to a QMainWindow instead of QDialog. This separates it from the main window's window hierarchy so it's not locked out. The issues then become:

  • The same DarNified UI issues as above.
  • Whenever any non-DarNified UI popup appears, it will bring focus to itself and the (disabled) main window will be shown on top of the readme popup. It can be brought back on top, though.

For the DarNified UI popups, I don't know if we can do anything. We need to run the install script on a separate thread otherwise the extraction process will lock up the UI and we can't have a progress bar, and we have no control over the windows it creates. The only thing I can think of is having a Mod Organizer is locked while OMOD installer is running popup akin to when an application is running via the VFS, but I don't know if that would fight our other popups.

Qt's modality documentation isn't super-clear as I don't think they anticipated the readme popup use case. I believe that non-modal does what it sounds like, application-modal steals input from all Qt-managed windows in the application, and window-modal steals input from:

  • any window found by recursing up the Qt widget hierarchy into parents.
  • any window whose parent is one of those windows.
    If I'm right, that means parents, (great-)grandparents and (great-)(aunts|uncles), but not cousins. This might mean that we can get the readme popup to display how we want by making its direct parent a dummy window so it counts as a cousin, and setting the other popups to be window-modal. I'm not sure, though. The documentation for modality refers to the concept of a window hierarchy, but every other bit of Qt documentation refers to widget hierarchy.

It might just be simpler to pass the generated HTML for the readme to the browser so it's totally out of MO2's hands.

Reuse various objects

As demonstrated by https://github.com/AnyOldName3/modorganizer-installer_omod/tree/initialise-once, it's possible to reuse the same OMODFrameworkWrapper for multiple OMOD installations instead of constructing and tearing down a fresh one each time. For stuff like the OMODFrameworkSettings, which is static, it better matches the natural lifetime of the state we're setting.

Annoyingly:

  • This needs doing in multiple chunks as lots of MO2 hasn't started when it calls IPlugin::init. This has been worked around in the branch.
  • There's no notification when the profile-specific INI files setting is changed, so the ini path OMODFramework uses can become out of sync. This hasn't been fixed, so the branch hasn't been merged.

DarNified UI scaling issue

The first popup DarNified UI generates is filled with images and is supposed to look like this:

image

As it was written before display scaling was a thing, it scales badly:

image

Basically, the images are displayed with one image pixel per device pixel, but the window is sized and things are positioned with the sizes multiplied. It still works, but isn't especially pretty.

Not all useful OMOD metadata is used

  • There's an embedded URL. Sometimes this is an ancient Nexus URL which a still-valid mod ID can be extracted from.
  • There's a mod description and a readme that could be set as the mod's Nexus description if there was an API to do that without directly editing meta.ini.
  • There's some boring stuff, but it could be used if there was ever a way to display a tooltip or preview when a download was hovered over.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.