Skip to content

Commit 67d7094

Browse files
committed
Adding binaries
1 parent bec45f2 commit 67d7094

122 files changed

Lines changed: 4519 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# steamworks.addEventListener()
2+
3+
> --------------------- ------------------------------------------------------------------------------------------
4+
> __Type__ [Function][api.type.Function]
5+
> __Return value__ [Boolean][api.type.Boolean]
6+
> __Revision__ [REVISION_LABEL](REVISION_URL)
7+
> __Keywords__ steam, steamworks, event, addEventListener
8+
> __See also__ [steamworks.removeEventListener()][plugin.steamworks.removeEventListener]
9+
> [steamworks.*][plugin.steamworks]
10+
> --------------------- ------------------------------------------------------------------------------------------
11+
12+
13+
## Overview
14+
15+
Adds a listener to the plugin's collection of event listeners. When the named event occurs, the listener will be invoked and be supplied with a table representing that event.
16+
17+
Returns `true` if the listener was successfully added to the plugin. Returns `false` if given invalid arguments, such as the listener not being a function or if it's a table that is missing a function matching the event name.
18+
19+
20+
## Syntax
21+
22+
steamworks.addEventListener( eventName, listener )
23+
24+
##### eventName ~^(required)^~
25+
_[String][api.type.String]._ The name of the event to listen for. Must be one of the following:
26+
27+
* `"achievementImageUpdate"` ([reference][plugin.steamworks.event.achievementImageUpdate])
28+
* `"achievementInfoUpdate"` ([reference][plugin.steamworks.event.achievementInfoUpdate])
29+
* `"microtransactionAuthorization"` ([reference][plugin.steamworks.event.microtransactionAuthorization])
30+
* `"overlayStatus"` ([reference][plugin.steamworks.event.overlayStatus])
31+
* `"userInfoUpdate"` ([reference][plugin.steamworks.event.userInfoUpdate])
32+
* `"userProgressSave"` ([reference][plugin.steamworks.event.userProgressSave])
33+
* `"userProgressUnload"` ([reference][plugin.steamworks.event.userProgressUnload])
34+
* `"userProgressUpdate"` ([reference][plugin.steamworks.event.userProgressUpdate])
35+
36+
##### listener ~^(required)^~
37+
_[Listener][api.type.Listener]._ The listener to be invoked when the plugin dispatches an event whose `name` property matches the given `eventName` argument. This argument must be a function or a table object containing a function having the same name as the event.
38+
39+
40+
## Example
41+
42+
``````lua
43+
local steamworks = require( "plugin.steamworks" )
44+
45+
-- Set up a listener to be called when Steam's overlay has been shown/hidden
46+
local function onSteamOverlayStatusChanged( event )
47+
print( "Steam overlay phase: " .. event.phase )
48+
end
49+
steamworks.addEventListener( "overlayStatus", onSteamOverlayStatusChanged )
50+
51+
-- Set up a listener to be called when a Steam user's info has been changed
52+
local function onSteamUserInfoUpdated( event )
53+
print( "Steam user info has changed." )
54+
end
55+
steamworks.addEventListener( "userInfoUpdate", onSteamUserInfoUpdated )
56+
``````

