Changeset 700


Ignore:
Timestamp:
01/16/14 10:03:31 (10 years ago)
Author:
jts21
Message:

Make help text easier to understand (add "click"/"drag" at start of line instead of just prepending "d" to drag actions)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/Help.java

    r697 r700  
    4141        // separator between command and description
    4242        private static final String separatorString = ": ";
    43         // flag for dragging
    44         private static final String dragString = "d";
    45        
    46         private static final String commandPadding = "       ";
     43       
     44        private static final String commandPadding = "      ";
    4745        private static final String padding = "                    ";
    4846       
    49         private static final String command(int mod, int button, boolean drag) {
    50                 String cmd = (drag ? dragString : "") + modifiers[mod] + buttons[button] + separatorString;
     47        private static final String command(int mod, int button) {
     48                String cmd = modifiers[mod] + buttons[button] + separatorString;
    5149                return commandPadding.substring(cmd.length()) + cmd;
    52         }
    53        
    54         private static final String command(int mod, int button) {
    55                 return command(mod, button, false);
    5650        }
    5751       
     
    106100                        return "Copy item";
    107101                }
    108         }
    109        
    110         private static final String left_middle(Context context, int mod, int other) {
    111                 return null;
    112102        }
    113103       
     
    223213                String r =  right(context, mod, other);
    224214                String lr = left_right(context, mod, other);
    225                 String lm = left_middle(context, mod, other);
    226215                String mr = middle_right(context, mod, other);
    227216                String dl = drag_left(context, mod, other);
     
    229218                String dr = drag_right(context, mod, other);
    230219               
     220                if(l != null || m != null || r != null || lr != null) status += " Click:";
    231221                if(l != null)  status += command(mod, left) + l + padding.substring(l.length());
    232222                if(m != null)  status += command(mod, middle) + m + padding.substring(m.length());
    233223                if(r != null)  status += command(mod, right) + r + padding.substring(r.length());
    234                 if(lm != null) status += command(mod, left | middle) + lm + padding.substring(lm.length());
    235224                if(lr != null) status += command(mod, left | right) + lr + padding.substring(lr.length());
    236225                if(mr != null) status += command(mod, middle | right) + mr + padding.substring(mr.length());
    237                 if(dl != null || dm != null || dr != null || iw != null) status += "\n";
    238                 if(dl != null) status += command(mod, left, true) + dl + padding.substring(dl.length());
    239                 if(dm != null) status += command(mod, middle, true) + dm + padding.substring(dm.length());
    240                 if(dr != null) status += command(mod, right, true) + dr + padding.substring(dr.length());
     226                if(dl != null || dm != null || dr != null || iw != null) status += "\n Drag: ";
     227                if(dl != null) status += command(mod, left) + dl + padding.substring(dl.length());
     228                if(dm != null) status += command(mod, middle) + dm + padding.substring(dm.length());
     229                if(dr != null) status += command(mod, right) + dr + padding.substring(dr.length());
    241230                if(iw != null) status += commandPadding + "Widget: " + iw.getClass().getSimpleName();
    242231               
Note: See TracChangeset for help on using the changeset viewer.