app

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config   config.AppConfig
	HWND     win.HWND
	AppState AppState
}

func CreateApp

func CreateApp(config config.AppConfig) *App

func (*App) CaptureCharacter

func (app *App) CaptureCharacter()

Detect the current character currently selected

func (*App) CaptureGameData

func (app *App) CaptureGameData()

Captures game data such as character and location

func (*App) CaptureGameMenu

func (app *App) CaptureGameMenu()

Capture the current game menu

func (*App) CaptureLocation

func (app *App) CaptureLocation()

Detect the current location of the player

func (*App) ConnectToDiscordGateway

func (app *App) ConnectToDiscordGateway() error

Connects to the Discord gateway

func (*App) DisconnectFromDiscordGateway

func (app *App) DisconnectFromDiscordGateway()

Disconnects from the Discord gateway

func (*App) GetWindow

func (app *App) GetWindow()

Get the Honkai window handle

func (*App) HandleWindowClosed

func (app *App) HandleWindowClosed()

Handles the scenario when the Honkai window is closed

func (*App) InitializeOCR

func (app *App) InitializeOCR()

Initializes OCR for capturing game data

func (*App) IsWindowFocused

func (app *App) IsWindowFocused() bool

Checks if the Honkai window is currently focused

func (*App) ResetAppState

func (app *App) ResetAppState()

func (*App) SetPresence

func (app *App) SetPresence(rich client.Activity)

Util to sets the Discord presence

func (*App) StartLoop

func (app *App) StartLoop()

Main loop of the app

func (*App) UpdateDiscordPresence

func (app *App) UpdateDiscordPresence()

Updates the Discord presence based on game data

type AppState

type AppState struct {
	CharacterPos       int32
	Character          utils.Data
	Location           utils.Data
	Menu               utils.Data
	LoopTime           time.Duration
	AppStarted         time.Time
	CombatStarted      time.Time
	IsInMenus          bool
	IsGatewayConnected bool
	IsOCRInitialized   bool
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL