diff --git a/docs/source/_static/luadoc.css b/docs/source/_static/luadoc.css index 44e2557d7e..3ae140a4bb 100644 --- a/docs/source/_static/luadoc.css +++ b/docs/source/_static/luadoc.css @@ -18,17 +18,15 @@ } @media (prefers-color-scheme: dark) { - body:not([data-theme="light"]) #luadoc pre.example, - body:not([data-theme="light"]) #luadoc pre.example code { - background-color: #2a3a49; + #luadoc pre.example, + #luadoc pre.example code { + background-color: hsl(var(--muted)); color: #ffffff; } } -body[data-theme="dark"] #luadoc pre.example, -body[data-theme="dark"] #luadoc pre.example code { - background-color: #2a3a49; - color: #ffffff; +#luadoc > p:nth-child(1) { + margin: 12px 0 12px 0; } #luadoc a:not(:link) { @@ -46,9 +44,15 @@ body[data-theme="dark"] #luadoc pre.example code { .context-wrapper { display: flex; + margin-top: 14px; gap: 4px; } +#luadoc ul { list-style-type: disc; } + +#luadoc ul { list-style-type: disc; } +#luadoc li {list-style: bullet;} + table.docutils { width: 100%; } \ No newline at end of file diff --git a/docs/source/_static/theme-override.css b/docs/source/_static/theme-override.css index edd184c431..71d572e890 100644 --- a/docs/source/_static/theme-override.css +++ b/docs/source/_static/theme-override.css @@ -8,6 +8,10 @@ } } +code { + white-space: normal; +} + .md-sidebar--primary { width: 500px; /* default is 240px */ } diff --git a/docs/source/conf.py b/docs/source/conf.py index 32c7548606..b8d73583bf 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -136,7 +136,7 @@ exclude_patterns = [] #show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'github-dark' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] @@ -158,7 +158,8 @@ html_theme = 'sphinxawesome_theme' html_theme_options = asdict(ThemeOptions( show_breadcrumbs=False, main_nav_links= { - "Lua API": "reference/lua-scripting/index", + "Modding": "reference/modding/index", + "Lua API": "reference/lua-scripting/overview", "Postprocessing": "reference/postprocessing/index", } )) diff --git a/docs/source/index.rst b/docs/source/index.rst index 532c041e82..4a7ed95d02 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,8 +2,28 @@ Welcome to OpenMW's Documentation! ================================== .. toctree:: - :caption: Table of Contents - :maxdepth: 8 + :caption: Reference + :hidden: + :maxdepth: 4 - manuals/index - reference/index + reference/modding/index + reference/postprocessing/index + reference/documentationHowTo + +.. toctree:: + :caption: Lua + :hidden: + :maxdepth: 4 + + reference/lua-scripting/overview + reference/lua-scripting/api + reference/lua-scripting/teal + +.. toctree:: + :caption: Help + :hidden: + :maxdepth: 4 + + manuals/installation/index + manuals/openmw-cs/index + manuals/documentationHowTo diff --git a/docs/source/reference/documentationHowTo.rst b/docs/source/manuals/documentationHowTo.rst similarity index 99% rename from docs/source/reference/documentationHowTo.rst rename to docs/source/manuals/documentationHowTo.rst index d2b67d02ca..fb1062cd19 100644 --- a/docs/source/reference/documentationHowTo.rst +++ b/docs/source/manuals/documentationHowTo.rst @@ -1,6 +1,6 @@ -####################################### -So you want to help with documentation? -####################################### +############### +Help with docs? +############### Or a beginner's guide to writing docs without having to deal with more techie stuff than you have to. ##################################################################################################### diff --git a/docs/source/manuals/index.rst b/docs/source/manuals/index.rst deleted file mode 100644 index e6f0cbef2e..0000000000 --- a/docs/source/manuals/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -User Manuals -============ - -.. toctree:: - :maxdepth: 2 - - openmw-cs/index - installation/index diff --git a/docs/source/manuals/installation/index.rst b/docs/source/manuals/installation/index.rst index 6e6f5034ef..4cdc3968e1 100644 --- a/docs/source/manuals/installation/index.rst +++ b/docs/source/manuals/installation/index.rst @@ -6,6 +6,7 @@ In order to use OpenMW, you must install both the engine and the game files for .. toctree:: :maxdepth: 2 + :hidden: install-openmw install-game-files diff --git a/docs/source/manuals/installation/install-openmw.rst b/docs/source/manuals/installation/install-openmw.rst index 2ef72abfd5..c4cb834632 100644 --- a/docs/source/manuals/installation/install-openmw.rst +++ b/docs/source/manuals/installation/install-openmw.rst @@ -2,8 +2,8 @@ Install OpenMW ============== -The (easier) Binary Way -======================= +Direct Download +=============== If you're not sure what any of the different methods mean, you should probably stick to this one. Simply download the latest version for your operating system from @@ -15,14 +15,14 @@ and run the install package once downloaded. It's now installed! as OpenMW automatically installs into a separate directory for each new version. Your saves and configuration are compatible and accessible between versions. -The (bleeding edge) Source Way -============================== +From Source +=========== Visit the `Development Environment Setup `_ section of the Wiki for detailed instructions on how to build the engine. -The Ubuntu Way -============== +Ubuntu +====== A `Launchpad PPA `_ is available. Add it and install OpenMW:: @@ -39,16 +39,16 @@ To install, simply run the following as root (or in sudo):: # pacman -S openmw -The Void Linux Way -================== +Void Linux +========== The binary package is available in the official Repository To install simply run the following as root (or in sudo):: # xbps-install openmw -The Debian Way -============== +Debian +====== OpenMW is available from the unstable (sid) repository of Debian contrib and can be easily installed if you are using testing or unstable. @@ -56,8 +56,8 @@ However, it depends on several packages which are not in stable, so it is not possible to install OpenMW in Wheezy without creating a FrankenDebian. This is not recommended or supported. -The Flatpak Way -=============== +Flatpak +======= OpenMW is available as a flatpak. With flatpak installed, run the command below. It should show up on your desktop. :: diff --git a/docs/source/manuals/openmw-cs/index.rst b/docs/source/manuals/openmw-cs/index.rst index f1f51409d4..f65d0a4ae9 100644 --- a/docs/source/manuals/openmw-cs/index.rst +++ b/docs/source/manuals/openmw-cs/index.rst @@ -15,6 +15,7 @@ few chapters to familiarise yourself with the new interface. .. toctree:: :caption: Table of Contents + :hidden: :maxdepth: 2 foreword diff --git a/docs/source/reference/index.rst b/docs/source/reference/index.rst deleted file mode 100644 index 9aa409f784..0000000000 --- a/docs/source/reference/index.rst +++ /dev/null @@ -1,11 +0,0 @@ -################## -Reference Material -################## - -.. toctree:: - :maxdepth: 2 - - modding/index - lua-scripting/index - postprocessing/index - documentationHowTo diff --git a/docs/source/reference/lua-scripting/api.rst b/docs/source/reference/lua-scripting/api.rst index adede0b0d6..b8920b7ff1 100644 --- a/docs/source/reference/lua-scripting/api.rst +++ b/docs/source/reference/lua-scripting/api.rst @@ -1,6 +1,6 @@ -################# -Lua API reference -################# +############# +API Reference +############# .. include:: version.rst diff --git a/docs/source/reference/lua-scripting/index.rst b/docs/source/reference/lua-scripting/index.rst deleted file mode 100644 index 8db10bdae1..0000000000 --- a/docs/source/reference/lua-scripting/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -############# -Lua scripting -############# - -.. note:: - OpenMW Lua is not compatible with MWSE. - -.. include:: version.rst - -.. toctree:: - :caption: Table of Contents - :includehidden: - :maxdepth: 2 - - overview - api - teal - diff --git a/docs/source/reference/lua-scripting/index_interfaces.rst b/docs/source/reference/lua-scripting/index_interfaces.rst index 06f21ee7d5..0e89cb09f7 100644 --- a/docs/source/reference/lua-scripting/index_interfaces.rst +++ b/docs/source/reference/lua-scripting/index_interfaces.rst @@ -7,18 +7,18 @@ Interfaces .. toctree:: :hidden: - activation - ai - animation - camera - controls - gamepadcontrols - item_usage - mwui - settings - skill_progression - ui - crimes + Activation + AI + Animation + Camera + Controls + GamepadControls + ItemUsage + MWUI + Settings + Skill_progression + UI + Crimes **Interfaces of built-in scripts** diff --git a/docs/source/reference/lua-scripting/overview.rst b/docs/source/reference/lua-scripting/overview.rst index 2061e4efe9..852d63ca0a 100644 --- a/docs/source/reference/lua-scripting/overview.rst +++ b/docs/source/reference/lua-scripting/overview.rst @@ -1,5 +1,5 @@ -Overview of Lua scripting -######################### +Overview +######## .. include:: version.rst @@ -641,7 +641,7 @@ Using IDE for Lua scripting Find the directory ``resources/lua_api`` in your installation of OpenMW. It describes OpenMW LuaAPI in `LDT Documentation Language `__. -It is the source from which the :ref:`API reference ` is generated. +It is the source from which the :ref:`API reference ` is generated. If you write scripts using `Lua Development Tools `__ (eclipse-based IDE), you can import these files to get code autocompletion and integrated OpenMW API reference. Here are the steps: diff --git a/docs/source/reference/modding/index.rst b/docs/source/reference/modding/index.rst index e2e9f84ac6..d9616f6483 100644 --- a/docs/source/reference/modding/index.rst +++ b/docs/source/reference/modding/index.rst @@ -1,5 +1,5 @@ -Modding Reference -################# +Modding +####### The following document is the complete reference guide to modifying, or modding, your OpenMW setup. It does not cover content creation itself, @@ -14,7 +14,7 @@ about creating new content for OpenMW, please refer to not errors in the manual. .. toctree:: - :caption: Table of Contents + :hidden: :maxdepth: 2 foreword diff --git a/docs/source/reference/modding/settings/index.rst b/docs/source/reference/modding/settings/index.rst index 31ef4a3072..da367f4bee 100644 --- a/docs/source/reference/modding/settings/index.rst +++ b/docs/source/reference/modding/settings/index.rst @@ -47,6 +47,7 @@ The ranges included with each setting are the physically possible ranges, not re .. toctree:: :caption: Table of Contents + :hidden: :maxdepth: 2 camera diff --git a/docs/source/reference/postprocessing/index.rst b/docs/source/reference/postprocessing/index.rst index 36fe871cff..7e0c88f654 100644 --- a/docs/source/reference/postprocessing/index.rst +++ b/docs/source/reference/postprocessing/index.rst @@ -2,11 +2,58 @@ Post Processing ############### +OpenMW supports a moddable post process framework for creating and +controlling screenspace effects. This is integrated into OpenMW's Lua API, see +`reference <../lua-scripting/openmw_postprocessing.html>`_ for details. + +Basic concepts +============== + +Pass + Describes a single shader invocation pass. Currently only pixel (also known + as fragment) shaders are supported. + +Technique/Shader + An ordered list of passes, techniques will encompass a single effect like + bloom or SSAO. Technique is interchangeable with shader. + +Installing and Activating +========================= + +Shaders are managed through the virtual file system, simply install the associated +archive or folder as described in :ref:`mod-install`. Shaders must be +in the `Shaders` directory to be discoverable. A shader can be activated in one +of two ways: + +1. Adding the shaders filename (without its extension) to the end of the + :ref:`chain` list in ``settings.cfg``. +2. Using the in game post processor HUD, which can be activated with the ``F2`` + key by default. This is the recommended method as manual editing can be error + prone. + +Localization +============ + +Output text (e.g. shader description) can use the ``#{ContextName:Key}`` tags. +In this case OpenMW replaces it for value of ``Key`` key from the +``Data Files\L10n\ContextName\used_language.yaml`` file. + +Hot Reloading +============= + +It is possible to modify a shader without restarting OpenMW, hot reloading +can be enabled by using the lua command `debug.setShaderHotReloadEnabled(true)`. +Whenever a file is modified and saved, the shader will automatically reload in game. +This allows shaders to be written in a text editor you are comfortable with. +The only restriction is that the VFS is not aware of new files or changes in non-shader files, +so new shaders and localization strings can not be used. + + .. toctree:: :caption: Table of Contents :includehidden: + :hidden: :maxdepth: 2 - overview omwfx lua \ No newline at end of file diff --git a/docs/source/reference/postprocessing/lua.rst b/docs/source/reference/postprocessing/lua.rst index 45ccdd3631..28b99a5506 100644 --- a/docs/source/reference/postprocessing/lua.rst +++ b/docs/source/reference/postprocessing/lua.rst @@ -1,6 +1,6 @@ -#################### -Connecting With Lua -#################### +############### +Lua Integration +############### Overview ######## diff --git a/docs/source/reference/postprocessing/omwfx.rst b/docs/source/reference/postprocessing/omwfx.rst index 1eed8ad405..0efb8f408c 100644 --- a/docs/source/reference/postprocessing/omwfx.rst +++ b/docs/source/reference/postprocessing/omwfx.rst @@ -1,6 +1,6 @@ -######################### -OMWFX Language Reference -######################### +############## +OMWFX Language +############## Overview ######## diff --git a/docs/source/reference/postprocessing/overview.rst b/docs/source/reference/postprocessing/overview.rst deleted file mode 100644 index c9426e0cb4..0000000000 --- a/docs/source/reference/postprocessing/overview.rst +++ /dev/null @@ -1,52 +0,0 @@ -##################################### -Overview of Post Processing Framework -##################################### - -Overview -======== - -OpenMW supports a moddable post process framework for creating and -controlling screenspace effects. This is integrated into OpenMW's Lua API, see -`reference <../lua-scripting/openmw_postprocessing.html>`_ for details. - -Basic concepts -============== - -Pass - Describes a single shader invocation pass. Currently only pixel (also known - as fragment) shaders are supported. - -Technique/Shader - An ordered list of passes, techniques will encompass a single effect like - bloom or SSAO. Technique is interchangeable with shader. - -Installing and Activating -========================= - -Shaders are managed through the virtual file system, simply install the associated -archive or folder as described in :ref:`mod-install`. Shaders must be -in the `Shaders` directory to be discoverable. A shader can be activated in one -of two ways: - -1. Adding the shaders filename (without its extension) to the end of the - :ref:`chain` list in ``settings.cfg``. -2. Using the in game post processor HUD, which can be activated with the ``F2`` - key by default. This is the recommended method as manual editing can be error - prone. - -Localization -============ - -Output text (e.g. shader description) can use the ``#{ContextName:Key}`` tags. -In this case OpenMW replaces it for value of ``Key`` key from the -``Data Files\L10n\ContextName\used_language.yaml`` file. - -Hot Reloading -============= - -It is possible to modify a shader without restarting OpenMW, hot reloading -can be enabled by using the lua command `debug.setShaderHotReloadEnabled(true)`. -Whenever a file is modified and saved, the shader will automatically reload in game. -This allows shaders to be written in a text editor you are comfortable with. -The only restriction is that the VFS is not aware of new files or changes in non-shader files, -so new shaders and localization strings can not be used.