Page 1 of 1
[v1.0.0-1.0.5] Online Indicator
Posted: Sat Feb 16, 2013 5:17 am
by Zizzo
Something I've seen a few times as a wishlist item (and something I've often wished for myself) is some sort of indicator in the UI showing your connection status. I've taken a stab at this with my new
Online Indicator addon. Currently I'm putting the indicator in the toolbar as an icon:
Now, the addon uses some kinda dirty tricks to wedge this icon into place (have I mentioned that Minimalist is not an easy UI to tweak?), so there's a decent chance it'll do something weird if you've rearranged your UI components in a way I didn't anticipate. And I'm fairly confident that the icon is displaying the correct status, but not absolutely certain. For both of these reasons, I'd like to let it out into the wild to be tested for a bit before merging it into ZOmnibus.
[edit 2013-11-12 11:48pm:
Technical info:]
Code: Select all
Hooks:
UISet:Minimalist:Toolbar [to add our icon to the toolbar]
Superload:
mod.class.uiset.Minimalist:
resetPlaces() [to adjust the default toolbar position for our icon]
Re: [v1.0.0] Online Indicator
Posted: Wed Feb 20, 2013 12:48 am
by darkgod
Nice!
I've now added in svn a "UISet:Minimalist:Toolbar" hook, just for you

Re: [v1.0.0] Online Indicator
Posted: Thu Feb 21, 2013 3:32 am
by Zizzo
darkgod wrote:I've now added in svn a "UISet:Minimalist:Toolbar" hook, just for you

Bless you, sir.
[sound F/X: source diving] So it looks like each hook will need to put its computed x and y values back into the data{} table for the next hook to use in computing its x/y values. May I request that the tb_bg glTexture also be passed to hooks, since they'll probably need it to draw their icon?
[sound F/X: further source diving] Hmm, does this need to interact with the default placement of the toolbar? I was worried about my icon falling off the bottom of the window in the default placement, which is why I tried to stick it at the top. Or do we assume that anyone using an icon-adding addon will just move the toolbar for it to fit?
Re: [v1.0.0] Online Indicator
Posted: Thu Feb 21, 2013 11:40 pm
by darkgod
dione
Re: [v1.0.0] Online Indicator
Posted: Fri Mar 15, 2013 4:41 am
by Zizzo
And as promised, rewritten for v1.0.1 using the new hooks mechanism. Note that this now puts the icon at the end of the toolbar (the bottom in the default orientation), so you may need to move your toolbar to make it visible. I've hijacked Minimalist:resetPlaces(), so resetting your UI positions via the <Esc> menu should be sufficient.
Also, I'm no longer entirely sure that the icon is accurately reflecting online state, as I've seen "connection lost; trying to reconnect"-style messages without the icon changing to reflect it. Let me know if you see anything weird with this.
Re: [v1.0.0-1.0.1] Online Indicator
Posted: Fri May 10, 2013 2:55 am
by Zizzo
And migrated to v1.0.3.
Re: [v1.0.0-1.0.1] Online Indicator
Posted: Wed May 22, 2013 1:03 am
by Zizzo
And migrated again to v1.0.4.
Re: [v1.0.0-1.0.4] Online Indicator
Posted: Wed Nov 13, 2013 4:47 am
by Zizzo
And migrated again to v1.0.5.
Re: [v1.0.0-1.0.5] Online Indicator
Posted: Tue Jan 26, 2016 12:18 am
by Zizzo
I'm officially deprecating this addon as of engine release 1.4.0; I'm no longer convinced that the state data tracked by the addon bears any meaningful relation to your actual server connection state, and given that, updating it for 1.4.0's new Dark UI didn't really seem worth the effort. To both of this addon's dedicated users, We Apologize for the Inconvenience.™

Re: [v1.0.0-1.0.5] Online Indicator
Posted: Sun Feb 18, 2024 8:09 pm
by Zizzo
We're
BA-aaack…

On closer examination, it looks like there are actually three distinct "states" that we need to be tracking:
- Whether you're logged in, via te4.org or Steam.
- Whether you're connected to the te4.org server. This determines whether you can receive server events like Santascape. (Note that you're still considered to be logged in while the server connection is dropped, which is where previous versions of this addon were going wrong…
)
- Whether your "online" or "offline" profile is active. You're considered online if your game module and all your addons have a valid MD5 hash. This determines whether your character sheet will be uploaded to the characters vault, and whether you have access to various chat features. (You also have to be connected for those, of course.
)
So in v2, we now indicate these states as follows:

- online-status.png (8.73 KiB) Viewed 3485 times
and via a slightly more verbose tooltip on the icon. Note that you may need to move the toolbar a bit for the new icon to be visible (click the padlock icon to unlock it, then drag the toolbar by its handle, then click the padlock again to re-lock).
[And looking ahead, we could probably pretty easily add this back to ZOmnibus and ZOmnibus Lite, but we'd probably need a game option to turn it off in that case (and I'd like it to have a bit more field testing under its belt first…

).]