Action RPG Framework

by Forum_account
Action RPG Framework
A framework for developing action RPGs.
ID:808294
 
As Forum Account shown in version 5 where when player moves their info box dis appear. is there a way to make it transparent using
icon-=rgb(0,0,0,155)


or maybe using transparent icon

my main concern is the info box background to be transparent.
You can edit the icons in framework-hud.dmi, but the background of the info box uses the same icon states as the background of all other on-screen panels, so it'd make all other things transparent.

You can make a new icon (ex: info-box.dmi), copy the states from framework-hud.dmi, make the background ones partially transparent, and put this in your code:

InfoBox
icon = 'info-box.dmi'
i did in game but now the problem is that how would i remove these or change their states when they are already added to hud.
add(0, 0, "box-bottom-left")
add(width * 32 - 32, 0, "box-bottom-right")
add(width * 32 - 32, height * 32 - 32, "box-top-right")
add(0, height * 32 - 32, "box-top-left")

// make the left/right sides if necessary
if(height > 2)
add(0, 32, "box-left", height = height - 2)
add(width * 32 - 32, 32, "box-right", height = height - 2)

// make the top/bottom sides if necessary
if(width > 2)
add(32, 0, "box-bottom", width = width - 2)
add(32, height * 32 - 32, "box-top", width = width - 2)

// make the middle if necessary
if(height > 2 && width > 2)
add(32, 32, "box-middle", width = width - 2, height = height - 2)
If you want to change between the normal and partially transparent icons instead of hiding or showing it completely, you'd have to change each object's icon, like this:

InfoBox
hide()
for(var/obj/o in objects)
o.icon = 'transparent-info-box.dmi'

show()
for(var/obj/o in objects)
o.icon = Constants.HUD_ICON