- Timestamp:
- 01/10/14 14:51:04 (10 years ago)
- Location:
- trunk/src/org/expeditee/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/Help.java
r674 r678 17 17 18 18 // modifiers 19 public static final int none = 0, control = 1, shift = 2, drag = 4; 19 public static final int none = 0, control = 1, shift = 2, drag = 4; // TODO: add mod for click+hold ??? 20 20 private static final String[] modifiers = { "", "^", "+", "^+", "d", "d^", "d+", "d^+" }; 21 21 … … 82 82 } 83 83 84 private static final void fill(String[] array, int indexBit, String value, boolean invert) { 85 for(int i = 0; i < array.length; i++) { 86 87 } 88 } 89 84 90 private static final void fill(String[][] array, int[] indices, String value, boolean invert) { 85 91 if(invert) { … … 119 125 fill(statusText[background][left], "Go back"); 120 126 fill(statusText[background][left], new int[] { control, control | shift, shift }, "Go forward", false); 127 fill(statusText[background][left], new int[] { drag, control | drag, shift | drag, control | shift | drag }, null, false); // no action for dragging unless shift down 121 128 fill(statusText[background][left], new int[] { control | shift | drag, shift | drag }, new int[] { panning, panning | action }, "Drag to pan", false, false); 122 129 fill(statusText[background][middle], "Create arrow"); 130 fill(statusText[background][middle], new int[] { drag, control | drag, shift | drag, control | shift | drag }, null, false); // no action for dragging 123 131 fill(statusText[background][right], "Create rectangle"); 124 fill(statusText[background][left | middle], ""); 132 fill(statusText[background][right], new int[] { drag, control | drag, shift | drag, control | shift | drag }, null, false); // no action for dragging 133 fill(statusText[background][left | middle], null); 125 134 fill(statusText[background][left | right], "Auto format"); 126 135 fill(statusText[background][middle | right], "Undo"); … … 128 137 fill(statusText[item][left], "Follow link"); 129 138 fill(statusText[item][left], new int[] { control, control | shift }, new int[] { action, panning | action }, "Run action", true, false); 139 fill(statusText[item][left], new int[] { drag, control | drag, shift | drag, control | shift | drag }, null, false); // no action for dragging 130 140 fill(statusText[item][middle], "Pickup"); 141 fill(statusText[item][middle], new int[] { drag, control | drag, shift | drag, control | shift | drag }, null, false); // no action for dragging 131 142 fill(statusText[item][right], "Copy"); 132 fill(statusText[item][left | middle], ""); 143 fill(statusText[item][right], new int[] { drag, control | drag, shift | drag, control | shift | drag }, null, false); // no action for dragging 144 fill(statusText[item][left | middle], null); // no action for left + middle 133 145 fill(statusText[item][left | right], "Extract attributes"); 134 146 fill(statusText[item][middle | right], "Delete"); … … 136 148 137 149 private static final String commandPadding = " "; 138 private static final String padding = " 150 private static final String padding = " "; 139 151 140 152 private static final String command(int mod, int button) { … … 148 160 int mod = (FrameMouseActions.isControlDown() ? control : 0) | (FrameMouseActions.isShiftDown() ? shift : 0); 149 161 int other = (ExperimentalFeatures.MousePan.get() ? panning : 0) | (current != null ? current.hasAction() ? action : 0 : 0); 150 String l = command(mod, left) + statusText[context][left][mod][other]; 151 String m = command(mod, middle) + statusText[context][middle][mod][other]; 152 String r = command(mod, right) + statusText[context][right][mod][other]; 153 // String lm = command(mod, left | middle) + helpText[context][left | middle][mod][other]; 154 String lr = command(mod, left | right) + statusText[context][left | right][mod][other]; 155 String mr = command(mod, middle | right) + statusText[context][middle | right][mod][other]; 156 MessageBay.setStatus(l + padding.substring(l.length()) + 157 m + padding.substring(m.length()) + 158 r + padding.substring(r.length()) + 159 // lm + padding.substring(lm.length()) + 160 lr + padding.substring(lr.length()) + 161 mr + padding.substring(mr.length())); 162 String status = ""; 163 164 String l = statusText[context][left][mod][other]; 165 String m = statusText[context][middle][mod][other]; 166 String r = statusText[context][right][mod][other]; 167 String lr = statusText[context][left | right][mod][other]; 168 String lm = statusText[context][left | middle][mod][other]; 169 String mr = statusText[context][middle | right][mod][other]; 170 String dl = statusText[context][left][mod | drag][other]; 171 String dm = statusText[context][middle][mod | drag][other]; 172 String dr = statusText[context][right][mod | drag][other]; 173 174 if(l != null) status += command(mod, left) + l + padding.substring(l.length()); 175 if(m != null) status += command(mod, middle) + m + padding.substring(m.length()); 176 if(r != null) status += command(mod, right) + r + padding.substring(r.length()); 177 if(lm != null) status += command(mod, left | middle) + lm + padding.substring(lm.length()); 178 if(lr != null) status += command(mod, left | right) + lr + padding.substring(lr.length()); 179 if(mr != null) status += command(mod, middle | right) + mr + padding.substring(mr.length()); 180 if(dl != null || dm != null || dr != null) status += "\n"; 181 if(dl != null) status += command(mod | drag, left) + dl + padding.substring(dl.length()); 182 if(dm != null) status += command(mod | drag, left) + dm + padding.substring(dm.length()); 183 if(dr != null) status += command(mod | drag, left) + dr + padding.substring(dr.length()); 184 185 MessageBay.setStatus(status); 162 186 } 163 187 -
trunk/src/org/expeditee/gui/MessageBay.java
r674 r678 25 25 26 26 27 public static final int MESSAGE_BUFFER_HEIGHT = 10 0;27 public static final int MESSAGE_BUFFER_HEIGHT = 105; 28 28 29 29 private static final int MESSAGE_LINK_Y_OFFSET = 100; … … 453 453 if (_status == null) { 454 454 _status = new Text(status); 455 _status.setPosition(0, 90);455 _status.setPosition(0, 85); 456 456 _status.setOffset(0, FrameGraphics.getMaxFrameSize().height); 457 457 _status.setLink(null); // maybe link to a help frame?
Note:
See TracChangeset
for help on using the changeset viewer.