MCPcopy Create free account
hub / github.com/Card-Forge/forge / trigger

Method trigger

forge-gui-mobile/src/forge/toolbox/FButton.java:241–259  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239 }
240
241 public boolean trigger() {
242 if (isEnabled() && command != null) {
243 FEvent fEvent = new FEvent(this, FEventType.TAP);
244 if (Forge.hasGamepad()) {
245 press(0, 0);
246 Timer.schedule(new Timer.Task() {
247 @Override
248 public void run() {
249 command.handleEvent(fEvent);
250 release(0,0);
251 }
252 }, 0.10f);
253 return true;
254 }
255 command.handleEvent(fEvent);
256 return true;
257 }
258 return false;
259 }
260
261 @Override
262 public void draw(Graphics g) {

Callers 1

keyDownMethod · 0.95

Calls 4

hasGamepadMethod · 0.95
pressMethod · 0.95
isEnabledMethod · 0.65
handleEventMethod · 0.65

Tested by

no test coverage detected