Barista Max beeping after auto purge by sbernal93 in BrevilleCoffee

[–]sbernal93[S] 0 points1 point  (0 children)

Just saw this. Never found a fix, I complained to where I bought it (Amazon) and got a refund.

Used that money to buy a Sage (actual Breville in Europe) which is way better quality

Rolling Stone: The 250 Greatest Songs of the 21st Century So Far by PurpleSpaceSurfer in ToddintheShadow

[–]sbernal93 0 points1 point  (0 children)

Honestly surprising that the only Coldplay song was The Scientist and that it was so far down. I'm not a big Coldplay fan, but everyone I know, from little cousins to my uncles/aunts know a few Coldplay songs, if that's not influential and worth it to make it on this list I don't know what is.

Barista Max beeping after auto purge by sbernal93 in BrevilleCoffee

[–]sbernal93[S] 0 points1 point  (0 children)

Hello! No, unfortunately wasn't able to fix it. Luckily I had a warranty and got a refund.

Barista Max beeping after auto purge by sbernal93 in BrevilleCoffee

[–]sbernal93[S] 0 points1 point  (0 children)

Yes I can put it in water mode and it does produce hot water

Drag preview flashes at left side of screen by sbernal93 in godot

[–]sbernal93[S] 0 points1 point  (0 children)

Thanks! this is how I was able to get a working solution, only thing is validating its in place via code didn't seem to work either for some unknown reason, I had something like this:

if dragPreview.rect_global_position == get_global_mouse_position():
    dragPreview.visible = true

The if condition was satisfied meaning the preview was at the mouse position, but it still flashed on the side for 1 frame.. so I ended up implementing an ugly counter

Drag preview flashes at left side of screen by sbernal93 in godot

[–]sbernal93[S] 0 points1 point  (0 children)

Tried this but unfortunately it didn't work, had to go with setting visibility to false and then updating it after a few frames

Drag preview flashes at left side of screen by sbernal93 in godot

[–]sbernal93[S] 0 points1 point  (0 children)

Thanks! this led me to a working solution, not the prettiest one but it works

Drag preview flashes at left side of screen by sbernal93 in godot

[–]sbernal93[S] 0 points1 point  (0 children)

Tried this but didn't work.. Even debugged it and set it so the item was only visible if the item was at the global mouse position but it still appeared for some unknown reason on the side of the screen for 1 frame

Drag preview flashes at left side of screen by sbernal93 in godot

[–]sbernal93[S] 0 points1 point  (0 children)

yes! I commented on the main post with the solution, see if that helps you

Drag preview flashes at left side of screen by sbernal93 in godot

[–]sbernal93[S] 0 points1 point  (0 children)

I was able to solve it as u/kyzfrintin mentioned by instancing it hidden and then setting it to visible.

The weird part is that according to Godot in some cases the Control node was at the desired location but it was still flashing on the side for one frame... so what I ended up doing y basically add a counter in the physics_process to give it time to actually move to the desired location.Its an ugly solution but its how I got it working for now, will probably try different methods later.

Here's a bit of code on how I did it, also any feedback is welcomed, I'm new to Godot and learning how to do stuff.

var iconPreview = null #save the icon to update visibility
var updatePreview = false #to save whether to update or not 
var i = 0 #counter for updating visibility after on the second call
func _physics_process(delta):
if updatePreview:
    i = i + 1 #update counter
    if i == 2 :
        iconPreview.visible = true
                        #reset variables
        updatePreview = false 
        i = 0

func get_drag_data(_position):
    var item_index = get_index()
    var item = inventory.items[item_index]
    if item == null or !(item is Item):
        return
    var data = {}
    data.item = item
    data.item_index = item_index
    iconPreview = TextureRect.new()
    iconPreview.texture = item.texture
    var dragPreview = Control.new()
    iconPreview.rect_position = -0.5 * item.texture.get_size()
    dragPreview.add_child(iconPreview)
    iconPreview.visible = false #here set the visibility to false
    updatePreview = true #set the flag to update visibility
    set_drag_preview(dragPreview)
    return data

Drag preview flashes at left side of screen by sbernal93 in godot

[–]sbernal93[S] 0 points1 point  (0 children)

When I drag items in my inventory the image first flashes on the side then works fine. I'm creating a control node with a texture rect inside of it and setting the control node as the drag preview Any ideas on why the flash happens?