Skip to content

rc_client_get_leaderboard_info

Jamiras edited this page Sep 16, 2023 · 3 revisions

Get information about a leaderboard.

Syntax

const rc_client_leaderboard_t* rc_client_get_leaderboard_info(
    rc_client_t* client,
    uint32_t id
);

Parameters

client

The rc_client_t containing a loaded game.

id

The unique identifier of the leaderboard to retrieve information about.

Return value

A pointer to the leaderboard information, or NULL if not found.


rc_client_leaderboard_t

typedef struct rc_client_leaderboard_t {
  const char* title;
  const char* description;
  const char* tracker_value;
  uint32_t id;
  uint8_t state;
  uint8_t format;
  uint8_t lower_is_better;
} rc_client_leaderboard_t;

title

The title of the leaderboard.

description

A short summary of what the leaderboard measures.

tracker_value

The current value of the leaderboard formatted for display.

id

The unique identifier of the leaderboard.

state

The current state of the leaderboard.

state description
RC_CLIENT_LEADERBOARD_STATE_INACTIVE The leaderboard hasn't been processed yet.
RC_CLIENT_LEADERBOARD_STATE_ACTIVE The leaderboard is eligible to start.
RC_CLIENT_LEADERBOARD_STATE_TRACKING An attempt is in progress for the leaderboard.
RC_CLIENT_LEADERBOARD_STATE_DISABLED The leaderboard is not supported by this version of the runtime, or references a memory address that failed to be read.

format

The general format of the leaderboard values. Can be used by the client to add a label or header to a leaderboard value.

format description
RC_CLIENT_LEADERBOARD_FORMAT_TIME Values in the leaderboard represent an elapsed amount of time
RC_CLIENT_LEADERBOARD_FORMAT_SCORE Values in the leaderboard are zero-padded scores
RC_CLIENT_LEADERBOARD_FORMAT_VALUE Values in the leaderboard are generic numbers that could represent counts or money or something else

lower_is_better

Indicates whether lower scores/times are better.

Remarks

Minimum version: 11.0.0

See also

rc_client_get_leaderboard_info

rc_client_get_game_info

rcheevos

rc_client

Integration guide

client

user

game

processing

rc_client_raintegration

Integration guide

rc_runtime

rhash

rapi

common

user

runtime

info

Clone this wiki locally