mod_manager_react_util¶
Source: base/tealdef/gui/menu/mod_manager_react_util.d.tl
Notes
Building blocks of the Mod Hub (mod browser, mod details, upload form, login, report and dependency dialogs) and helpers around the api.modhub backends.
ModManagerReactUtil¶
record global base/tealdef/gui/menu/mod_manager_react_util.d.tl:3
global record ModManagerReactUtil
Load: local mod_manager_react_util = ug_require "/gui/menu/mod_manager_react_util.tl"
Notes
Util table of mod_manager_react_util.tl with the Mod Hub recipes, dialogs and backend helpers.
Fields
| Name | Type | Description |
|---|---|---|
ModImage |
Recipe<ModImageParams> |
Recipe that loads and shows a mod image from the Mod Hub, with a throbber while loading and the error message over a placeholder on failure. |
ModTile |
Recipe<ModTileParams> |
Tile of one mod in the mod browser (image, title, info icons and buttons). used 2× in the base game |
ModTilesNotAvailable |
Recipe<ModTilesNotAvailableParams> |
Card shown instead of the mod tiles while loading, on errors or when no mods match the filters. |
DisplayRows |
integer |
Number of tile rows of the mod browser (15). |
DisplayCols |
integer |
Number of tile columns of the mod browser (4). |
DisplayPerPage |
integer |
Mods per page (DisplayRows * DisplayCols, 60); passed to ModBrowserDataProvider.new. used 2× in the base game |
ModListPager |
Recipe<ModListPagerParams> |
Row of page buttons with previous/next arrows and "…" gaps. The base game's mod browser no longer uses it. |
ModManagementStatus |
Recipe<ModManagementStatusParams> |
Progress bar of the backend's pending downloads or uploads, with a "Retry Download" button when api.modhub.shouldRetryInstall is true. used 1× in the base game |
ModListStatus |
Recipe<ModListStatusParams> |
Text "Showing 1-n of total Mods". The base game's mod browser no longer uses it. |
SortCombobox |
Recipe<SortComboboxParams> |
Combo box of the sort orders, labelled with getSortTypeInfo. |
ModSubscribeButton |
Recipe<ModSubscribeButtonParams> |
Subscribe/unsubscribe toggle button of a mod, showing the install state icon. used 2× in the base game |
ModActivateButton |
Recipe<ModActivateButtonParams> |
Activate/deactivate button used in the mod selector's details page. used 1× in the base game |
ModVoteButtonBar |
Recipe<ModVoteButtonBarParams> |
Like and dislike toggle buttons with vote counts. The player's own rating is requested when logged in; until it arrives the buttons are disabled. |
ModSearchField |
Recipe<ModSearchFieldParams> |
Search text field of the mod browser (at most 80 characters). used 1× in the base game |
ModFilterMenu |
Recipe<ModFilterMenuParams> |
List of collapsible checkbox groups, one per visible tag group, for filtering the mod browser. |
UserActions |
Recipe<UserActionsParams> |
Account buttons of the mod browser: "Refresh" (if the backend supports manual refresh), "Log In" when logged out, and the account name, which opens an account window with a log-out button. |
ModUploadForm |
Recipe<ModUploadFormParams> |
Upload form of a staging mod: validation status and report, publish options, upload progress and result. |
ModUploadNotAvailable |
Recipe<ModUploadFormParams> |
Placeholder shown instead of ModUploadForm when the staging mod was not found; ignores its parameters. |
ModDetails |
Recipe<ModDetailsParams> |
Main content of the mod details window: editable title bar for staging mods, image gallery and description. |
ModAuthor |
Recipe<ModAuthorParams> |
"Author" section of the mod details: avatar and name, optionally as a button that shows the author's other mods. |
ModDependencies |
Recipe<ModDependenciesParams> |
"Dependencies" section of the mod details: a table of dependency names with an action each. |
ModTags |
Recipe<ModTagsParams> |
"Tags" section of the mod details; for staging mods with remove buttons and an add button that opens a tag picker. |
ModStats |
Recipe<ModStatsParams> |
"Stats" section of the mod details: downloads, rating, file size, date added and date updated. |
ImageGallery |
Recipe<ImageGalleryParams> |
Image gallery of the mod details: a large image with thumbnails for navigation. |
ModBrowserTab |
Recipe<ModBrowserTabParams> |
Mod browser of one backend: search field, account buttons, sort box, tag filters, scrolling tile list and status bars. used 2× in the base game |
ModDetailsWindow |
Recipe<ModDetailsWindowParams> |
Window recipe of the mod details, opened with addSingletonWindow(mod_manager_react_util.ModDetailsWindow, params). used 4× in the base game |
StorageBar |
Recipe<StorageBarParams> |
Bar showing the storage used by the backend's mods (in MB, and as a share of the total when known); shown on consoles. |
ModMemoryBar |
Recipe<ModMemoryBarParams> |
Bar showing the estimated size of the active mods against a memory budget, with an overflow style when the budget is exceeded; used in the mod selector. used 1× in the base game |
Functions
makeErrorMessage(err : Modhub.ModHubErrorCode) : string base/tealdef/gui/menu/mod_manager_react_util.d.tl:4
Call as mod_manager_react_util.makeErrorMessage
Notes
Turns a Mod Hub error into a message for the player.
Returns string: The backend's error_message field if present; in debug mode the raw message with the error code; otherwise a generic "check your network connection" text with the error code.
showMessageBox(wc : Builtin.WindowAPI, setBlockedForModal : function(boolean), title : string, message : string) base/tealdef/gui/menu/mod_manager_react_util.d.tl:6
Call as mod_manager_react_util.showMessageBox
Notes
Opens a centred DialogReactUtil.DialogWindow with a title, a message and an OK button.
| Parameter | Type | Description |
|---|---|---|
wc |
Builtin.WindowAPI |
Window API to add the dialog to. |
setBlockedForModal |
function(boolean) |
Passed to the dialog as setBlockedForModal. |
title |
string |
Window title. |
message |
string |
Message text. |
createAsyncRef() : ReactRefT<Modhub.UniquePendingRequestId> base/tealdef/gui/menu/mod_manager_react_util.d.tl:8
Call as mod_manager_react_util.createAsyncRef
Notes
Creates a ref for a pending api.modhub request that is aborted automatically when the component unmounts.
Returns ReactRefT<Modhub.UniquePendingRequestId>: A ref, initially holding nil.
Details
Uses react.useRef and react.onUnmount, so call it inside a recipe function.
setAsyncRef(ref : ReactRefT<Modhub.UniquePendingRequestId>, request : Modhub.UniquePendingRequestId) base/tealdef/gui/menu/mod_manager_react_util.d.tl:9
Call as mod_manager_react_util.setAsyncRef
Notes
Stores a new pending request in an async ref, aborting the request it held before. Pass nil to clear it after a request finished.
showErrorBox(windowApi : Builtin.WindowAPI, setBlockedForModal : function(boolean), title : string, errorCode? : Modhub.ModHubErrorCode) base/tealdef/gui/menu/mod_manager_react_util.d.tl:65
Call as mod_manager_react_util.showErrorBox
Notes
Shows an error dialog with showMessageBox.
| Parameter | Type | Description |
|---|---|---|
windowApi |
Builtin.WindowAPI |
Window API to add the dialog to. |
setBlockedForModal |
function(boolean) |
Passed to the dialog. |
title |
string |
Window title; without errorCode it is used as the message and the title becomes "Error". |
errorCode? |
Modhub.ModHubErrorCode |
Mod Hub error whose makeErrorMessage text is shown. Optional. |
showLoginDialog(context : ModManagerContext, onLogin? : function()) base/tealdef/gui/menu/mod_manager_react_util.d.tl:66
Call as mod_manager_react_util.showLoginDialog
Notes
Opens the Mod Hub login window for the context's backend.
| Parameter | Type | Description |
|---|---|---|
context |
ModManagerContext |
|
onLogin? |
function() |
Called when the login window closes, whether or not the login succeeded. Optional. |
showReportDialog(context : ModManagerContext, modId : Modhub.ModId) base/tealdef/gui/menu/mod_manager_react_util.d.tl:67
Call as mod_manager_react_util.showReportDialog
Notes
Opens the "Report Mod" window for a mod and blocks the UI behind it until it closes.
showUninstallDialog(context : ModManagerContext, modId : Modhub.ModId, modTitle : string) base/tealdef/gui/menu/mod_manager_react_util.d.tl:68
Call as mod_manager_react_util.showUninstallDialog
Notes
Opens the "Force Uninstall Mod" confirmation window, which calls api.modhub.forceUninstallModAsync on confirmation.
| Parameter | Type | Description |
|---|---|---|
context |
ModManagerContext |
|
modId |
Modhub.ModId |
|
modTitle |
string |
Mod title shown in the question. |
checkMissingDependencies(context : ModManagerContext, modIds : {Modhub.ModId}, asyncRef : ReactRefT<Modhub.UniquePendingRequestId>) base/tealdef/gui/menu/mod_manager_react_util.d.tl:69
Call as mod_manager_react_util.checkMissingDependencies
Notes
Looks up the Mod Hub dependencies of the given mods with fetchMissingDependencies and, if any are not subscribed, opens the missing-dependencies dialog.
Details
Called by ModSubscribeButton after a successful subscription.
fetchMissingDependencies(modIds : {Modhub.ModId}, asyncRef : ReactRefT<Modhub.UniquePendingRequestId>, onDone : function({ModDependency})) base/tealdef/gui/menu/mod_manager_react_util.d.tl:70
Call as mod_manager_react_util.fetchMissingDependencies
Notes
Collects the direct Mod Hub dependencies of the given mods that the player has not subscribed to.
| Parameter | Type | Description |
|---|---|---|
modIds |
{Modhub.ModId} |
Mods to check. Subscribed mods whose info says they have no dependencies are skipped. |
asyncRef |
ReactRefT<Modhub.UniquePendingRequestId> |
Ref that holds the pending detail requests. |
onDone |
function({ModDependency}) |
Called with the unsubscribed dependencies (each listed once); called with an empty list when there is no publishing backend. |
Details
The mod details are requested one after another from the backend returned by getModPublishBackendId(). Dependencies of dependencies are not followed.
showMissingDependenciesDialog(context : ModManagerContext, params : MissingDependenciesParams) base/tealdef/gui/menu/mod_manager_react_util.d.tl:71
Call as mod_manager_react_util.showMissingDependenciesDialog
Notes
Opens the missing-dependencies window, which lists the dependencies with a subscribe button each.
showValidationReportDialog(context : ModManagerContext, result : Modhub.ModValidatorResult) base/tealdef/gui/menu/mod_manager_react_util.d.tl:73
Call as mod_manager_react_util.showValidationReportDialog
Notes
Opens the "Validation Report" window with the results of a mod validation.
doRequiredUserAction(context : ModManagerContext, action : function()) base/tealdef/gui/menu/mod_manager_react_util.d.tl:74
Call as mod_manager_react_util.doRequiredUserAction
Notes
Runs action right away when the player is logged in to the context's backend; otherwise opens the login dialog first and runs action only if the login succeeded.
getTotalModMemoryMB(modIds : {Mod.ModId}) : integer base/tealdef/gui/menu/mod_manager_react_util.d.tl:76
Call as mod_manager_react_util.getTotalModMemoryMB
Notes
Sums the estimated size of the given installed mods.
Returns integer: Total of totalEstimatedSizeMB from modRep:getModSize, in MB. Mods that are not installed are skipped.
getSourceInfo(source : string) : SourceInfo base/tealdef/gui/menu/mod_manager_react_util.d.tl:327
Call as mod_manager_react_util.getSourceInfo
Notes
Returns icon and title for a mod source.
| Parameter | Type | Description |
|---|---|---|
source |
string |
"UserMods", "StagingArea", "BuiltInMods", "DLC" or the name of a Mod Hub backend (e.g. "mod.io"); unknown values give "System". |
Returns SourceInfo
getSortTypeInfo(sortType : Modhub.SortType) : SortTypeInfo base/tealdef/gui/menu/mod_manager_react_util.d.tl:332
Call as mod_manager_react_util.getSortTypeInfo
Notes
Returns the display name of a Mod Hub sort type ("MISSING" for unknown types).
Returns SortTypeInfo
getTagInfo(tag : string) : TagInfo base/tealdef/gui/menu/mod_manager_react_util.d.tl:337
Call as mod_manager_react_util.getTagInfo
Notes
Returns the display name of a mod tag: its translation (app.getModTagTranslation), or, when there is none, the title from getSourceInfo(tag).
Returns TagInfo
getModPublishBackendId() : Modhub.BackendId base/tealdef/gui/menu/mod_manager_react_util.d.tl:351
Call as mod_manager_react_util.getModPublishBackendId
Notes
Returns the Mod Hub backend that can download and publish mods (the first backend that is not info-only), or nil if there is none.
Returns Modhub.BackendId
Details
Logs an error when there is more than one such backend.
Used in the base game: 7 times in 5 files
base/content/gui/gui/menu/savegame_react_util.tl:970
base/content/gui/gui/menu/mod_manager_page.tl:178
base/content/gui/gui/menu/main_page.tl:17
base/content/gui/gui/menu/main_menu.tl:604
base/content/gui/gui/main/pause_menu.tl:287
getLocalBackendId() : Modhub.BackendId base/tealdef/gui/menu/mod_manager_react_util.d.tl:352
Call as mod_manager_react_util.getLocalBackendId
No description in the game files yet.
Returns Modhub.BackendId
checkModManagerAccess(windowApi : Builtin.WindowAPI) : boolean base/tealdef/gui/menu/mod_manager_react_util.d.tl:354
Call as mod_manager_react_util.checkModManagerAccess
Notes
Checks whether the Mod Hub can be opened and shows a message box explaining why when it cannot.
Returns boolean: False when the GUI backend or a Mod Hub backend is not initialised, when the player has no access to user-generated content, or when the player is younger than 13; otherwise true.
ModManagerReactUtil.ModAction¶
enum base/tealdef/gui/menu/mod_manager_react_util.d.tl:11
enum ModAction
Notes
Mod actions; not used by the base game scripts.
| Value | Description |
|---|---|
"ForceUninstall" |
|
"Report" |
ModManagerReactUtil.GalleryState¶
enum base/tealdef/gui/menu/mod_manager_react_util.d.tl:16
enum GalleryState
Notes
Loading state of a mod's images, returned by ModGalleryApi.getState and ModDetailsApi.getGalleryState.
| Value | Description |
|---|---|
"Loading" |
Not all images have loaded yet. |
"Error" |
At least one image failed to load (for mod details, also when the mod has no logo image). |
"Ready" |
All images have loaded. |
ModManagerReactUtil.ModInfoIcon¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:22
record ModInfoIcon
Notes
An icon with label shown on a mod tile (ModTileParams.leftInfoIcons, ModTileParams.customSortInfoIcon).
Used in the base game: 6 times in 2 files
base/content/gui/gui/menu/mod_manager_page.tl:105
base/content/gui/gui/menu/mod_selector_page.tl:22
Fields
ModManagerReactUtil.DialogButton¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:29
record DialogButton
Notes
A button of the missing-dependencies dialog.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:3707
Fields
| Name | Type | Description |
|---|---|---|
text |
string |
Button label. |
isSecondary |
boolean |
Secondary style instead of primary. |
Functions
onClick() base/tealdef/gui/menu/mod_manager_react_util.d.tl:32
Notes
Called after the dialog was closed. Optional.
ModManagerReactUtil.MissingDependenciesParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:35
record MissingDependenciesParams
Notes
Content of the dialog opened by showMissingDependenciesDialog.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:3848
Fields
| Name | Type | Description |
|---|---|---|
title |
string |
Window title; default "Missing Dependencies". |
message |
string |
Text at the top; default "The following required mods are not subscribed:". |
names |
{string} |
Names listed below the message (one per line). Optional. |
dependenciesMessage |
string |
Text shown above the list of subscribable dependencies. Optional. |
dependencies |
{ModDependency} |
Mods listed with a subscribe button each. |
footer |
string |
Text below the lists. Optional. |
buttons |
{DialogButton} |
Buttons at the bottom; a single "Close" button when nil or empty. |
ModManagerReactUtil.ModDependency¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:45
record ModDependency
Notes
A Mod Hub mod that another mod depends on.
Used in the base game: 5 times in 2 files
base/content/gui/gui/menu/mod_manager_react_util.tl:3706
base/content/gui/gui/menu/mod_selector_page.tl:1151
Fields
| Name | Type | Description |
|---|---|---|
modId |
Modhub.ModId |
Mod Hub id of the dependency. |
name |
string |
Display name of the dependency. |
ModManagerReactUtil.ModManagerContext¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:50
record ModManagerContext
Notes
Backend and UI services passed to most Mod Hub recipes and dialogs.
Details
The mod manager page builds one context per backend tab from its CommonMenuParams (windowContainer,
setBlockedForModal, calloutContainerRef) and adds createModTile.
Used in the base game: 22 times in 4 files
base/content/gui/gui/menu/mod_manager_react_util.tl:1190
base/content/gui/gui/menu/savegame_react_util.tl:1107
base/content/gui/gui/menu/mod_manager_page.tl:75
base/content/gui/gui/menu/mod_selector_page.tl:135
Fields
| Name | Type | Description |
|---|---|---|
backendId |
Modhub.BackendId |
Mod Hub backend that requests go to. |
wc |
ReactRefWrapApiT<Builtin.WindowContainerDelegateParam, Builtin.WindowAPI> |
Window container used for dialogs; call wc:get():getApi(). |
calloutContainerRef |
ReactRefWrapApi0<CalloutApi> |
Callout container passed on to tiles and dialogs. |
Functions
setBlockedForModal(blocked : boolean) base/tealdef/gui/menu/mod_manager_react_util.d.tl:53
Notes
Called with true/false when a modal dialog opens or closes (see CommonMenuParams.setBlockedForModal).
onRefresh() base/tealdef/gui/menu/mod_manager_react_util.d.tl:56
No description in the game files yet.
createModTile(displayData : Modhub.ModBrowserDisplayData, index : integer, isCurated : boolean) : TreeNodeId base/tealdef/gui/menu/mod_manager_react_util.d.tl:58
Notes
Builds the tile of one entry of the mod browser; ModBrowserTab calls it for every entry it displays.
| Parameter | Type | Description |
|---|---|---|
displayData |
Modhub.ModBrowserDisplayData |
Current display data of the browser. |
index |
integer |
Index of the entry in displayData.entries. |
isCurated |
boolean |
True when the mod has the Curated tag. |
Returns TreeNodeId: The tile, usually a ModTile.
ModManagerReactUtil.ModImageParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:78
record ModImageParams
Notes
Parameters of ModImage.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:135
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the backend the image is loaded from. |
request |
Modhub.GetModMediaRequest |
Image to load with api.modhub.getModMediaAsync; when nil, imagePath or a placeholder is shown. |
result |
Modhub.AsyncResult<Modhub.ModMediaData> |
Already loaded result; when set, it is shown instead of the result of request. |
imagePath |
string |
Local image shown when request is nil; defaults to a placeholder. |
modMediaType |
Modhub.ModMediaType |
Media type used by ImageGallery when it builds the request for this entry. |
ModManagerReactUtil.ModImageApi¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:87
record ModImageApi
Notes
API of a ModImage component (react.provideApi); read it through a node ref with ref:get():getApi().
Functions
hasData() : boolean base/tealdef/gui/menu/mod_manager_react_util.d.tl:88
Notes
Returns true once the image has loaded.
Returns boolean
getError() : Modhub.ModHubErrorCode base/tealdef/gui/menu/mod_manager_react_util.d.tl:89
Notes
Returns the error of the last request, or nil.
Returns Modhub.ModHubErrorCode
ModManagerReactUtil.ModTileParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:92
record ModTileParams
Notes
Parameters of ModTile.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:259
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the tile's backend. |
modPublishHelper |
ReactRefT<Modhub.ModPublishHelper> |
Publish helper; when it has a staging mod for modHubId, the cover image can be added or removed on the tile. |
modHubId |
Modhub.ModId |
Mod Hub id used with modPublishHelper for the staging mod. |
modInfo |
Modhub.ModInfo |
Mod Hub info of the mod (title, summary, logo, statistics). |
modId |
Mod.ModId |
|
sortType |
Modhub.SortType |
Current sort type; selects which statistic is shown on the right of the tile. |
leftInfoIcons |
{ModInfoIcon} |
|
customSortInfoIcon |
ModInfoIcon |
Icon on the right of the tile when sorting by Custom (activation order). |
Functions
onClick() base/tealdef/gui/menu/mod_manager_react_util.d.tl:99
Notes
Called when the tile or its details button is clicked.
createButtons() : {TreeNodeId} base/tealdef/gui/menu/mod_manager_react_util.d.tl:102
Notes
Returns the buttons of the tile (e.g. a ModSubscribeButton).
Returns {TreeNodeId}
onRefresh() base/tealdef/gui/menu/mod_manager_react_util.d.tl:103
Notes
Called after the cover image of a staging mod was changed.
ModManagerReactUtil.ModTilesNotAvailableParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:107
record ModTilesNotAvailableParams
Notes
Parameters of ModTilesNotAvailable.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:468
Fields
| Name | Type | Description |
|---|---|---|
layout |
TreeNodeId |
Content of the card. |
ModManagerReactUtil.ModListPagerParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:116
record ModListPagerParams
Notes
Parameters of ModListPager.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:482
Fields
| Name | Type | Description |
|---|---|---|
currentPage |
integer |
Current page, counted from 0. |
numPages |
integer |
Number of pages. |
totalResults |
integer |
Total number of results; not used by the pager. |
Functions
onPageClick(pageNum : integer) base/tealdef/gui/menu/mod_manager_react_util.d.tl:121
Notes
Called with the clicked page, counted from 0.
onNextClick() base/tealdef/gui/menu/mod_manager_react_util.d.tl:122
Notes
Called by the "next" arrow.
onPrevClick() base/tealdef/gui/menu/mod_manager_react_util.d.tl:123
Notes
Called by the "previous" arrow.
ModManagerReactUtil.ModManagementStatusParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:127
record ModManagementStatusParams
Notes
Parameters of ModManagementStatus.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:561
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the backend to watch. |
upload |
boolean |
Uses upload texts ("Uploading Mods") instead of download texts. |
ModManagerReactUtil.ModListStatusParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:133
record ModListStatusParams
Notes
Parameters of ModListStatus.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:649
Fields
| Name | Type | Description |
|---|---|---|
currentPage |
integer |
Current page, counted from 0. |
displayPerPage |
integer |
Mods per page. |
totalPages |
integer |
Number of pages; not used. |
totalResults |
integer |
Total number of mods. |
ModManagerReactUtil.SortComboboxParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:141
record SortComboboxParams
Notes
Parameters of SortCombobox.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:671
Fields
| Name | Type | Description |
|---|---|---|
sortOrders |
{Modhub.SortOrder} |
Available sort orders, from getSortAndFilterOptions().sortOrders. |
sortType |
Modhub.SortType |
Selected sort type. |
Functions
onSortChange(Modhub.SortType) base/tealdef/gui/menu/mod_manager_react_util.d.tl:144
Notes
Called with the newly selected sort type.
ModManagerReactUtil.ModSubscribeButtonParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:148
record ModSubscribeButtonParams
Notes
Parameters of ModSubscribeButton.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:697
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the backend to subscribe through. |
modId |
Modhub.ModId |
Mod Hub id of the mod. |
checkExists |
boolean |
Requests the mod details first and disables subscribing when the backend does not find the mod. |
checkDependencies |
boolean |
Set to false to skip checkMissingDependencies after subscribing; nil or true checks them. |
ModManagerReactUtil.ModActivateButtonParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:156
record ModActivateButtonParams
Notes
Parameters of ModActivateButton.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:942
Fields
| Name | Type | Description |
|---|---|---|
active |
boolean |
Whether the mod is active; shows "Activated" instead of "Activate". |
missing |
boolean |
Shows an issue icon on the button. |
Functions
onValueChange(value : boolean) base/tealdef/gui/menu/mod_manager_react_util.d.tl:159
Notes
Called with the toggled state (not active) when clicked.
ModManagerReactUtil.ModVoteButtonBarParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:163
record ModVoteButtonBarParams
Notes
Parameters of ModVoteButtonBar.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:984
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the backend to vote through. |
modInfo |
Modhub.ModInfo |
Mod to rate; its likes and dislikes give the counts. |
ModManagerReactUtil.ModSearchFieldParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:169
record ModSearchFieldParams
Notes
Parameters of ModSearchField.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:1108
Fields
| Name | Type | Description |
|---|---|---|
value |
string |
Current search text. |
Functions
onChange(string) base/tealdef/gui/menu/mod_manager_react_util.d.tl:171
Notes
Called with the new text while typing, and with an empty string on cancel.
ModManagerReactUtil.ModFilterMenuParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:175
record ModFilterMenuParams
Notes
Parameters of ModFilterMenu.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:1130
Fields
| Name | Type | Description |
|---|---|---|
sortAndFilterOptions |
Modhub.SortAndFilterOptions |
Tag groups to offer; only groups marked visible are shown. |
topItems |
{TreeNodeId} |
Items placed above the tag groups (required; may be empty). |
bottomItems |
{TreeNodeId} |
Items placed below the tag groups (required; may be empty). |
Functions
getTagToggled(string) : boolean base/tealdef/gui/menu/mod_manager_react_util.d.tl:177
Notes
Returns whether a tag filter is active.
Returns boolean
onToggleTag(string) base/tealdef/gui/menu/mod_manager_react_util.d.tl:178
Notes
Called with the tag whose checkbox was toggled.
ModManagerReactUtil.UserActionsParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:184
record UserActionsParams
Notes
Parameters of UserActions.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:1295
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the backend. |
Functions
doRefresh() base/tealdef/gui/menu/mod_manager_react_util.d.tl:186
Notes
Called after a successful manual refresh or login.
doLogIn() base/tealdef/gui/menu/mod_manager_react_util.d.tl:187
No description in the game files yet.
ModManagerReactUtil.ModUploadFormParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:191
record ModUploadFormParams
Notes
Parameters of ModUploadForm and ModUploadNotAvailable.
Used in the base game: 2 times in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:1395
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the publishing backend. |
modPublishHelper |
ReactRefT<Modhub.ModPublishHelper> |
Publish helper that holds the staging mod. |
modId |
Modhub.ModId |
Id of the staging mod. |
errorMessage |
string |
When set, shown as status text and the upload button is disabled. |
loadingMessage |
string |
When set, shown as status text instead of the default. |
publishSettings |
Modhub.PublishSettings |
Fixed publish settings; when set, the visibility, metadata and changelog inputs are hidden. |
disableValidator |
boolean |
Skips mod validation and publishes as a save game (PublishSettings.isSavegame); set by the save-game sharing dialog. |
Functions
onRefresh() base/tealdef/gui/menu/mod_manager_react_util.d.tl:197
Notes
Called after the staging mod data was changed.
onClose() base/tealdef/gui/menu/mod_manager_react_util.d.tl:199
Notes
Called by the "Ok" button after a successful upload.
ModManagerReactUtil.ModDetailsParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:206
record ModDetailsParams
Notes
Parameters of ModDetails.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:1928
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the backend the images are loaded from. |
uploadContext |
ModManagerContext |
Context of the publishing backend; used for the "Open Mod Page" button of a staging mod. |
modPublishHelper |
ReactRefT<Modhub.ModPublishHelper> |
Publish helper; when it has a staging mod for modId, title and images can be edited. |
modId |
Modhub.ModId |
Mod Hub id of the mod. |
title |
string |
Mod title. |
logoImage |
string |
Logo image of the mod; when empty, the gallery state is reported as Error. |
url |
string |
|
description |
string |
Description, rendered as HTML. |
imageParams |
{ModImageParams} |
Images of the gallery. |
hasResult |
boolean |
False while the mod details are still loading (gallery state Loading). |
isCurated |
boolean |
Shows the animated "Curated" badge. |
Functions
onRefresh() base/tealdef/gui/menu/mod_manager_react_util.d.tl:210
Notes
Called after the staging mod data was changed.
ModManagerReactUtil.ModAuthorParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:222
record ModAuthorParams
Notes
Parameters of ModAuthor.
Used in the base game: 2 times in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:2156
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the backend the avatar is loaded from. |
uploadContext |
ModManagerContext |
|
modPublishHelper |
ReactRefT<Modhub.ModPublishHelper> |
|
modId |
Modhub.ModId |
Mod whose author avatar is loaded; no avatar is shown when its value is empty. |
authorName |
string |
Author name. |
userPortal |
Modhub.UserPortal |
Portal of the author; PlayStation Network and Xbox Live show a fixed image instead of the avatar. |
isUserNameSearchEnabled |
boolean |
Makes the author a button that calls onShowAuthorMods. |
Functions
onRefresh() base/tealdef/gui/menu/mod_manager_react_util.d.tl:226
No description in the game files yet.
onClose() base/tealdef/gui/menu/mod_manager_react_util.d.tl:227
Notes
Called after onShowAuthorMods when the author button is clicked.
onShowAuthorMods() base/tealdef/gui/menu/mod_manager_react_util.d.tl:231
Notes
Called when the author button is clicked; the mod manager page then lists the author's mods.
ModManagerReactUtil.ModDependencyEntry¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:236
record ModDependencyEntry
Notes
One row of ModDependencies.
Used in the base game: 2 times in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:5462
Fields
| Name | Type | Description |
|---|---|---|
name |
string |
Name of the dependency. |
action |
TreeNodeId |
Component shown next to the name, e.g. a subscribe button. |
ModManagerReactUtil.ModDependenciesParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:241
record ModDependenciesParams
Notes
Parameters of ModDependencies.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:2207
Fields
| Name | Type | Description |
|---|---|---|
entries |
{ModDependencyEntry} |
The rows; "No Dependencies" is shown when empty. |
ModManagerReactUtil.ModTagsParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:246
record ModTagsParams
Notes
Parameters of ModTags.
Used in the base game: 2 times in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:2260
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context used for the tag-picker dialog. |
tags |
{string} |
Tags of the mod. |
uploadContext |
ModManagerContext |
|
modPublishHelper |
ReactRefT<Modhub.ModPublishHelper> |
Publish helper; when it has a staging mod for modId, tags can be added and removed. |
modId |
Modhub.ModId |
Id of the mod. |
Functions
onRefresh() base/tealdef/gui/menu/mod_manager_react_util.d.tl:251
Notes
Called after the tags of the staging mod were changed.
ModManagerReactUtil.ModStatsParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:256
record ModStatsParams
Notes
Parameters of ModStats.
Used in the base game: 2 times in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:2396
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
|
modInfo |
Modhub.ModInfo |
Mod whose statistics are shown; nothing is listed when nil. |
ModManagerReactUtil.ImageGalleryParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:262
record ImageGalleryParams
Notes
Parameters of ImageGallery.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:2449
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the backend the images are loaded from. |
modPublishHelper |
ReactRefT<Modhub.ModPublishHelper> |
Publish helper; when it has a staging mod for modId, images can be added, moved and removed. |
modId |
Modhub.ModId |
Id of the mod. |
imageParams |
{ModImageParams} |
The images, in order. |
showSelector |
boolean |
Not used by the implementation. |
Functions
onRefresh() base/tealdef/gui/menu/mod_manager_react_util.d.tl:268
Notes
Called after the images of the staging mod were changed.
ModManagerReactUtil.ModGalleryApi¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:272
record ModGalleryApi
Notes
API of a ImageGallery component (react.provideApi); read it through a node ref with ref:get():getApi().
Functions
getState() : GalleryState base/tealdef/gui/menu/mod_manager_react_util.d.tl:273
Notes
Returns the combined loading state of all gallery images.
Returns GalleryState
ModManagerReactUtil.ModDetailsApi¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:276
record ModDetailsApi
Notes
API of a ModDetails component (react.provideApi); read it through a node ref with ref:get():getApi().
Functions
getGalleryState() : GalleryState base/tealdef/gui/menu/mod_manager_react_util.d.tl:277
Notes
Returns the loading state of the mod's images.
Returns GalleryState
ModManagerReactUtil.ModBrowserTabParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:280
record ModBrowserTabParams
Notes
Parameters of ModBrowserTab.
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the backend; its createModTile builds the tiles. |
dataProvider |
ReactRefT<Modhub.ModBrowserDataProvider> |
Data provider of the listed mods (search, filters, sorting, paging), e.g. api.type.modhub.ModBrowserDataProvider.new(backendId, DisplayPerPage). |
additionalTopBarItems |
{TreeNodeId} |
Extra items for the top bar, placed after the search field and account buttons. |
additionalBottomBarItems |
{TreeNodeId} |
Extra items for the bottom bar (e.g. a ModMemoryBar). |
aboveMainContentItem |
TreeNodeId |
Item placed above the mod tiles. |
showComboBox |
boolean |
Shows the status filter combo box (from the tag group at statusTagGroupIndex) above the filter menu. |
ModManagerReactUtil.ModManagerDetailsPageParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:290
record ModManagerDetailsPageParams
Notes
Mod details of the mod manager, shown in ModDetailsWindow through modManagerParams.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:5304
Fields
| Name | Type | Description |
|---|---|---|
context |
ModManagerContext |
Context of the backend the mod comes from. |
uploadContext |
ModManagerContext |
Context of the publishing backend, when there are staging mods. |
modId |
Modhub.ModId |
Mod Hub id of the mod. |
modPublishHelperRef |
ReactRefT<Modhub.ModPublishHelper> |
Publish helper for staging mods. |
isUserNameSearchEnabled |
boolean |
Makes the author clickable (see ModAuthorParams.isUserNameSearchEnabled). |
isCurated |
boolean |
Shows the "Curated" badge. |
inPauseMenu |
boolean |
When true, a left click outside the window closes it. |
Functions
onClose() base/tealdef/gui/menu/mod_manager_react_util.d.tl:295
Notes
Closes the details window.
detailsBack(userSearchId? : Modhub.UserId, authorName? : string) base/tealdef/gui/menu/mod_manager_react_util.d.tl:296
Notes
Returns from the details to the browser; with a user id it filters the browser by that author (used by the author button).
ModManagerReactUtil.ModSelectorDetailsPageParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:302
record ModSelectorDetailsPageParams
Notes
Mod details of the mod selector (new-game mod settings), shown in ModDetailsWindow through modSelectorParams.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:5678
Fields
| Name | Type | Description |
|---|---|---|
mod |
string |
Name (folder id) of the installed mod. |
modInfo |
Modhub.ModInfo |
Mod Hub info of the mod; its modSource selects the backend for the details. |
modParams |
{string : integer} |
Current values of the mod's settings (parameter key to option index). |
isCurated |
boolean |
Shows the "Curated" badge. |
inPauseMenu |
boolean |
When true, a left click outside the window closes it. |
Functions
isModActive(modName : string) base/tealdef/gui/menu/mod_manager_react_util.d.tl:306
Notes
Returns whether a mod (by name) is active.
toggleMod(modName : string) base/tealdef/gui/menu/mod_manager_react_util.d.tl:307
Notes
Activates or deactivates a mod (by name).
onParamChanged(key : string, index : integer) base/tealdef/gui/menu/mod_manager_react_util.d.tl:308
Notes
Called with parameter key and new option index when a mod setting is changed.
onClose() base/tealdef/gui/menu/mod_manager_react_util.d.tl:309
Notes
Closes the details window.
ModManagerReactUtil.ModDetailsWindowParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:314
record ModDetailsWindowParams
Notes
Parameters of ModDetailsWindow; set either modManagerParams or modSelectorParams.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:5979
Fields
| Name | Type | Description |
|---|---|---|
title |
string |
Window title; default "Mod Details". |
modManagerParams |
ModManagerDetailsPageParams |
Shows the mod manager's details page; takes precedence over modSelectorParams. |
modSelectorParams |
ModSelectorDetailsPageParams |
Shows the mod selector's details page. |
Functions
onClose() base/tealdef/gui/menu/mod_manager_react_util.d.tl:318
Notes
Called by the close button, unless a dialog opened from the window is still blocking it.
ModManagerReactUtil.SourceInfo¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:322
record SourceInfo
Notes
Icon and title of a mod source, returned by getSourceInfo.
Fields
| Name | Type | Description |
|---|---|---|
iconPath |
string |
Path of the source icon. |
title |
string |
Translated source name. |
ModManagerReactUtil.SortTypeInfo¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:329
record SortTypeInfo
Notes
Display data of a sort type, returned by getSortTypeInfo.
Fields
| Name | Type | Description |
|---|---|---|
title |
string |
Translated name of the sort type; Custom is shown as "Activation Order". |
ModManagerReactUtil.TagInfo¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:334
record TagInfo
Notes
Display data of a mod tag, returned by getTagInfo.
Fields
| Name | Type | Description |
|---|---|---|
name |
string |
Translated tag name. |
ModManagerReactUtil.StorageBarParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:339
record StorageBarParams
Notes
Parameters of StorageBar.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:5117
Fields
| Name | Type | Description |
|---|---|---|
backendId |
Modhub.BackendId |
Backend whose storage use is shown. |
ModManagerReactUtil.ModMemoryBarParams¶
record base/tealdef/gui/menu/mod_manager_react_util.d.tl:344
record ModMemoryBarParams
Notes
Parameters of ModMemoryBar; all values in MB.
Used in the base game: 1 time in 1 file
base/content/gui/gui/menu/mod_manager_react_util.tl:5056
Fields