Use readBytes instead of readAllBytes in info.kt
This commit is contained in:
		
							parent
							
								
									8a1aa2680d
								
							
						
					
					
						commit
						4a470ee779
					
				@ -51,16 +51,17 @@ object ExecObj {
 | 
			
		||||
                ((this.layout) as FlowLayout).alignment = FlowLayout.CENTER
 | 
			
		||||
            }
 | 
			
		||||
        }.apply {
 | 
			
		||||
            // TODO Add text
 | 
			
		||||
            val iconStream = ExecObj.javaClass.getResourceAsStream("/icon.png")
 | 
			
		||||
            add(
 | 
			
		||||
                JLabel(
 | 
			
		||||
                    ImageIcon(
 | 
			
		||||
                        Toolkit.getDefaultToolkit()
 | 
			
		||||
                            .createImage(ExecObj.javaClass.getResourceAsStream("/icon.png")?.readAllBytes())
 | 
			
		||||
                            .createImage(iconStream.readBytes())
 | 
			
		||||
                            .getScaledInstance(256, 256, Image.SCALE_SMOOTH)
 | 
			
		||||
                    )
 | 
			
		||||
                )
 | 
			
		||||
            )
 | 
			
		||||
            iconStream.close()
 | 
			
		||||
            add(
 | 
			
		||||
                JLabel("<html>You should install this mod by dropping it into your mods folder, and not by running it.</html>").apply {
 | 
			
		||||
                    font = Font.createFont(Font.TRUETYPE_FONT, ExecObj.javaClass.getResourceAsStream("/font/NotoSans-Regular.ttf")).deriveFont(Font.BOLD, 20F)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user