14 lines
451 B
Markdown
14 lines
451 B
Markdown
# Darklord.js — drawUiButton() (satır 600)
|
||
|
||
[← Darklord.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
```javascript
|
||
function drawUiButton(panel, x, y, w, h, label, textColor, bgColor)
|
||
{
|
||
panel.rect(x, y, w, h, C_BUTTON_BORDER);
|
||
panel.rect(x + 1, y + 1, w - 2, h - 2, bgColor);
|
||
panel.rect(x + 2, y + 2, w - 4, 1, C_BUTTON_INNER);
|
||
panel.text(label, x + w / 2, y + Math.floor((h - 9) / 2), textColor, 0.5, 0.0);
|
||
}
|
||
```
|