func Main(username, uuid, accessToken string) { if err := glfw.Init(); err != nil { panic(err) } defer glfw.Terminate() console.ExecConf("conf.cfg") if username != "" { clientUsername.SetValue(username) } if uuid != "" { clientUUID.SetValue(uuid) } if accessToken != "" { clientAccessToken.SetValue(accessToken) skipLogin = true } initResources() setUIScale() startWindow() }
func start() { render.LoadTextures() initBlocks() con.init() initClient() fakeGen() if skipLogin { setScreen(newServerList()) console.ExecConf("autoexec.cfg") } else { setScreen(newLoginScreen()) } render.Start() }
func (ls *loginScreen) postLogin(p mojang.Profile, err error) { if err != nil { if me, ok := err.(mojang.Error); ok { ls.LoginError.Update(me.Message) } else { ls.LoginError.Update(err.Error()) } ls.LoginBtn.SetDisabled(false) ls.LoginTxt.Update("Login") return } clientUsername.SetValue(p.Username) clientUUID.SetValue(p.ID) clientAccessToken.SetValue(p.AccessToken) setScreen(newServerList()) console.ExecConf("autoexec.cfg") }