Skip to content

Commit

Permalink
doc: document restrictions for BindButtonEvent (MovingBlocks#5079)
Browse files Browse the repository at this point in the history
While working on Terasology/FlexiblePathfinding#8 we noticed that there seem to be issues with sending events extending from BindButtonEvent programmatically (without the physical button press).

To avoid any future confusion (or at least find the issue sooner) I'm adding a brief docstring to the class stating it's intended use and that one should NOT use it directly.
  • Loading branch information
skaldarnar authored Nov 26, 2022
1 parent df98a45 commit f95b815
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 The Terasology Foundation
// Copyright 2022 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.engine.input;
Expand All @@ -7,6 +7,15 @@
import org.terasology.engine.input.events.ButtonEvent;
import org.terasology.input.ButtonState;

/**
* An event triggered by auto-registered (physical) buttons when they are pressed.
* <p>
* To be used in combination with {@link RegisterBindButton} and {@link DefaultBinding}.
* <p>
* Classes extending this usually follow the naming pattern {@code &#60;Name&#62;Button}.
* <p>
* <b>NOTE:</b> DO NOT USE DIRECTLY!
*/
public class BindButtonEvent extends ButtonEvent {

private SimpleUri id;
Expand Down

0 comments on commit f95b815

Please sign in to comment.