Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WarFrontIO/client
/ functions
Functions
628 in github.com/WarFrontIO/client
⨍
Functions
628
◇
Types & classes
194
↓ 1 callers
Function
loadValidatedInput
(id: ElementId, errorId: ElementId)
src/ui/type/ValidatedInput.ts:127
↓ 1 callers
Function
loginUser
(service: "discord", state: string)
src/network/api/UserAuthenticationRoutes.ts:10
↓ 1 callers
Function
mapFontData
(ctx: GameGLContext)
src/renderer/shader/ShaderManager.ts:22
↓ 1 callers
Function
mapFromId
(id: string)
src/map/MapRegistry.ts:23
↓ 1 callers
Method
move
* Moves the boat to the next waypoint.
src/game/boat/Boat.ts:43
↓ 1 callers
Method
moveTowards
* Moves the boat towards the given position. * @param x The x-coordinate to move towards. * @param y The y-coordinate to move towards. * @param
src/game/boat/Boat.ts:60
↓ 1 callers
Method
onBlur
* Adds a listener for the blur event. * @param callback The callback to invoke when the blur event is triggered
src/ui/type/ValidatedInput.ts:72
↓ 1 callers
Method
onChanged
* Adds a change listener to the select element. * @param callback The callback to invoke when the value changes
src/ui/type/SingleSelectElement.ts:53
↓ 1 callers
Method
onDragEnd
* Called when the user stops dragging at the given position. * @param x The screen x-coordinate of the drag end. * @param y The screen y-coordinat
src/event/InteractionManager.ts:222
↓ 1 callers
Method
onDragStart
* Called when the user starts dragging at the given position. * @param x The screen x-coordinate of the drag start. * @param y The screen y-coordi
src/event/InteractionManager.ts:206
↓ 1 callers
Method
onHover
* Called when the user hovers at the given position. * @param x The screen x-coordinate of the hover. * @param y The screen y-coordinate of the ho
src/event/InteractionManager.ts:274
↓ 1 callers
Method
onInput
* Adds a listener for the input event. * @param callback The callback to invoke when the input event is triggered
src/ui/type/ValidatedInput.ts:63
↓ 1 callers
Method
onKeyDown
* Called when the user presses a key at the given position. * @param keys The keys that were pressed (one key + modifiers) * @param x The screen x
src/event/InteractionManager.ts:294
↓ 1 callers
Method
onKeyUp
* Called when the user releases a key at the given position. * @param key The key that was released * @param x The screen x-coordinate of the key
src/event/InteractionManager.ts:302
↓ 1 callers
Method
onMultiTouch
* Called when the user interacts with multiple touch points. * @param oldX The centered screen x-coordinate of the old touch points. * @param oldY
src/event/InteractionManager.ts:258
↓ 1 callers
Method
onScroll
* Called when the user scrolls at the given position. * @param x The screen x-coordinate of the scroll. * @param y The screen y-coordinate of the
src/event/InteractionManager.ts:239
↓ 1 callers
Method
oppose
* Oppose an attack on the player. * @param troopCount The amount of troops that are opposing the attack. * @returns Whether the attack is still on
src/game/attack/AttackExecutor.ts:61
↓ 1 callers
Method
option
* Registers a new option with the given key and value. * @param key The key of the option. Must be unique, not contain ',' and shouldn't change in t
src/util/settings/SingleSelectSetting.ts:24
↓ 1 callers
Method
orderTiles
* Build the initial tile queue. * @param borderTiles The tiles to calculate initial tile queue from, or null to use the player's border tiles. * @
src/game/attack/AttackExecutor.ts:146
↓ 1 callers
Method
paintTiles
* Paint a tile. * @param tiles the tiles to paint * @param player the player to paint the tiles for * @internal
src/renderer/manager/TerritoryRenderingManager.ts:34
↓ 1 callers
Function
parseColorAction
(actions)
scripts/theme-loader.js:159
↓ 1 callers
Function
parseColorVariant
(variant)
scripts/theme-loader.js:112
↓ 1 callers
Method
parseData
(data: Uint8Array, textureWidth: number, textureHeight: number)
src/renderer/GameFont.ts:40
↓ 1 callers
Function
patchLanguage
(data: Record<string, string>)
src/util/Lang.ts:101
↓ 1 callers
Method
pause
* Pauses the game ticker. * @internal Use {@link pauseGame} instead
src/game/GameTicker.ts:55
↓ 1 callers
Function
pauseGame
()
src/game/Game.ts:52
↓ 1 callers
Method
peek
* Get the value at the front of the queue. * @returns The value at the front of the queue.
src/util/PriorityQueue.ts:34
↓ 1 callers
Method
post
* Sends a POST request to the given URL with the given parameters. * @param url URL to send the request to * @param params body parameters to send
src/network/api/Endpoint.ts:157
↓ 1 callers
Method
preprocessMap
* Preprocesses the map into areas.
src/map/area/AreaCalculator.ts:15
↓ 1 callers
Function
processCssFiles
(files)
scripts/WebpackUIModuleLoader.js:47
↓ 1 callers
Function
quitGame
()
src/game/Game.ts:68
↓ 1 callers
Method
randomizeSpawnPoints
()
src/game/player/PlayerManager.ts:32
↓ 1 callers
Function
readDebugDataEntry
* Reads a debug data entry from a reader. * @param reader The reader to read from * @returns The read data * @throws Error if not enough data is av
src/util/DebugData.ts:120
↓ 1 callers
Method
recalculateFrom
* Recalculate the name depth map from a specific tile. * Name depth refers to the maximum size a square can be with the bottom-right corner at the t
src/renderer/manager/PlayerNameRenderingManager.ts:93
↓ 1 callers
Method
registerBoolean
(key: K & Exclude<K, keyof T>, defaultValue: boolean, category: SettingCategory | null, version: number = 0)
src/util/settings/SettingRegistry.ts:58
↓ 1 callers
Function
registerBotConstraint
(closure: (constraints: BotConstraints[], player: BotPlayer) => void, priority: number = 0)
src/game/bot/BotPlayer.ts:66
↓ 1 callers
Function
registerBotTrigger
(closure: (triggers: BotTrigger[], player: BotPlayer) => void, priority: number = 0)
src/game/bot/BotPlayer.ts:56
↓ 1 callers
Function
registerGameMode
(id: GameModeIds, gameMode: GameMode)
src/game/mode/GameModeRegistry.ts:30
↓ 1 callers
Function
registerHoverListener
(element: HTMLElement | string, handler: (x: number, y: number) => void)
src/ui/UIEventResolver.ts:127
↓ 1 callers
Function
registerMultiTouchListener
(element: HTMLElement | string, handler: (oldX: number, oldY: number, newX: number, newY: number, factor: numb
src/ui/UIEventResolver.ts:117
↓ 1 callers
Function
registerScrollListener
(element: HTMLElement | string, handler: (x: number, y: number, delta: number) => void)
src/ui/UIEventResolver.ts:107
↓ 1 callers
Method
registerString
(key: K & Exclude<K, keyof T>, defaultValue: string, category: SettingCategory | null, version: number = 0)
src/util/settings/SettingRegistry.ts:46
↓ 1 callers
Function
removeInteractionListeners
(element: string)
src/ui/UIEventResolver.ts:211
↓ 1 callers
Method
reset
(players: Player[])
src/renderer/manager/PlayerNameRenderingManager.ts:15
↓ 1 callers
Method
reset
* Resets current active listener. * Some events require to keep track of the current listener, since their events are not fired at the same position
src/event/PrioritizedEventHandlerRegistry.ts:35
↓ 1 callers
Function
resetGameData
()
src/game/GameData.ts:28
↓ 1 callers
Function
resolveInteraction
(element: HTMLElement | null, type: T, keys: Set<string> | undefined)
src/ui/UIEventResolver.ts:29
↓ 1 callers
Method
resume
* Resumes a paused game ticker. * @internal Use {@link resumeGame} instead
src/game/GameTicker.ts:64
↓ 1 callers
Function
searchTests
(path: string)
test/run.ts:5
↓ 1 callers
Function
setDefaultKeyboardListener
* Sets the default keyboard listener for an element. * This listener will allow registering per-key listeners. * @param resolved The element to set
src/ui/UIEventResolver.ts:165
↓ 1 callers
Function
setLanguage
(code: string, data: Record<string, string>)
src/util/Lang.ts:87
↓ 1 callers
Method
setPower
* Set the power to attack with * @param power The power to attack with
src/game/action/MapActionHandler.ts:38
↓ 1 callers
Method
setTileId
* Manipulates the tile at the given index. * * This method should only be called by map loaders / generators. * @param index The index of the ti
src/map/GameMap.ts:52
↓ 1 callers
Method
setValue
* Sets the value of the select element. * @param value The value to set
src/ui/type/SingleSelectElement.ts:36
↓ 1 callers
Method
setup
(context: GameGLContext)
src/renderer/layer/MapRenderer.ts:25
↓ 1 callers
Function
showMultiSelectPanel
(setting: MultiSelectSetting<unknown, Record<string, Option<unknown>>>)
src/ui/element/SettingsPanel.ts:109
↓ 1 callers
Method
showTooltip
* Adds a tooltip to the container. * @param text The text of the tooltip * @param type The type of the tooltip
src/ui/type/TooltipContainer.ts:12
↓ 1 callers
Method
siftDown
* Sift down a node in the heap. * @param node The node to sift down. * @private
src/util/PriorityQueue.ts:103
↓ 1 callers
Function
skipBrackets
(expression, offset)
scripts/theme-loader.js:264
↓ 1 callers
Function
smoothPath
* Smooths the path by removing unnecessary points. * @param path The path to smooth * @returns The smoothed path
src/map/area/BoatPathfinding.ts:304
↓ 1 callers
Method
start
* Starts and resets the game ticker. * Do not call this to implement a pause behavior. * @internal Use {@link actuallyStartGame} instead
src/game/GameTicker.ts:30
↓ 1 callers
Method
startBlendNatural
* Default blending settings used for layering. * This guarantees the following: * - colors are mixed as expected (higher alpha => stronger tone)
src/renderer/GameGLContext.ts:324
↓ 1 callers
Method
startDrag
(this: void)
src/event/InteractionManager.ts:112
↓ 1 callers
Function
startGame
(map: GameMap, mode: GameMode, seed: number, players: { name: string }[], clientId: number, isLocal: boolean)
src/game/Game.ts:26
↓ 1 callers
Method
stop
* Stops the game ticker. * Do not call this to implement a pause behavior. * @internal Use {@link quitGame} instead
src/game/GameTicker.ts:45
↓ 1 callers
Method
stopBlend
* Draw without blending.
src/renderer/GameGLContext.ts:302
↓ 1 callers
Method
switchContext
* Changes rendering context, allows relevant layers to be added. * Note: Choose large unique ids for third party contexts to avoid conflicts. * @i
src/renderer/GameRenderer.ts:41
↓ 1 callers
Function
timedPromise
(timeout: number, executor: (resolve: (value: T) => void, reject: (reason?: unknown) => void) => void)
src/util/TimedPromise.ts:5
↓ 1 callers
Method
transitionTiles
* Checks for updated borders when claiming tiles. * @param tiles The tiles that were claimed. * @param attacker The player that claimed the tiles.
src/game/BorderManager.ts:25
↓ 1 callers
Method
trigger
* @returns Whether to trigger a bot action
src/game/bot/BotPlayer.ts:84
↓ 1 callers
Function
triggerDebugEvent
(name: string, id: string, ...data: DebugDataEntry[])
src/util/DebugData.ts:14
↓ 1 callers
Function
tryFetchUserToken
* @internal
src/network/NetworkAuthenticator.ts:89
↓ 1 callers
Method
unregisterBoat
* Removes a boat from the boat manager. * @param boat The boat to remove.
src/game/boat/BoatManager.ts:90
↓ 1 callers
Method
updateLayers
* Updates the layers to be rendered by the debug renderer. * @param layers layers to be rendered
src/renderer/layer/debug/DebugRenderer.ts:24
↓ 1 callers
Function
updatePanel
(...content: UIElement[])
src/ui/type/UIPanel.ts:114
↓ 1 callers
Method
updateTheme
(theme: GameTheme)
src/renderer/layer/BackgroundLayer.ts:21
↓ 1 callers
Function
useAuthentication
(callback: (options: RequestInit, requested: boolean) => Promise<RequestInit>)
src/network/api/Endpoint.ts:172
↓ 1 callers
Method
validatePosition
* Check if the current position is still valid and adjust if necessary.
src/renderer/manager/PlayerNameRenderingManager.ts:173
↓ 1 callers
Method
withLightness
* @param l The lightness value to set. * @returns A new color with the lightness value set.
src/util/HSLColor.ts:54
↓ 1 callers
Function
writeDebugDataEntry
* Writes a debug data entry to a writer. * @param data The data to write * @param writer The writer to write to
src/util/DebugData.ts:52
Method
[Symbol.iterator]
()
src/util/PriorityList.ts:53
Method
add
* Adds an element to the array. * Duplicate priorities will appear in the reverse order they were added. * @param element The element to add * @
src/util/PriorityList.ts:14
Method
addAuth
(conf: RequestInit)
src/network/NetworkAuthenticator.ts:53
Function
addBodyClass
* Adds a class to this UI element. * @param classes The classes * @returns This UI element
src/ui/UIElement.ts:127
Function
addExecutor
* Add an executor to the transaction. * @param executors The executors to add
src/game/transaction/Transaction.ts:17
Method
addTile
(tile: number)
src/game/player/ClientPlayer.ts:16
Method
addTile
(tile: number)
src/game/bot/BotPlayer.ts:27
Method
addTile
* Add a tile to the territory update queue. * @param tile index of the tile
src/game/transaction/TerritoryTransaction.ts:33
Method
allowAttack
()
src/game/bot/modifier/BotConstraints.ts:23
Function
apply
* Apply the transaction to the game.
src/game/transaction/Transaction.ts:24
Method
apply
(compiler)
scripts/WebpackUIModuleLoader.js:7
Method
apply
(compiler)
scripts/SourceMapFixer.js:4
Function
applyUpdaters
* Applies all available updaters to a setting. * @param value The value to update * @param oldVer The version of the value prior to the update *
src/util/settings/Setting.ts:129
Method
attach
* Attaches the given child element to this element. * This aligns the child element to the given attachment relative to this element. * Note that
src/ui/type/ContentField.ts:44
Method
attackAction
* Action starting an attack against the clicked player, if the player can't be reached, a boat is sent instead
src/game/action/MapActionHandler.ts:67
Method
blendWithBuffer
* Blend the color with a buffer. * The alpha channel is used for blending and not modified. * @param buffer The buffer to blend with. * @param o
src/util/RGBColor.ts:45
Method
broadcast
* Broadcasts an event to all registered listeners. * @param args The arguments to pass to the listeners. * @internal Only call this method if you
src/event/ManagedEventHandlerRegistry.ts:36
Method
broadcast
* Broadcast an event to all listeners. * The event will be cached and sent to future listeners. * @param args The arguments to broadcast * @inte
src/event/CachedEventHandlerRegistry.ts:12
Function
buildMainHeader
(text: string, ...classes: string[])
src/ui/type/TextNode.ts:33
Function
buildParagraph
(text: string, ...classes: string[])
src/ui/type/TextNode.ts:72
← previous
next →
301–400 of 628, ranked by callers