Update readme
This commit is contained in:
parent
bb25b600eb
commit
f7a68b6bc6
23
README.md
23
README.md
@ -28,6 +28,29 @@ LIB_INTERFACE(IInputMouseSubscriber,
|
||||
#include <...>
|
||||
```
|
||||
|
||||
#### Usage Runtime Binding and Modern C++
|
||||
```
|
||||
// My language binding
|
||||
IInputMouseSubscriberFunctional test;
|
||||
test.onButtonPress = [](AuUInt8 btn)
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
AuSPtr<IInputMouseSubscriber> handle = AuUnsafeRaiiToShared(&test);
|
||||
// use handle with an Aurora API
|
||||
```
|
||||
|
||||
#### Usage Native
|
||||
```
|
||||
struct MyEventHandler : public IInputMouseSubscriber
|
||||
{
|
||||
void onButtonPress(AuUInt8 mb) override;
|
||||
void onButtonTick(AuUInt8 mb) override;
|
||||
void onButtonUp(AuUInt8 mb) override;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
##### Not recommended for small projects and/or people with a shred of sanity left
|
||||
##### Possibly useful for API developers
|
Loading…
Reference in New Issue
Block a user