Disabling UI

Disabling UI

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Disabling UI

Post by Regret »

Why does disabling UI using F5 disable LuaUI drawscreen?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Disabling UI

Post by imbaczek »

do i infer correctly this breaks Lua effects?
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Disabling UI

Post by Regret »

yes (actually not sure if all)
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Disabling UI

Post by Auswaschbar »

Which ones?
Commander nametags -> work
Display DPS -> works
LUPS -> works
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Disabling UI

Post by Regret »

Auswaschbar wrote:Which ones?
Commander nametags -> work
Display DPS -> works
LUPS -> works
Regret wrote:drawscreen
All those use drawworld etc afaik.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Disabling UI

Post by imbaczek »

isn't drawworld the place you should be drawing effects, anyway?

edit: i've got a feeling that you actually want a different callin with a working name of DrawScreenUIHidden.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Disabling UI

Post by Regret »

imbaczek wrote:isn't drawworld the place you should be drawing effects, anyway?

edit: i've got a feeling that you actually want a different callin with a working name of DrawScreenUIHidden.
No, there already is a check to see whether UI is disabled, I don't see the point to force drawscreen disabled.

Spring.IsGUIHidden
Last edited by Regret on 19 Aug 2009, 18:04, edited 1 time in total.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Disabling UI

Post by Auswaschbar »

Regret wrote:
imbaczek wrote:isn't drawworld the place you should be drawing effects, anyway?

edit: i've got a feeling that you actually want a different callin with a working name of DrawScreenUIHidden.
No, there already is a check to see whether UI is disabled, I don't see the point to force drawscreen disabled.
WHy would someone call DrawScreen if screen drawing is disabled anyway?

Btw, you also fail to give any example widget...
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Disabling UI

Post by Regret »

Auswaschbar wrote:WHy would someone call DrawScreen if screen drawing is disabled anyway?

Btw, you also fail to give any example widget...
To change cursor size.

http://springrts.com/phpbb/viewtopic.php?f=23&t=19934
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Disabling UI

Post by imbaczek »

Regret wrote:No, there already is a check to see whether UI is disabled, I don't see the point to force drawscreen disabled.
1) clean separation of responsibility
2) backwards compatibility
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Disabling UI

Post by Regret »

imbaczek wrote:1) clean separation of responsibility
2) backwards compatibility
Drawscreen was always enabled. The disabling when UI is hidden was introduced only in recent spring versions. So what backwards compatibility are you talking about?

Also widget makers are responsible for checking whether UI is hidden with Spring.IsGUIHidden().
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Disabling UI

Post by imbaczek »

no idea, i didn't design the api nor do i follow changes in it; it's how i'd do it. if it was working differently than it is now, there should be a rationale somewhere.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Disabling UI

Post by Regret »

imbaczek wrote:no idea, i didn't design the api nor do i follow changes in it; it's how i'd do it. if it was working differently than it is now, there should be a rationale somewhere.
What on earth is the Spring.IsGUIHidden for then? It was always used in drawscreen. There is no rational explanation for forcing drawscreen to be disabled other than catering to lazy widget makers that do not make the said check.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Disabling UI

Post by Auswaschbar »

Spring.SetMouseCursor should be called from widget:Update anyway (see trepans SmoothScroll-widget).
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Disabling UI

Post by Regret »

Auswaschbar wrote:Spring.SetMouseCursor should be called from widget:Update anyway (see trepans SmoothScroll-widget).
It does not work in Update.

EDIT: seems there is widget:DrawScreenEffects() which makes this topic nil.
Post Reply

Return to “Help & Bugs”