Upvote Upvoted 2 Downvote Downvoted
Button rounding
posted in Customization
1
#1
1 Frags +

How do I round buttons? I think it's something that's defined in clientscheme as almost all of my buttons are unrounded. Like the backpack buttons:

http://i.imgur.com/sCWbwFR.png

How do I round buttons? I think it's something that's defined in clientscheme as almost all of my buttons are unrounded. Like the backpack buttons:

[IMG]http://i.imgur.com/sCWbwFR.png[/IMG]
2
#2
1 Frags +

Test out different values of border values in clientscheme.res, but it also could have something to do with the actual imagepanels.

"draw_corner_height" "0" = No rounded corner
"draw_corner_height" "11" = Corners rounded by 11 pixels

You'll have to test each one individually. Sadly, you can only do whole numbers.

Test out different values of border values in clientscheme.res, but it also could have something to do with the actual imagepanels.

"draw_corner_height" "0" = No rounded corner
"draw_corner_height" "11" = Corners rounded by 11 pixels

You'll have to test each one individually. Sadly, you can only do whole numbers.
3
#3
huds.tf
0 Frags +

Buttons like that use borders. Create or use an existing border that is curved in ClientScheme.res. I'd tell you more about how borders work but honestly I haven't got a clue myself and I always just luck it with the numbers.

Buttons like that use borders. Create or use an existing border that is curved in ClientScheme.res. I'd tell you more about how borders work but honestly I haven't got a clue myself and I always just luck it with the numbers.
4
#4
0 Frags +

But what border? There's tons!

But what border? There's tons!
5
#5
0 Frags +

The border that's called for in the item panels.
Look for "border" "RANDOMBORDER", and use that border info.
If it's an imagepanel for the button, use the draw_corner_ heights and widths provided.

The border that's called for in the item panels.
Look for "border" "RANDOMBORDER", and use that border info.
If it's an imagepanel for the button, use the draw_corner_ heights and widths provided.
6
#6
0 Frags +
SevinBut what border? There's tons!

Most of them are pretty much the same, try out some ones and take one that you liked. Or just make your own based off an existing rounded one that you liked.

Basically all you need to know is "draw_corner_width" and "draw_corner_height" indicate how curved they are. Anything inset based you can ignore.

[quote=Sevin]But what border? There's tons![/quote]
Most of them are pretty much the same, try out some ones and take one that you liked. Or just make your own based off an existing rounded one that you liked.

Basically all you need to know is "draw_corner_width" and "draw_corner_height" indicate how curved they are. Anything inset based you can ignore.
7
#7
0 Frags +
main_giThe border that's called for in the item panels.
Look for "border" "RANDOMBORDER", and use that border info.
If it's an imagepanel for the button, use the draw_corner_ heights and widths provided.

There is no border called for in the item panels. I can't find them. I've checked all over the backpack related files and the only place borders are given are in clientscheme.

[quote=main_gi]The border that's called for in the item panels.
Look for "border" "RANDOMBORDER", and use that border info.
If it's an imagepanel for the button, use the draw_corner_ heights and widths provided.[/quote]

There is no border called for in the item panels. I can't find them. I've checked all over the backpack related files and the only place borders are given are in clientscheme.
8
#8
0 Frags +

Dunno if you found it by now, but I'll post anyways in case you, or anyone else, is looking for a solution.

I ran into a similar problem: instead of wanting rounded corners, I wanted unrounded corners for the buttons on a HUD I'm working on (exactly like the ones in your picture).

I found out it has to do with ButtonBorder, ButtonKeyFocusBorder, and ButtonDepressedBorder in clientscheme.res. The default rounded buttons look like this:

"inset" "0 0 0 0"
"backgroundtype" "2"

and for rectangular buttons, they look like this:

"color" "Blank"
"offset" "0 0"

There's probably more to it, but that works for me, and I don't want to spend more time on this than I already have.

Dunno if you found it by now, but I'll post anyways in case you, or anyone else, is looking for a solution.

I ran into a similar problem: instead of wanting rounded corners, I wanted unrounded corners for the buttons on a HUD I'm working on (exactly like the ones in your picture).

I found out it has to do with ButtonBorder, ButtonKeyFocusBorder, and ButtonDepressedBorder in clientscheme.res. The default rounded buttons look like this:

"inset" "0 0 0 0"
"backgroundtype" "2"

and for rectangular buttons, they look like this:

"color" "Blank"
"offset" "0 0"

There's probably more to it, but that works for me, and I don't want to spend more time on this than I already have.
9
#9
0 Frags +

So it has nothing to do with draw_corner_width's and heights? Just insets and offsets?

So it has nothing to do with draw_corner_width's and heights? Just insets and offsets?
10
#10
0 Frags +

For those buttons you highlighted in the picture, yes, plus pretty much every other button in game. I haven't run into any problem yet after changing it as described. I'm assuming changing it back to the default values so they're rounded should work.

For those buttons you highlighted in the picture, yes, plus pretty much every other button in game. I haven't run into any problem yet after changing it as described. I'm assuming changing it back to the default values so they're rounded should work.
Please sign in through STEAM to post a comment.