pub struct EngineWrapper(_);
Expand description

A Wrapper around an Engine

Implementations§

Create the Engine and the Wrapper

Create the Engine and the Wrapper

This will first create the game instance, then run the main loop of the game

The core of your program, This takes an already existing implementation of a Game G

Methods from Deref<Target = Engine>§

Return the current Target size in pixel

Return the pixel scale factor

Get The status of a key

Get the status of a Mouse Button

Get the mouse location (in pixel) on the screen Will be defaulted to (0,0) at the start of the program

Get the scroll wheel direction (If Any) during the frame

Get all Keys pressed during the last frame

Get all the keys that were held during the last frame

Get all the keys that were released during the last frame

Create a GPU version of Sprite

Will clear the input buffer and set the cursor to 0

Set the input buffer to the desired value and put the input cursor at the end of the text

Warning

The value must be an ascii string

Insert the given string into the input buffer at the input cursor

Warning

if the string is not only ASCII characters it will silently do nothing

Append the given string onto the input buffer

Warning

if the string is not only ASCII characters it will silently do nothing

Add keys onto the input pass through list

Remove keys onto the input pass through list

Set the input to the iterator

If set to true, any key that is passed through when in input mode won’t have the char appended to the input buffer

Return a view into the input buffer

Return the input cursor

Switch to text input mode, return true if it wasn’t in this mode before

This will clear the input buffer, reset the input cursor and stop the input mode

Is the engine in input mode

Stop the input mode right there, and return a &str to the current buffer. This is if you need to leave the mode but retain the input buffer for a later re-entry

Trait Implementations§

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.