Skip to content

Commit

Permalink
Fixes images wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
brainrom committed Nov 4, 2022
1 parent 4a07fd4 commit d722eb9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ local layout = { prev_x = 0, prev_y = 0, prev_w = 0, prev_h = 0, row_h = 0, tota
local input = { interaction_toggle_device = "hand/left", interaction_toggle_button = "thumbstick", interaction_enabled = true, trigger = e_trigger.idle,
pointer_rotation = math.pi / 3 }
local osk = { textures = {}, visible = false, prev_frame_visible = false, transform = lovr.math.newMat4(), mode = {}, cur_mode = 1, last_key = nil }
local clamp_sampler = lovr.graphics.newSampler({wrap = 'clamp'})

color_themes.dark =
{
Expand Down Expand Up @@ -784,6 +785,7 @@ function UI.End( main_pass )
local m = lovr.math.newMat4( vec3( v.bbox.x + (v.bbox.w / 2), v.bbox.y + (v.bbox.h / 2), 0 ), vec3( v.bbox.w, -v.bbox.h, 0 ) )
cur_window.pass:setColor( v.color )
cur_window.pass:setMaterial( v.texture )
cur_window.pass:setSampler(clamp_sampler)
cur_window.pass:plane( m, "fill" )
cur_window.pass:setMaterial()
cur_window.pass:setColor( 1, 1, 1 )
Expand Down

0 comments on commit d722eb9

Please sign in to comment.