docs/steamworks/appId.markdown

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# steamworks.appId
2+
3+
> --------------------- ------------------------------------------------------------------------------------------
4+
> __Type__ [String][api.type.String]
5+
> __Revision__ [REVISION_LABEL](REVISION_URL)
6+
> __Keywords__ steam, steamworks, appId
7+
> __See also__ [steamworks.*][plugin.steamworks]
8+
> --------------------- ------------------------------------------------------------------------------------------
9+
10+
11+
## Overview
12+
13+
Fetches the unique string ID assigned to the application by Steam.
14+
15+
16+
## Gotchas
17+
18+
This property will be `nil` if a valid `appId` was not set in `config.lua` as documented [here][plugin.steamworks].
19+
20+
21+
## Example
22+
23+
``````lua
24+
local steamworks = require( "plugin.steamworks" )
25+
26+
print( "Steam App ID: " .. tostring(steamworks.appId) )
27+
``````
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# steamworks.appOwnerSteamId
2+
3+
> --------------------- ------------------------------------------------------------------------------------------
4+
> __Type__ [String][api.type.String]
5+
> __Revision__ [REVISION_LABEL](REVISION_URL)
6+
> __Keywords__ steam, steamworks, appOwnerSteamId
7+
> __See also__ [steamworks.userSteamId][plugin.steamworks.userSteamId]
8+
> [steamworks.*][plugin.steamworks]
9+
> --------------------- ------------------------------------------------------------------------------------------
10+
11+
12+
## Overview
13+
14+
The unique string ID of the user that purchased the application. This property will typically match the [steamworks.userSteamId][plugin.steamworks.userSteamId] property unless the purchaser has logged out of the Steam client and has let someone else log in on the same machine.
15+
16+
17+
## Gotchas
18+
19+
This will be `nil` if the [steamworks.isLoggedOn][plugin.steamworks.isLoggedOn] property is `false`, indicating the application is not currently connected to the Steam client.
20+
21+
22+
## Example
23+
24+
``````lua
25+
local steamworks = require( "plugin.steamworks" )
26+
27+
print( "App Owner ID: " .. tostring(steamworks.appOwnerSteamId) )
28+
``````
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# steamworks.canShowOverlay
2+
3+
> --------------------- ------------------------------------------------------------------------------------------
4+
> __Type__ [Boolean][api.type.Boolean]
5+
> __Revision__ [REVISION_LABEL](REVISION_URL)
6+
> __Keywords__ steam, steamworks, canShowOverlay
7+
> __See also__ [steamworks.showGameOverlay()][plugin.steamworks.showGameOverlay]
8+
> [steamworks.showStoreOverlay()][plugin.steamworks.showStoreOverlay]
9+
> [steamworks.showUserOverlay()][plugin.steamworks.showUserOverlay]
10+
> [steamworks.showWebOverlay()][plugin.steamworks.showWebOverlay]
11+
> --------------------- ------------------------------------------------------------------------------------------
12+
13+
14+
## Overview
15+
16+
This will be `true` if Steam overlays can be shown on top of the app. This means that Steam popup notifications can be shown and screen overlays can be shown via this plugin's APIs or by the user pressing the default <nobr>Shift+Tab</nobr> keys.
17+
18+
19+
## Gotchas
20+
21+
This property will be `false` in the following cases:
22+
23+
* A valid `appId` was not set in `config.lua` as documented [here][REFLINK 1].
24+
* The [steamworks.isLoggedOn][plugin.steamworks.isLoggedOn] property is `false`, indicating that the application is not currently connected to the Steam client.
25+
* The Steam client is not currently running.
26+
* User has disabled overlays in the Steam client's <nobr>__In-Game__</nobr> settings screen.
27+
* During the first few seconds of app startup. This is normal behavior since the Steam client needs time to bind to the application process.
28+
* On Mac, the application (such as the Corona&nbsp;Simulator) was not launched from the Steam client, or a required system preference setting is missing. See the [Overlay Troubleshooting][plugin.steamworks.guide.overlays] guide for more details.
29+
30+
<!--- REFERENCE LINK -->
31+
32+
[REFLINK 1]: ../../plugin/steamworks/index.html#project-settings
33+
34+
35+
## Example
36+
37+
``````lua
38+
local steamworks = require( "plugin.steamworks" )
39+
40+
print( "Can Show Steam Overlay: " .. tostring(steamworks.canShowOverlay) )
41+
``````
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# event.achievementName
2+
3+
> --------------------- ------------------------------------------------------------------------------------------
4+
> __Type__ [String][api.type.String]
5+
> __Event__ [achievementImageUpdate][plugin.steamworks.event.achievementImageUpdate]
6+
> __Revision__ [REVISION_LABEL](REVISION_URL)
7+
> __Keywords__ steam, steamworks, achievements, achievementImageUpdate, achievementName
8+
> __See also__ [achievementImageUpdate][plugin.steamworks.event.achievementImageUpdate]
9+
> [steamworks.*][plugin.steamworks]
10+
> --------------------- ------------------------------------------------------------------------------------------
11+
12+
## Overview
13+
14+
On the Steamworks website, this is the unique name of the achievement set under the <nobr>__API Name Progress Stat__</nobr> column.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# event.imageInfo
2+
3+
> --------------------- ------------------------------------------------------------------------------------------
4+
> __Type__ [ImageInfo][plugin.steamworks.type.ImageInfo]
5+
> __Event__ [achievementImageUpdate][plugin.steamworks.event.achievementImageUpdate]
6+
> __Revision__ [REVISION_LABEL](REVISION_URL)
7+
> __Keywords__ steam, steamworks, achievements, achievementImageUpdate, imageInfo
8+
> __See also__ [achievementImageUpdate][plugin.steamworks.event.achievementImageUpdate]
9+
> [steamworks.*][plugin.steamworks]
10+
> --------------------- ------------------------------------------------------------------------------------------
11+
12+
## Overview
13+
14+
Provides information about one achievement image such as its pixel width, pixel height, and its unique handle which is needed to load the image via the [steamworks.newImageRect()][plugin.steamworks.newImageRect] and [steamworks.newTexture()][plugin.steamworks.newTexture] functions.
15+
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# achievementImageUpdate
2+
3+
> --------------------- ------------------------------------------------------------------------------------------
4+
> __Type__ [Event][api.type.event]
5+
> __Revision__ [REVISION_LABEL](REVISION_URL)
6+
> __Keywords__ steam, steamworks, achievements, achievementImageUpdate
7+
> __See also__ [steamworks.addEventListener()][plugin.steamworks.addEventListener]
8+
> [steamworks.*][plugin.steamworks]
9+
> --------------------- ------------------------------------------------------------------------------------------
10+
11+
## Overview
12+
13+
This event occurs when an achievement image has been loaded for the first time, or when the image has changed.
14+
15+
You can receive these events by adding a [listener][api.type.Listener] to the plugin via the [steamworks.addEventListener()][plugin.steamworks.addEventListener] function.
16+
17+
18+
## Gotchas
19+
20+
* If you call the [steamworks.getAchievementImageInfo()][plugin.steamworks.getAchievementImageInfo] function and it returns `nil`, Steam will automatically fetch the achievement image asynchronously&nbsp;&mdash; assuming that it was given a valid achievement&nbsp;name&nbsp;&mdash; and dispatch this event.
21+
22+
* The [steamworks.getAchievementImageInfo()][plugin.steamworks.getAchievementImageInfo] function will typically return `nil` the first time it is called upon application startup, but the Steam client will then cache the requested achievement image and make it immediately available upon subsequent application launches until the Steam client has been exited. That is, exiting the Steam client will clear its cached images, forcing it to <nobr>re-download</nobr> images when restarted.
23+
24+
25+
## Properties
26+
27+
#### [event.achievementName][plugin.steamworks.event.achievementImageUpdate.achievementName]
28+
29+
#### [event.imageInfo][plugin.steamworks.event.achievementImageUpdate.imageInfo]
30+
31+
#### [event.name][plugin.steamworks.event.achievementImageUpdate.name]
32+
33+
#### [event.unlocked][plugin.steamworks.event.achievementImageUpdate.unlocked]
34+
35+
36+
## Example
37+
38+
``````lua
39+
local steamworks = require( "plugin.steamworks" )
40+
41+
-- Called when an achievement image has been changed/loaded
42+
local function onAchievementImageUpdated( event )
43+
-- Fetch information about the achievement
44+
local achievementInfo = steamworks.getAchievementInfo( event.achievementName )
45+
46+
-- Print the achievement's image info to the log
47+
print( "Achievement Image Updated" )
48+
print( " Localized Name: " .. achievementInfo.localizedName )
49+
print( " Is Unlocked Image: " .. tostring(event.unlocked) )
50+
print( " Image Pixel Width: " .. tostring(event.imageInfo.pixelWidth) )
51+
print( " Image Pixel Height: " .. tostring(event.imageInfo.pixelHeight) )
52+
end
53+
54+
-- Set up a listener to be invoked when an achievement image has been changed/loaded
55+
steamworks.addEventListener( "achievementImageUpdate", onAchievementImageUpdated )
56+
``````
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# event.name
2+
3+
> --------------------- ------------------------------------------------------------------------------------------
4+
> __Type__ [String][api.type.String]
5+
> __Event__ [achievementImageUpdate][plugin.steamworks.event.achievementImageUpdate]
6+
> __Revision__ [REVISION_LABEL](REVISION_URL)
7+
> __Keywords__ steam, steamworks, achievements, achievementImageUpdate, name
8+
> __See also__ [achievementImageUpdate][plugin.steamworks.event.achievementImageUpdate]
9+
> [steamworks.*][plugin.steamworks]
10+
> --------------------- ------------------------------------------------------------------------------------------
11+
12+
## Overview
13+
14+
The string value `"achievementImageUpdate"`.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# event.unlocked
2+
3+
> --------------------- ------------------------------------------------------------------------------------------
4+
> __Type__ [Boolean][api.type.Boolean]
5+
> __Event__ [achievementImageUpdate][plugin.steamworks.event.achievementImageUpdate]
6+
> __Revision__ [REVISION_LABEL](REVISION_URL)
7+
> __Keywords__ steam, steamworks, achievements, achievementImageUpdate, unlocked
8+
> __See also__ [achievementImageUpdate][plugin.steamworks.event.achievementImageUpdate]
9+
> [steamworks.*][plugin.steamworks]
10+
> --------------------- ------------------------------------------------------------------------------------------
11+
12+
## Overview
13+
14+
Boolean value of `true` for an unlocked achievement image; `false` for a locked achievement image. Locked achievement images are typically grayscaled.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# event.achievementName
2+
3+
> --------------------- ------------------------------------------------------------------------------------------
4+
> __Type__ [String][api.type.String]
5+
> __Event__ [achievementInfoUpdate][plugin.steamworks.event.achievementInfoUpdate]
6+
> __Revision__ [REVISION_LABEL](REVISION_URL)
7+
> __Keywords__ steam, steamworks, achievements, achievementInfoUpdate, achievementName
8+
> __See also__ [achievementInfoUpdate][plugin.steamworks.event.achievementInfoUpdate]
9+
> [steamworks.*][plugin.steamworks]
10+
> --------------------- ------------------------------------------------------------------------------------------
11+
12+
## Overview
13+
14+
On the Steamworks website, this is the unique name of the achievement set under the <nobr>__API Name Progress Stat__</nobr> column.
15+
16+
This name can be passed to the [steamworks.getAchievementInfo()][plugin.steamworks.getAchievementInfo] function to fetch more information about the achievement and its current unlock status.

0 commit comments

Comments
 (0)