Free Hero Mesh

Check-in [24e7e79d38]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment:Allow middle mouse button for paste in the screen_prompt function
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 24e7e79d388d56b0442ae28f4a25a6a57dbc577e
User & Date: user on 2021-04-29 21:11:50
Other Links: manifest | tags
Context
2021-04-29
21:49
Add internals.doc to document some of the internals of Free Hero Mesh. check-in: 865ced7aa0 user: user tags: trunk
21:11
Allow middle mouse button for paste in the screen_prompt function check-in: 24e7e79d38 user: user tags: trunk
2021-04-28
21:20
Do not automatically check for Arg2 in the (Others) block check-in: 59e67bf4c2 user: user tags: trunk
Changes

Modified picture.c from [e07c9a379a] to [bbecfebc55].

247
248
249
250
251
252
253

254
255
256
257
258
259
260
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261







+







            t[n=0]=0;
            break;
          case SDLK_INSERT:
            if(ev.key.keysym.mod&KMOD_SHIFT) {
              const char*s;
              FILE*fp;
              int c;
              paste:
              optionquery[1]=Q_pasteCommand;
              if((s=xrm_get_resource(resourcedb,optionquery,optionquery,2)) && (fp=popen(s,"r"))) {
                for(;;) {
                  c=fgetc(fp);
                  if(c=='\t') c=' ';
                  if(c>=32 && n<m) t[n++]=c;
                  if(c=='\n' || c<0 || n>=m) break;
280
281
282
283
284
285
286




287
288
289
290
291
292
293
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298







+
+
+
+







        t[n]=0;
        SDL_FillRect(screen,&r,0xF1);
        SDL_LockSurface(screen);
        draw_text(0,8,t,0xF1,0xFF);
        draw_text(n<<3,8,"\xB1",0xF1,0xFB);
        SDL_UnlockSurface(screen);
        SDL_Flip(screen);
        break;
      case SDL_MOUSEBUTTONDOWN:
        if(ev.button.button==2) goto paste;
        break;
    }
  }
  return 0;
}

int screen_message(const char*txt) {
  int n=0;