Skip to content

Commit

Permalink
updated readme (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Husenap authored Oct 10, 2020
1 parent 06fe391 commit 83106c4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ int main() {
Window window;

{
auto token = window.Subscribe<ResizeEvent>([](const ResizeEvent& e) {
std::cout << "Window Resized: (" << e.width << ", " << e.height
<< ")" << std::endl;
});
auto token =
window.RegisterListener<ResizeEvent>([](const ResizeEvent& e) {
std::cout << "Window Resized: (" << e.width << ", " << e.height
<< ")" << std::endl;
});

window.Update(); // This call will trigger the callback
}
Expand Down

0 comments on commit 83106c4

Please sign in to comment.