Add IsBlocking function (#89)
- Add IsBlocking function that checks if confirmation popup or blocking panel (loading screen as in when trying to re-connect to bnet) are on the screen
This commit is contained in:
@@ -335,6 +335,15 @@ func (gd *GameReader) GetCharacterList() []string {
|
||||
return characterNames
|
||||
}
|
||||
|
||||
// IsBlocking checks if there's a blocking popup or loading screen present
|
||||
func (gd *GameReader) IsBlocking() bool {
|
||||
panel := gd.GetPanel("BlockingPanel")
|
||||
panel2 := gd.GetPanel("DismissableModal")
|
||||
|
||||
return (panel.PanelName != "" && panel.PanelEnabled && panel.PanelVisible) ||
|
||||
(panel2.PanelName != "" && panel2.PanelEnabled && panel2.PanelVisible)
|
||||
}
|
||||
|
||||
// IsDismissableModalPresent checks if there's a error popup present
|
||||
func (gd *GameReader) IsDismissableModalPresent() (bool, string) {
|
||||
panel := gd.GetPanel("DismissableModal")
|
||||
|
||||
Reference in New Issue
Block a user