Free Hero Mesh

Diff
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Differences From Artifact [e07c9a379a]:

To Artifact [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;