ZenScript main repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DSimpleTooltipStyle.java 1.1KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package org.openzen.drawablegui;
  7. import org.openzen.drawablegui.border.DBorder;
  8. import org.openzen.drawablegui.border.DCompositeBorder;
  9. import org.openzen.drawablegui.border.DLineBorder;
  10. import org.openzen.drawablegui.border.DPaddedBorder;
  11. import org.openzen.drawablegui.style.DStyleDefinition;
  12. /**
  13. *
  14. * @author Hoofdgebruiker
  15. */
  16. public class DSimpleTooltipStyle {
  17. public final DBorder border;
  18. public final DFont font;
  19. public final int backgroundColor;
  20. public final int textColor;
  21. public DSimpleTooltipStyle(DStyleDefinition style) {
  22. border = style.getBorder("border", context -> new DCompositeBorder(
  23. new DLineBorder(0xFF000000, 1),
  24. new DPaddedBorder(context.dp(4), context.dp(4), context.dp(4), context.dp(4))));
  25. font = style.getFont("font", context -> new DFont(DFontFamily.UI, false, false, false, context.sp(12)));
  26. backgroundColor = style.getColor("backgroundColor", 0xFFFFFFE1);
  27. textColor = style.getColor("textColor", 0xFF000000);
  28. }
  29. }