Skip to content

Commit

Permalink
Add taskbar icon api
Browse files Browse the repository at this point in the history
  • Loading branch information
serivesmejia committed Nov 28, 2024
1 parent 7d1ac9b commit 9cca2f7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ import io.github.deltacv.papervision.platform.*
import io.github.deltacv.papervision.serialization.PaperVisionSerializer
import io.github.deltacv.papervision.util.event.PaperVisionEventHandler
import io.github.deltacv.papervision.util.loggerForThis
import java.awt.Taskbar
import java.awt.Toolkit

class PaperVision(
private val setupCall: PlatformSetupCallback
Expand Down Expand Up @@ -207,6 +209,12 @@ class PaperVision(

onInit.run()

if(Taskbar.isTaskbarSupported() && Taskbar.getTaskbar().isSupported(Taskbar.Feature.ICON_IMAGE)) {
Taskbar.getTaskbar().iconImage = Toolkit.getDefaultToolkit().getImage(javaClass.getResource("/ico/ico_ezv.png"))
} else {
logger.warn("Taskbar icon not supported")
}

IdElementContainerStack.threadStack.pop<Node<*>>()
IdElementContainerStack.threadStack.pop<Attribute>()
IdElementContainerStack.threadStack.pop<Link>()
Expand Down

0 comments on commit 9cca2f7

Please sign in to comment.