mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Update documentation of creating Music and Cursor
This commit is contained in:
parent
571eee359f
commit
37ac80dbe5
@ -29,9 +29,7 @@
|
||||
/// sf::Text text(font, "Hello SFML", 50);
|
||||
///
|
||||
/// // Load a music to play
|
||||
/// sf::Music music;
|
||||
/// if (!music.openFromFile("nice_music.ogg"))
|
||||
/// return EXIT_FAILURE;
|
||||
/// auto music = sf::Music::openFromFile("nice_music.ogg").value();
|
||||
///
|
||||
/// // Play the music
|
||||
/// music.play();
|
||||
|
@ -299,14 +299,8 @@ private:
|
||||
///
|
||||
/// Usage example:
|
||||
/// \code
|
||||
/// // Declare a new music
|
||||
/// sf::Music music;
|
||||
///
|
||||
/// // Open it from an audio file
|
||||
/// if (!music.openFromFile("music.ogg"))
|
||||
/// {
|
||||
/// // error...
|
||||
/// }
|
||||
/// // Open a music from an audio file
|
||||
/// auto music = sf::Music::openFromFile("music.ogg").value();
|
||||
///
|
||||
/// // Change some parameters
|
||||
/// music.setPosition(0, 1, 10); // change its 3D position
|
||||
|
@ -245,8 +245,7 @@ private:
|
||||
///
|
||||
/// // ... create window as usual ...
|
||||
///
|
||||
/// sf::Cursor cursor;
|
||||
/// if (cursor.loadFromSystem(sf::Cursor::Type::Hand))
|
||||
/// const auto cursor = sf::Cursor::loadFromSystem(sf::Cursor::Type::Hand).value();
|
||||
/// window.setMouseCursor(cursor);
|
||||
/// \endcode
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user