forked from rvandoosselaer/Blocks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rvandoosselaer#15 from rvandoosselaer/feature-page…
…rlistener add a listener that gets triggered when a page is attached, detached and updated.
- Loading branch information
Showing
3 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/com/rvandoosselaer/blocks/PagerListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.rvandoosselaer.blocks; | ||
|
||
import com.simsilica.mathd.Vec3i; | ||
|
||
/** | ||
* A listener that can be registered to the {@link Pager}. Use this to get notified when pages are attached, detached | ||
* or updated. | ||
* | ||
* @author: rvandoosselaer | ||
*/ | ||
public interface PagerListener<T> { | ||
|
||
void onPageDetached(Vec3i location, T page); | ||
|
||
void onPageAttached(Vec3i location, T page); | ||
|
||
void onPageUpdated(Vec3i location, T oldPage, T newPage); | ||
|
||
} |