C# Class OpenBve.Host

Represents the host application.
Inheritance: OpenBveApi.Hosts.HostInterface
Afficher le fichier Open project: leezer3/OpenBVE Class Usage Examples

Méthodes publiques

Méthode Description
LoadSound ( string path, OpenBveApi &sound ) : bool

Loads a sound and returns the sound data.

LoadTexture ( string path, OpenBveApi parameters, OpenBveApi &texture ) : bool

Loads a texture and returns the texture data.

QueryTextureDimensions ( string path, int &width, int &height ) : bool

Queries the dimensions of a texture.

RegisterSound ( OpenBveApi sound, OpenBveApi &handle ) : bool

Registers a sound and returns a handle to the sound.

RegisterSound ( string path, OpenBveApi &handle ) : bool

Registers a sound and returns a handle to the sound.

RegisterTexture ( OpenBveApi texture, OpenBveApi parameters, OpenBveApi &handle ) : bool

Registers a texture and returns a handle to the texture.

RegisterTexture ( string path, OpenBveApi parameters, OpenBveApi &handle ) : bool

Registers a texture and returns a handle to the texture.

ReportProblem ( OpenBveApi type, string text ) : void

Reports a problem to the host application.

Method Details

LoadSound() public méthode

Loads a sound and returns the sound data.
public LoadSound ( string path, OpenBveApi &sound ) : bool
path string The path to the file or folder that contains the sound.
sound OpenBveApi Receives the sound.
Résultat bool

LoadTexture() public méthode

Loads a texture and returns the texture data.
public LoadTexture ( string path, OpenBveApi parameters, OpenBveApi &texture ) : bool
path string The path to the file or folder that contains the texture.
parameters OpenBveApi The parameters that specify how to process the texture.
texture OpenBveApi Receives the texture.
Résultat bool

QueryTextureDimensions() public méthode

Queries the dimensions of a texture.
public QueryTextureDimensions ( string path, int &width, int &height ) : bool
path string The path to the file or folder that contains the texture.
width int Receives the width of the texture.
height int Receives the height of the texture.
Résultat bool

RegisterSound() public méthode

Registers a sound and returns a handle to the sound.
public RegisterSound ( OpenBveApi sound, OpenBveApi &handle ) : bool
sound OpenBveApi The sound data.
handle OpenBveApi Receives a handle to the sound.
Résultat bool

RegisterSound() public méthode

Registers a sound and returns a handle to the sound.
public RegisterSound ( string path, OpenBveApi &handle ) : bool
path string The path to the file or folder that contains the sound.
handle OpenBveApi Receives a handle to the sound.
Résultat bool

RegisterTexture() public méthode

Registers a texture and returns a handle to the texture.
public RegisterTexture ( OpenBveApi texture, OpenBveApi parameters, OpenBveApi &handle ) : bool
texture OpenBveApi The texture data.
parameters OpenBveApi The parameters that specify how to process the texture.
handle OpenBveApi Receives the handle to the texture.
Résultat bool

RegisterTexture() public méthode

Registers a texture and returns a handle to the texture.
public RegisterTexture ( string path, OpenBveApi parameters, OpenBveApi &handle ) : bool
path string The path to the file or folder that contains the texture.
parameters OpenBveApi The parameters that specify how to process the texture.
handle OpenBveApi Receives the handle to the texture.
Résultat bool

ReportProblem() public méthode

Reports a problem to the host application.
public ReportProblem ( OpenBveApi type, string text ) : void
type OpenBveApi The type of problem that is reported.
text string The textual message that describes the problem.
Résultat void