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]
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.
"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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
So it has nothing to do with draw_corner_width's and heights? Just insets and offsets?
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.