Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export declare function init(appId?: number | undefined | null): void
export declare function restartAppIfNecessary(appId: number): boolean
export declare function runCallbacks(): void
export declare function isOverlayEnabled(): boolean
export interface PlayerSteamId {
steamId64: bigint
steamId32: string
Expand Down Expand Up @@ -336,6 +337,7 @@ export declare namespace workshop {
* @returns an array of subscribed workshop item ids
*/
export function getSubscribedItems(): Array<bigint>
export function deleteItem(itemId: bigint): Promise<void>
export const enum UGCQueryType {
RankedByVote = 0,
RankedByPublicationDate = 1,
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export function init(appId?: number): Omit<Client, "init" | "runCallbacks">;
export function restartAppIfNecessary(appId: number): boolean;
export function electronEnableSteamOverlay(disableEachFrameInvalidation?: boolean): void;
export function isOverlayEnabled(): boolean;
export type Client = typeof import("./client.d");
export const SteamCallback: typeof import("./client.d").callback.SteamCallback;
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,7 @@ module.exports.electronEnableSteamOverlay = (disableEachFrameInvalidation) => {
}
}

module.exports.isOverlayEnabled = nativeBinding.isOverlayEnabled;

const SteamCallback = nativeBinding.callback.SteamCallback
module.exports.SteamCallback = SteamCallback
4 changes: 4 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ pub fn drop_client() {
let mut client_ref = STEAM_CLIENT.lock().unwrap();
*client_ref = None;
}

pub fn is_overlay_enabled() -> bool {
get_client().utils().is_overlay_enabled()
}
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,9 @@ pub fn run_callbacks() {
client::get_client().run_callbacks();
}

#[napi]
pub fn is_overlay_enabled() -> bool {
client::is_overlay_enabled()
}

pub mod api;