~swag/armagetronad/0.2.9-sty+ct+ap-fork

« back to all changes in this revision

Viewing changes to src/ui/uMenu.cpp

  • Committer: zodiacsohma1 at gmail
  • Date: 2016-03-21 18:46:16 UTC
  • Revision ID: zodiacsohma1@gmail.com-20160321184616-333hrsbtnv5x5yy2
The code for pasting text into message is only for Windows OS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
909
909
        else if (c.sym == SDLK_k) {
910
910
            killForwards = true;
911
911
        }
 
912
#ifdef WIN32
912
913
        else if (c.sym == SDLK_v) {
913
914
            pasteText = true;
914
 
        }
 
915
        }
 
916
#endif
915
917
    }
916
918
    // moveWordLeft = moveWordRight = deleteWordLeft = deleteWordRight = moveBeginning = moveEnd = killForwards
917
919
 
936
938
    else if (killForwards) {
937
939
        content->RemoveSubStr(cursorPos,content->Len()-1-cursorPos);
938
940
    }
 
941
#ifdef WIN32
939
942
    else if (pasteText) {
940
943
        if (OpenClipboard(0))
941
944
        {
955
958
            GlobalUnlock(hClipboardData);
956
959
            CloseClipboard();
957
960
        }
958
 
    }
 
961
    }
 
962
#endif
959
963
    else if (c.sym == SDLK_LEFT) {
960
964
        if (cursorPos > 0) {
961
965
            cursorPos--;
1085
1089
        else if (c.sym == SDLK_k) {
1086
1090
            killForwards = true;
1087
1091
        }
 
1092
#ifdef WIN32
1088
1093
        else if (c.sym == SDLK_v) {
1089
1094
            pasteText = true;
1090
 
        }
 
1095
        }
 
1096
#endif
1091
1097
    }
1092
1098
    // moveWordLeft = moveWordRight = deleteWordLeft = deleteWordRight = moveBeginning = moveEnd = killForwards
1093
1099
 
1112
1118
    else if (killForwards) {
1113
1119
        content->RemoveSubStr(cursorPos,content->Len()-1-cursorPos);
1114
1120
    }
 
1121
#ifdef WIN32
1115
1122
    else if (pasteText) {
1116
1123
        if (OpenClipboard(0))
1117
1124
        {
1131
1138
            GlobalUnlock(hClipboardData);
1132
1139
            CloseClipboard();
1133
1140
        }
1134
 
    }
 
1141
    }
 
1142
#endif
1135
1143
    else if (c.sym == SDLK_LEFT) {
1136
1144
        if (cursorPos > 0) {
1137
1145
            cursorPos--;