Page 1 of 1
UI problems.
Posted: 28 Apr 2010, 03:34
by oksnoop2
Is there a way to make "gui_transparent" and some other widgets load on default. I don't really grasp UIs so sorry i can't be more descriptive. During a playtest someone's UI looked like the top right image. When it should look like the bottom. I just want people to see the UI correctly on the first go with out having to flip on and off an bunch of stuff.
Re: UI problems.
Posted: 28 Apr 2010, 11:23
by Beherith
Seems to be that lolui/redui is still on for the screenie on the right.
Re: UI problems.
Posted: 28 Apr 2010, 20:53
by Regret
Beherith wrote:Seems to be that lolui/redui is still on for the screenie on the right.
Left is RedUI, right is LolUI.
As far as the topic: you would have to disable all user widgets or make a widget to unload all user widgets on first run. Either of which are very annoying for the player.
Re: UI problems.
Posted: 28 Apr 2010, 22:10
by JohannesH
I suggest you customise your own UI for the game, and dont allow other setups.
Re: UI problems.
Posted: 29 Apr 2010, 04:41
by oksnoop2
So my two options are: Leave it alone and leave it up the user to fix it as they see fit. OR Lock it down so people are stuck with what I give them?
Re: UI problems.
Posted: 29 Apr 2010, 04:51
by Niobium
You could have your UI widget unload other UI widgets (Hardcoded list). Users would still be able to open widget list and reenable theirs/disable yours if they wanted.
Re: UI problems.
Posted: 29 Apr 2010, 05:17
by oksnoop2
Is there some widget, example, or tutorial on how to do this?
Re: UI problems.
Posted: 29 Apr 2010, 09:50
by zwzsg
Code: Select all
function widget:GetInfo()
return {
name = "Reset widgets and settings",
desc = "Reset settings and widgets to fit the mod",
author = "zwzsg",
date = "March 5th, 2009",
license = "Public Domain",
layer = 0,
enabled = true,
handler = true,
}
end
local function WidgetWhiteList()
Spring.Echo("Enable some widgets")
for n,w in pairs(widgetHandler.knownWidgets) do
if n=="AdvPlayersList"
or n=="Autoquit"
or n=="CustomFormations2"
or n=="HealthBars"
or n=="HighlightSelectedUnits"
or n=="Select n Center!"
or n=="Start Point Remover"
or n=="MiniMap Start Boxes"
or n=="Action Finder"
or n=="Music"
or n=="Write GameState"
or n=="Heroes Right Click"
or n=="Hide commands"
or n=="Keep Morpheds Selected"
or n=="Automatic Tip Dispenser"
or n=="Build Bar"
or n=="Console Commands"
or n=="Default Commands"
or n=="Hotkeys"
or n=="Spring Direct Launch 2"
or n=="noResBar NoMoveWarnings" then
widgetHandler:EnableWidget(n)
else
widgetHandler:DisableWidget(n)
end
end
end
function widget:Initialize()
WidgetWhiteList()
-- Don't do that! People are gonna hate you if you change their settings!
Spring.SendCommands({"movewarnings 0","buildwarnings 0"})
Spring.SendCommands({"volume 100"})
Spring.SetConfigInt("AdvUnitShading",0)
Spring.SetConfigInt("MoveWarnings",0)
Spring.SetConfigInt("BuildWarnings",0)
Spring.SetConfigInt("LuaAutoModWidgets",1)
Spring.SetConfigInt("LuaModUICtrl",1)
Spring.SetConfigInt("LuaUI",1)
Spring.SetConfigInt("GroundDecals",1)
Spring.SetConfigInt("CamMode",1)
Spring.SetConfigInt("CrossSize",6)
Spring.SetConfigInt("DynamicSky",0)
Spring.SetConfigInt("AdvSky",0)
Spring.SetConfigInt("UnitIconDist",500)
Spring.SetConfigInt("UnitLodDist",500)
Spring.SetConfigInt("SoundVolume",100)
widgetHandler:DisableWidget(self:GetInfo().name)
end
Re: UI problems.
Posted: 30 Apr 2010, 23:16
by Regret
zwzsg wrote:-- Don't do that! People are gonna hate you if you change their settings!
This. Do not forget.
Re: UI problems.
Posted: 01 May 2010, 06:43
by oksnoop2
So are people saying i should just do...nothing?
Re: UI problems.
Posted: 01 May 2010, 07:48
by Niobium
I would just add in disabling other known UI widgets into your UI widget.
If people want their UI's back, then they just need to disable your widget and reenable theirs, simple. Just make sure you give your UI widget a clear name so that people can find it.