File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -369,11 +369,32 @@ public void SetTexture(Texture_t texture)
369369 AssertNoError ( OpenVR . Overlay . SetOverlayTexture ( overlayHandle , ref texture ) ) ;
370370 }
371371
372+ /// <summary>
373+ /// Loads the specified file and sets that texture as the contents
374+ /// of the overlay's thumbnail. Textures can be up to 1920x1080 in size.
375+ /// PNG, JPG, and TGA files are supported in 24 or 32 bits.
376+ /// </summary>
377+ ///
378+ /// <param name="path">
379+ /// Path to the file. If a relative path is provided it is assumed
380+ /// to be relative to the resource directory in the OpenVR runtime.
381+ /// </param>
372382 public void SetThumbnailTextureFromFile ( string path )
373383 {
384+ // TODO: these IsDashboardOverlay checks should probably error, not silently return
385+ if ( ! IsDashboardOverlay ) return ;
374386 AssertNoError ( OpenVR . Overlay . SetOverlayFromFile ( thumbnailHandle , path ) ) ;
375- }
376-
387+ }
388+
389+ /// <summary>
390+ /// Sets an existing application-created graphics resource as the
391+ /// texture for the overlay's thumbnail. The type of the pTexture depends on
392+ /// the eTextureType parameter.
393+ /// </summary>
394+ ///
395+ /// <param name="texture">
396+ /// <see cref="Texture_t"/> struct describing the texture
397+ /// </param>
377398 public void SetThumbnailTexture ( Texture_t texture )
378399 {
379400 if ( ! IsDashboardOverlay ) return ;
You can’t perform that action at this time.
0 commit comments