mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-21 04:32:32 +00:00
Widget(Dyn)Label should use DrawTarget.drawText
This commit is contained in:
1 parent
26137a88d7
commit
273735a976
3 files changed
+8
-14
No files matched your search
@@ -1,6 +0,0 @@
|
||||
import net.bdew.lib.gui._
|
||||
|
||||
val a = Rect(1, 1, 2, 2)
|
||||
|
||||
a.contains(Point(1.5F, 1.5F))
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
package net.bdew.lib.gui.widgets
|
||||
|
||||
import net.bdew.lib.gui.{Point, Rect}
|
||||
import net.bdew.lib.gui.{Color, Point, Rect}
|
||||
|
||||
class WidgetDynLabel(text: => String, x: Int, y: Int, color: Int) extends Widget {
|
||||
val rect: Rect = new Rect(x, y, 0, 0)
|
||||
class WidgetDynLabel(text: => String, x: Int, y: Int, color: Color) extends Widget {
|
||||
val rect = new Rect(x, y, 0, 0)
|
||||
override def draw(mouse: Point) {
|
||||
parent.getFontRenderer.drawString(text, x, y, color)
|
||||
parent.drawText(text, rect.origin, color, false)
|
||||
}
|
||||
}
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
package net.bdew.lib.gui.widgets
|
||||
|
||||
import net.bdew.lib.gui.{Point, Rect}
|
||||
import net.bdew.lib.gui.{Color, Point, Rect}
|
||||
|
||||
class WidgetLabel(text: String, x: Int, y: Int, color: Int) extends Widget {
|
||||
val rect: Rect = new Rect(x, y, 0, 0)
|
||||
class WidgetLabel(text: String, x: Int, y: Int, color: Color) extends Widget {
|
||||
val rect = new Rect(x, y, 0, 0)
|
||||
override def draw(mouse: Point) {
|
||||
parent.getFontRenderer.drawString(text, x, y, color)
|
||||
parent.drawText(text, rect.origin, color, false)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user