Red UI widgets - Page 2

Red UI widgets

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

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

Re: Red UI widgets

Post by Regret »

manolo_ wrote:tbh i dont care, but its some kind of service :D and also the downloader will check the luas (i think the checksum of the data) and compare them to the installed one
If it will compare it, then it will say that you should update, which is good. I don't really care about spring downloader distribution anyway.
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Red UI widgets

Post by very_bad_soldier »

manolo_ wrote:
Regret wrote:
manolo_ wrote:so people with the older widget see that they could to update (yellow), if i dont have the older version they will see this blue circle in the spring downloader for unknown version
Just add random data into a .lua file and say that is the older version.
tbh i dont care, but its some kind of service :D and also the downloader will check the luas (i think the checksum of the data) and compare them to the installed one
Yes it gets MD5-hashed. Another advantage is that people can downgrade to any specific version if they have problems with the latest version.
Regret wrote: If it will compare it, then it will say that you should update, which is good. I don't really care about spring downloader distribution anyway.
At best it will be detected as "unknown version".
Okay no problem if you expect people to come to this thread to download it...
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Red UI widgets

Post by Regret »

very_bad_soldier wrote:Okay no problem if you expect people to come to this thread to download it...
It will be eventually included in BA as a replacement for LolUI, so I don't really mind if they won't download it in the meantime.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: Red UI widgets

Post by Caydr »

Here's a shot of all the widgets working together. Coincidentally it's AA. What?
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Red UI widgets

Post by Regret »

Caydr wrote:Here's a shot of all the widgets working together. Coincidentally it's AA. What?
I must compliment myself that it indeed does look good. Also, you lowered the transparency of buildmenu? For some reason it looks bland, might be the contrast with bright icons.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: Red UI widgets

Post by Caydr »

Regret wrote:
Caydr wrote: Also, you lowered the transparency of buildmenu? For some reason it looks bland, might be the contrast with bright icons.
:shock:

I.... might've? I don't know what the hell I'm doing :lol: I could sell ticks to this spectacle: Come watch Caydr try to do LUA, $40 per minute.

Is it possible to not draw some of the orders? For instance, I can see no benefit to having a guard option since it's right-click contextual in pretty much any situation you'd want to use it.

edit: Yes indeed it looks like I lowered the opacity to 0.25, probably just experimenting with it. Bumped back up to 0.5. Some of the apparent blandness might be because I removed the space between unit icons, I found it distracting that the tooltip would constantly flash as I rolled over various items in the build menu.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Red UI widgets

Post by Regret »

Caydr wrote:I removed the space between unit icons, I found it distracting that the tooltip would constantly flash as I rolled over various items in the build menu.
I removed it in the latest version for this exact reason. Will probably fix that flickering later.
Caydr wrote:Is it possible to not draw some of the orders?
Yes. At line #468 starts a table called "hiddencmds". Contains a list of cmd IDs that are not displayed.

Here are some IDs (used the widget to dump them from latest BA):

Code: Select all

"Stop" ID = "0"
"Wait" ID = "5"
"TimeWait" ID = "6"
"DeathWait" ID = "7"
"SquadWait" ID = "8"
"GatherWait" ID = "9"
"SelfD" ID = "65"
"Fire state" ID = "45"
"Repeat" ID = "115"
"Cloak state" ID = "95"
"Move state" ID = "50"
"Load units" ID = "76"
"Move" ID = "10"
"Patrol" ID = "15"
"Fight" ID = "16"
"Guard" ID = "25"
"Repair level" ID = "135"
"Land mode" ID = "145"
"Area attack" ID = "21"
"Attack" ID = "20"
"Repair" ID = "40"
"Reclaim" ID = "90"
"Restore" ID = "110"
"Load units" ID = "75"
"Unload units" ID = "80"
"Active state" ID = "85"
"apLandAt" ID = "34569"
"apAirRepair" ID = "34570"
"Automatic Mex Upgrade" ID = "31243"
"Upgrade Mex" ID = "31244"
"Area Attack" ID = "39954"
"Trajectory" ID = "120"
"Resurrect" ID = "125"
"0/0" ID = "100"
"Stagger" ID = "34566"
"DGun" ID = "105"
"ntPassiveMode" ID = "34571"
"Capture" ID = "130"
Basically you just add the number of the cmd you don't want to see to the mentioned table.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: Red UI widgets

