- Timestamp:
- 01/10/14 17:18:08 (10 years ago)
- Location:
- trunk/src/org/expeditee/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/FrameMouseActions.java
r676 r681 870 870 871 871 } 872 Help.updateStatus(); 872 873 } 873 874 … … 1182 1183 } 1183 1184 SessionStats.MovedItems(FreeItems.getInstance()); 1185 1186 Help.updateStatus(); 1184 1187 } 1185 1188 … … 1587 1590 getInstance().refreshHighlights(); 1588 1591 SessionStats.CopiedItems(copies); 1592 Help.updateStatus(); 1589 1593 updateCursor(); 1590 1594 FrameGraphics.Repaint(); -
trunk/src/org/expeditee/gui/Help.java
r680 r681 4 4 5 5 import org.expeditee.items.Item; 6 import org.expeditee.items.Line; 6 7 import org.expeditee.settings.experimental.ExperimentalFeatures; 7 8 … … 17 18 18 19 // modifiers 19 public static final int none = 0, control = 1, shift = 2, drag = 4 , hold = 8;20 public static final int none = 0, control = 1, shift = 2, drag = 4; 20 21 private static final String[] modifiers = { "", "^", "+", "^+", "d", "d^", "d+", "d^+" }; 21 22 22 23 // other 23 public static final int panning = 1, action = 2 ;24 public static final int panning = 1, action = 2, line = 4, cursor = 8; 24 25 25 26 // separator between command and description … … 105 106 106 107 // help text 107 private static final String[/* contexts */][/* buttons */][/* modifiers */][/* other */] statusText = new String[2][8][8][ 4];108 private static final String[/* contexts */][/* buttons */][/* modifiers */][/* other */] statusText = new String[2][8][8][16]; 108 109 static { 109 110 fill(statusText[background][left], "Go back"); … … 111 112 fill(statusText[background][left], drag, null); // no action for dragging unless shift down 112 113 fill(statusText[background][left], shift | drag, panning, "Drag to pan"); 114 fill(statusText[background][left], drag, cursor, null); 115 113 116 fill(statusText[background][middle], "Create arrow"); 117 fill(statusText[background][middle], 0, cursor, "Place item(s)", true, false, true, false); 114 118 fill(statusText[background][middle], drag, null); // no action for dragging 119 115 120 fill(statusText[background][right], "Create rectangle"); 121 fill(statusText[background][right], 0, cursor, "Stamp item(s)", true, false, true, false); 116 122 fill(statusText[background][right], drag, null); // no action for dragging 123 117 124 fill(statusText[background][left | middle], null); // no action for left + middle 125 118 126 fill(statusText[background][left | right], "Auto format"); 127 119 128 fill(statusText[background][middle | right], "Undo"); 129 fill(statusText[background][middle | right], 0, cursor, "Delete", true, false, true, false); 120 130 131 121 132 fill(statusText[item][left], "Follow link"); 122 133 fill(statusText[item][left], control, action, "Run action", true, false, false, false); 123 134 fill(statusText[item][left], drag, null); // no action for dragging 135 124 136 fill(statusText[item][middle], "Pickup"); 137 fill(statusText[item][middle], shift, "Create arrow"); 138 fill(statusText[item][middle], 0, cursor, "Place item(s)", true, false, true, false); 125 139 fill(statusText[item][middle], drag, null); // no action for dragging 140 126 141 fill(statusText[item][right], "Copy"); 127 fill(statusText[item][right], drag, null); // no action for dragging 142 fill(statusText[item][right], shift, "Create rectangle"); 143 fill(statusText[item][right], 0, cursor, "Stamp item(s)", true, false, true, false); 144 fill(statusText[item][right], drag, null); // no action for dragging unless currentItem is a line 145 fill(statusText[item][right], drag, line, "Extrude shape"); 146 128 147 fill(statusText[item][left | middle], null); // no action for left + middle 148 129 149 fill(statusText[item][left | right], "Extract attributes"); 150 fill(statusText[item][left | right], 0, cursor, null, true, false, true, false); 151 130 152 fill(statusText[item][middle | right], "Delete"); 131 153 } … … 141 163 public static void updateStatus() { 142 164 Item current = FrameUtils.getCurrentItem(); 143 int context = current != null ? item : 0;165 int context = current != null || FrameUtils.getCurrentItems() != null ? item : background; 144 166 int mod = (FrameMouseActions.isControlDown() ? control : 0) | (FrameMouseActions.isShiftDown() ? shift : 0); 145 int other = (ExperimentalFeatures.MousePan.get() ? panning : 0) | (current != null ? current.hasAction() ? action : 0: 0);167 int other = (ExperimentalFeatures.MousePan.get() ? panning : 0) | (current != null && current.hasAction() ? action : 0) | (current instanceof Line ? line : 0) | (FreeItems.itemsAttachedToCursor() ? cursor : 0); 146 168 String status = ""; 147 169 … … 164 186 if(dl != null || dm != null || dr != null) status += "\n"; 165 187 if(dl != null) status += command(mod | drag, left) + dl + padding.substring(dl.length()); 166 if(dm != null) status += command(mod | drag, left) + dm + padding.substring(dm.length());167 if(dr != null) status += command(mod | drag, left) + dr + padding.substring(dr.length());188 if(dm != null) status += command(mod | drag, middle) + dm + padding.substring(dm.length()); 189 if(dr != null) status += command(mod | drag, right) + dr + padding.substring(dr.length()); 168 190 169 191 MessageBay.setStatus(status);
Note:
See TracChangeset
for help on using the changeset viewer.