/** * Finds the tab that is open. * * @return The open Tab */ public Tab getOpenTab() { Point p = ColorUtil.getPointWithColor(Game.getImage(), BOUNDS, OPEN_COLOR, 1); for (Tab tab : Tabs.Tab.values()) { if (tab.bounds.contains(p)) return tab; } return null; }
/** * Checks if the tab is open. * * @return <tt>true</tt> if tab is open; else <tt>false</tt> */ public boolean isOpen() { return bounds.contains(ColorUtil.getPointWithColor(Game.getImage(), BOUNDS, OPEN_COLOR, 1)); }