Post by Caydr »

Regret wrote:
Caydr wrote:
Caydr wrote:Is it possible to not draw some of the orders?
Yes. At line #468 starts a table called "hiddencmds". Contains a list of cmd IDs that are not displayed.

Here are some IDs (used the widget to dump them from latest BA):

Code: Select all

"Stop" ID = "0"
"Wait" ID = "5"
"TimeWait" ID = "6"
"DeathWait" ID = "7"
"SquadWait" ID = "8"
"GatherWait" ID = "9"
"SelfD" ID = "65"
"Fire state" ID = "45"
"Repeat" ID = "115"
"Cloak state" ID = "95"
"Move state" ID = "50"
"Load units" ID = "76"
"Move" ID = "10"
"Patrol" ID = "15"
"Fight" ID = "16"
"Guard" ID = "25"
"Repair level" ID = "135"
"Land mode" ID = "145"
"Area attack" ID = "21"
"Attack" ID = "20"
"Repair" ID = "40"
"Reclaim" ID = "90"
"Restore" ID = "110"
"Load units" ID = "75"
"Unload units" ID = "80"
"Active state" ID = "85"
"apLandAt" ID = "34569"
"apAirRepair" ID = "34570"
"Automatic Mex Upgrade" ID = "31243"
"Upgrade Mex" ID = "31244"
"Area Attack" ID = "39954"
"Trajectory" ID = "120"
"Resurrect" ID = "125"
"0/0" ID = "100"
"Stagger" ID = "34566"
"DGun" ID = "105"
"ntPassiveMode" ID = "34571"
"Capture" ID = "130"
Basically you just add the number of the cmd you don't want to see to the mentioned table.
You are sex.

I think you mentioned to me you were going to do a chat widget at some point right? I've tweaked the three you've made perfectly now but I really need a chat widget... wink wink.... nudge...

This is how I've got it laid out now, what do you think?
screen002.jpg
Notice I made a 2 pixel space at the top and side of the screen - I noticed that if you maximize the minimap it's impossible to un-maximize it because the button for doing so is covered. This is especially important for because I'll be locking the windows in place.

Reduced the font size to 11, I think it was, because it has always bugged me that the text size is all over the place by default in all Spring UIs. Haven't figured out how to center the text though... :|
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: Red UI widgets

Post by Caydr »

Is it possible to change what the text for an order is? For instance, "load unit" "unload unit" could just as easily be "load" "unload", and it would allow me to bump up the font size.

Also, any idea why buildpics are darkening themselves? It seems to happen at random and it doesn't go away until I restart the game.

Everything's normal:
screen004.png
screen004.png (48.96 KiB) Viewed 3896 times
A few minutes later I click the same unit again:
screen005.png
screen005.png (48.27 KiB) Viewed 3894 times
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Red UI widgets

Post by Regret »

