fixes so that it builds w/ strife api changes

This commit is contained in:
Felix Angell 2018-06-09 09:28:47 +01:00
parent 6d5a4c2610
commit 27836e01b8
2 changed files with 4 additions and 5 deletions

View File

@ -210,7 +210,7 @@ func (s *selection) renderAt(ctx *strife.Renderer, xOff int, yOff int) {
width = s.ex * last_w
}
xPos := (s.sx)
xPos := (s.sx * last_w)
yPos := ((s.sy + y) * (last_h + pad))
ctx.SetColor(strife.Blue)
@ -1114,8 +1114,7 @@ var last = time.Now()
func (b *Buffer) processLeftClick() {
// here we set the cursor y position
// based off the click location
coords := strife.MouseCoords()
xPos, yPos := coords[0], coords[1]
xPos, yPos := strife.MouseCoords()
yPosToLine := (((yPos) / (last_h + pad)) + 1) + b.cam.y
xPosToLine := ((xPos - b.ex) / (last_w)) + b.cam.x

View File

@ -316,8 +316,8 @@ func (n *View) OnRender(ctx *strife.Renderer) {
if DEBUG_MODE {
ctx.SetColor(strife.HexRGB(0xff00ff))
mPos := strife.MouseCoords()
ctx.Rect(mPos[0], mPos[1], 16, 16, strife.Line)
mx, my := strife.MouseCoords()
ctx.Rect(mx, my, 16, 16, strife.Line)
renderDebugPane(ctx, 10, 10)
}