Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1025396 // dm_transientModuleIcon - takes a BufferedImage, but sets icon non-transiently

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (10039L/70K).

1  
// module has to be visible already
2  
// if img == null, we restore the module's non-transient icon
3  
svoid dm_transientModuleIcon(BufferedImage img) {
4  
  O mod = dm_current_mandatory_generic();
5  
  Container f = dm_frame(mod);
6  
  if (f == null) ret;
7  
  if (img == null) 
8  
    img = loadImage2(or(dm_moduleIcon(), (S) dm_getOS moduleDefaultIconID()));
9  
  setPIFrameIconImage(f, img);
10  
}

Author comment

Began life as a copy of #1025391

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025396
Snippet name: dm_transientModuleIcon - takes a BufferedImage, but sets icon non-transiently
Eternal ID of this version: #1025396/3
Text MD5: 42c08664d4b66e8af7c4f672b7cc302d
Transpilation MD5: 7446f11e0663d75a3344ecaba3d40e79
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-27 18:44:42
Source code size: 383 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 105 / 176
Version history: 2 change(s)
Referenced in: [show references]