Caydr wrote:Notice I made a 2 pixel space at the top and side of the screen - I noticed that if you maximize the minimap it's impossible to un-maximize it because the button for doing so is covered. This is especially important for because I'll be locking the windows in place.
Know that many users prefer their UI components to be in a certain place, because of habit from playing with the default Spring UI, I myself would find it very hard to play if someone decided that resource bars HAVE to be placed like that, or menus.
Caydr wrote:Reduced the font size to 11, I think it was, because it has always bugged me that the text size is all over the place by default in all Spring UIs. Haven't figured out how to center the text though... :|
I didn't make it so you could set the fontsize of the order icons. I guess you modified the mechanics somehow, which would also bork the automatic resizing/centering.
Caydr wrote:Also, any idea why buildpics are darkening themselves? It seems to happen at random and it doesn't go away until I restart the game.
I think you changed something to cause that to happen. The darkening is only applied to disabled buildings/units/orders (i.e. those that can't be build due to host settings).

Also I find your icons absurdly bright, take a look at BA icons, you might want to adjust the brightness.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Red UI widgets

Post by Regret »

.
Last edited by Regret on 28 Aug 2009, 22:06, edited 2 times in total.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Red UI widgets

Post by manolo_ »

so hows the performance compared to iceui?
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Red UI widgets

Post by Regret »

manolo_ wrote:so hows the performance compared to iceui?
These widgets perform much better than IceUI. Try it yourself.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Red UI widgets

Post by manolo_ »

Regret wrote:
manolo_ wrote:so hows the performance compared to iceui?
These widgets perform much better than IceUI. Try it yourself.
ill try this afternoon, so does it have the same functions as iceui?
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Red UI widgets

Post by Regret »

manolo_ wrote:ill try this afternoon, so does it have the same functions as iceui?
Different functions. Try it out and then ask.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Red UI widgets

Post by manolo_ »

suggestion:

-could u group them together to something like red ui and could u make a widgets list like iceui (btw personalize all that stuff ? )
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Red UI widgets

Post by Regret »

manolo_ wrote:suggestion:

-could u group them together to something like red ui and could u make a widgets list like iceui (btw personalize all that stuff ? )
I will release it in a package once all the major widgets are done.

Ingame customization will come later, currently you can edit the config table inside the .lua files, it's right at top.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: Red UI widgets

Post by Caydr »

Flying hot secks. Thanks for the chat widget, AA is really coming together nicely and a big part of it is the great new UI.

My font size modification was done to Red_UI_Framework:

Code: Select all

if (o.caption) then
		local px2,py2 = px,py
		local text = o.caption
		local width = glGetTextWidth(text)
		local linecount = getLineCount(text)
>>>>>>local fontsize = 9
		local height = linecount*fontsize
		if (height > sy) then
			fontsize = sy/linecount
			px2 = px2 + (sx - width*fontsize) /2 --center
		else
			py2 = py2 + (sy - height) /2 --center
		end
		Text(px2,py2,fontsize,text,o.options,captioncolor)
		o.fontsize = fontsize
	end
My build icons ARE absurdly bright, but they're also quite small. I find that the different units/structures are easier to tell apart than when they are at the default brightness. And I made BA's buildpics so I know exactly what they look like :P

I will try reverting to the original build menu/framework files and see if I can get the darkening to go away. What's weird is, it's totally random, sometimes bps will be dark, sometimes (absurdly, correctly) bright. Though as the game goes on it's like more and more of them get dark. It's a pity all my breakthroughs in LUA so far have been new and innovative ways to break things...
Regret wrote:
manolo_ wrote:suggestion:

-could u group them together to something like red ui and could u make a widgets list like iceui (btw personalize all that stuff ? )
I will release it in a package once all the major widgets are done.

Ingame customization will come later, currently you can edit the config table inside the .lua files, it's right at top.
If you're going to release a bunch as a group I would be happy to share my modified files with you if you like anything you see.

I'm going to try (hahahaha) to set a special font for buildpics, white with a black outline. Let's see if I'm uberl33t yet...
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Red UI widgets

Post by Regret »

Caydr wrote:My font size modification was done to Red_UI_Framework:
I explicitly told you not to do that since you have no idea what you're doing.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: Red UI widgets

Post by Caydr »

I'm sorry, I don't remember you saying that. Are you offended? Really, I'm sorry, I'm new at this and just experimenting.

edit: I've looked through all your posts in the framework thread and this thread, as well as all your PMs, I don't see anything about "don't modify the framework file" or even hinting at that. Are you confusing me with someone else?

Although I'm inexperienced I'm not a total write-off, I really do understand at least the basics of how scripting languages work. My problem is mainly not knowing what they're capable of because I don't have all the commands memorized.
Last edited by Caydr on 14 Aug 2009, 21:31, edited 1 time in total.
Post Reply

Return to “Lua Scripts”