mirror of
https://github.com/seppukudevelopment/seppuku
synced 2025-03-04 03:37:33 +00:00
NotificationsComponent: Fixes bounding box
This commit is contained in:
parent
59773448ce
commit
7fb332bef4
@ -53,12 +53,12 @@ public final class NotificationsComponent extends DraggableHudComponent {
|
||||
|
||||
notification.setX(this.getX() + offsetX);
|
||||
notification.setY(this.getY() + offsetY);
|
||||
notification.setWidth(mc.fontRenderer.getStringWidth(notification.getText()) + 4);
|
||||
notification.setWidth(mc.fontRenderer.getStringWidth(notification.getText()));
|
||||
notification.setHeight(mc.fontRenderer.FONT_HEIGHT + 5);
|
||||
|
||||
RenderUtil.drawRect(notification.getTransitionX(), notification.getTransitionY(), notification.getTransitionX() + notification.getWidth(), notification.getTransitionY() + notification.getHeight(), 0x75101010);
|
||||
RenderUtil.drawRect(notification.getTransitionX(), notification.getTransitionY(), notification.getTransitionX() + notification.getWidth(), (notification.getTransitionY() + 1), notification.getType().getColor());
|
||||
mc.fontRenderer.drawStringWithShadow(notification.getText(), notification.getTransitionX() + 2.0F, notification.getTransitionY() + 4.0F, 0xFFFFFFFF);
|
||||
RenderUtil.drawRect(notification.getTransitionX() - 1, notification.getTransitionY(), notification.getTransitionX() + notification.getWidth() + 1, notification.getTransitionY() + notification.getHeight(), 0x75101010);
|
||||
RenderUtil.drawRect(notification.getTransitionX() - 1, notification.getTransitionY(), notification.getTransitionX() + notification.getWidth() + 1, (notification.getTransitionY() + 1), notification.getType().getColor());
|
||||
mc.fontRenderer.drawStringWithShadow(notification.getText(), notification.getTransitionX(), notification.getTransitionY() + 4.0F, 0xFFFFFFFF);
|
||||
|
||||
final float width = notification.getWidth();
|
||||
if (width >= maxWidth) {
|
||||
|
Loading…
Reference in New Issue
Block a user