Changeset 1220 for trunk/src/org/expeditee/gui
- Timestamp:
- 01/30/19 13:04:22 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/FrameUtils.java
r1200 r1220 40 40 import java.util.zip.ZipEntry; 41 41 42 import org.expeditee.auth.gui.MailBay; 42 43 import org.expeditee.core.Colour; 43 44 import org.expeditee.core.Point; … … 1209 1210 * @return The Item at the given coordinates, or NULL if none is found. 1210 1211 */ 1211 public static Item onItem(Frame toCheck, float floatX, float floatY, boolean bResetLastEdited) 1212 { 1212 public static Item onItem(Frame toCheck, float floatX, float floatY, boolean bResetLastEdited) { 1213 1213 // System.out.println("MouseX: " + floatX + " MouseY: " + floatY); 1214 1214 int x = Math.round(floatX); … … 1222 1222 // if the mouse is in the message area 1223 1223 if (y >= DisplayController.getMessageBayPaintArea().getMinY()) { 1224 // check the individual message items 1225 for (Item message : MessageBay.getMessages()) { 1224 // check the individual bay items (MessageBay + MailBay) 1225 List<Item> bayItems = new LinkedList<Item>(); 1226 if (DisplayController.isMailMode()) { 1227 bayItems.addAll(MailBay.getPreviewMessages()); 1228 } else { 1229 bayItems.addAll(MessageBay.getMessages()); 1230 } 1231 for (Item message : bayItems) { 1226 1232 if (message != null) { 1227 1233 if (message.contains(new Point(x, y))) { … … 1237 1243 } 1238 1244 1239 // check the link to the message frame 1240 if (MessageBay.getMessageLink() != null) { 1241 if (MessageBay.getMessageLink().contains(new Point(x, y))) { 1242 MessageBay.getMessageLink().setOverlayPermission(UserAppliedPermission.copy); 1243 possibles.add(MessageBay.getMessageLink()); 1244 } 1245 // check the link to the message/mail frame 1246 Item linkItem = DisplayController.isMailMode() ? MailBay.getMailLink() : MessageBay.getMessageLink(); 1247 if (linkItem != null && linkItem.contains(new Point(x, y))) { 1248 linkItem.setOverlayPermission(UserAppliedPermission.copy); 1249 possibles.add(linkItem); 1245 1250 } 1246 1251 … … 1287 1292 } 1288 1293 } 1289 }1290 1291 if (i.getData() != null && !i.getData().isEmpty() && i.getText().isEmpty()) {1292 System.err.println();1293 1294 } 1294 1295
Note:
See TracChangeset
for help on using the changeset viewer.