Skip to content

Commit

Permalink
Add platform.IsVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDang committed Jan 18, 2022
1 parent 0be51e9 commit 8cbd98e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PlatformGlfw.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,3 +515,8 @@ func (platform *GLFW) SetTitle(title string) {
func (platform *GLFW) IsMinimized() bool {
return glfw.True == platform.window.GetAttrib(glfw.Iconified)
}

// IsVisible checks whether window is visible.
func (platform *GLFW) IsVisible() bool {
return glfw.True == platform.window.GetAttrib(glfw.Visible)
}
3 changes: 3 additions & 0 deletions PlatformInterface.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ type Platform interface {

// Check whehter window is minimized
IsMinimized() bool

// Check whether window is visible
IsVisible() bool
}

0 comments on commit 8cbd98e

Please sign in to comment.