-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes issue #23 whereby left clicks were ignored on goto mode #51
Changes from all commits
8df52ce
1cd742f
5812b8d
810e3e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1570,6 +1570,17 @@ public void clearGotoPath() {} | |
*/ | ||
public void performGoto(Tile tile) {} | ||
|
||
/** | ||
* Check if the user has GoTo mode enabled. | ||
* | ||
* Called from {@link CanvasMouseListener}. | ||
* | ||
* @return True if the user has toggled GoTo mode. | ||
*/ | ||
public boolean isGotoStarted() { | ||
return false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit confused by this code block. The comment says it will return true if the user has toggled GoTo mode, but this method returns false. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its the base class, since it required a method body I thought it would be reasonable to default it to false. Check SwingGUI.java for the override. Actually speaking of, let me patch it with an Override annotation |
||
} | ||
|
||
/** | ||
* Perform an immediate goto to a point on the map. | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method only returns false? So this would never evaluate to true, or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The base class returns false, however the subclass SwingGUI checks the canvas if Goto is enabled and returns true if it is. SwingGUI is the object type that is evaluated at runtime when it performs that check in the mouse event