Is Build Costs still supported?

Is Build Costs still supported?

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

Moderator: Moderators

Post Reply
UAF
Posts: 96
Joined: 02 Jan 2008, 19:25

Is Build Costs still supported?

Post by UAF »

I'm trying to use it in BA with IceUI and it doesn't display properly.

Sometimes the information box appear next to the building/unit I want to build, and sometimes in the infobox at the buttom of the screen.
And the values inside the infobox are overlapping one another.

Also, is there a way to move the infobox? Its in the same location as IceUI Tooltip, clock, and FPS (And I want to keep those where they are)
UAF
Posts: 96
Joined: 02 Jan 2008, 19:25

Re: Is Build Costs still supported?

Post by UAF »

UPDATE:

Ok, I take back some of what I said. If I mess with the GUI (turn off IceUI, then turn it on) the there are problems. Otherwise the build costs popup and info appear in the correct locations.

However, the overlapping text problems still exists.
The resource change when building and right now both appear too much to the right, especially if the value is negative.
Now I looked at the code, and I have no idea why positive values appear more to the left the negative values, but I whipped a half-assed solution to it by changing the drawResourcesChange function a bit.

I replaced lines 341 and 342 with:

Code: Select all

if changeWhenBuilding > 1 then
	drawText(numberToColorText(changeWhenBuilding), 35, position) 
  elseif changeWhenBuilding < 1 then
	drawText(numberToColorText(changeWhenBuilding), 25, position) 
  end
  drawText("<-", 82, position)
  if currentChange > 1 then
	drawText(numberToColorText(currentChange), 90, position)
  elseif currentChange < 1 then
	drawText(numberToColorText(currentChange), 80, position)
  end
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Is Build Costs still supported?

Post by Niobium »

You can show/hide the default tooltip with '/tooltip [0|1]'. You might also want to check that Red UI components are disabled as they might be conflicting with other UI elements, i.e. IceUI.
Post Reply

Return to “Lua Scripts”