Search found 873 matches

by vrld
Sun Apr 17, 2016 4:41 pm
Forum: Libraries and Tools
Topic: [Lib] SUIT - Simple User Interface Toolkit
Replies: 81
Views: 89477

Re: [Lib] SUIT - Simple User Interface Toolkit

You can use layout:push() and layout:pop() for nested layouts. The main example in the documentation shows how to use it.
by vrld
Tue Apr 12, 2016 8:38 am
Forum: Support and Development
Topic: HC update error [solved]
Replies: 4
Views: 2999

Re: HC update error

Then why do you expect the old interface to work? HC.update is no more. You have to check for collisions yourself. See also the second paragraph in the documentation that Sheepolution linked to.

Sidenote: How did you find the old documentation? That shouldn't be accessible anymore :huh:
by vrld
Tue Apr 12, 2016 8:31 am
Forum: Support and Development
Topic: love2d thinks the number "3" is a bool
Replies: 9
Views: 7304

Re: love2d thinks the number "3" is a bool

Code: Select all

x = v[3] == 2 and v[2] + 1 or v[3] == 4 and v[2] - 1
is equivalent to:

Code: Select all

if v[3] == 2 then
    x = v[2] + 1
elseif v[3] == 4 then
    x = v[2] - 1
else
    x = false
end
Are you sure v[3] is always 2 or 4?
by vrld
Mon Feb 15, 2016 10:59 pm
Forum: General
Topic: New Icons
Replies: 77
Views: 63724

Re: New Icons

It's does not mask, it only very subtly lights up the area outside the circle. I think it looks better that way, but if you want the background to show, change line 35 to:

Code: Select all

color = color * (1.-s) + vec4(141.,178.,210.,255.)/255. * s;
by vrld
Mon Feb 15, 2016 9:58 pm
Forum: General
Topic: New Icons
Replies: 77
Views: 63724

Re: New Icons

I took your code and added a shader that does smooth masking and adds a little shadow like in Davidobot's wallpaper. And there is a little heartbeat. "Made with LÖVE" text is still missing.
by vrld
Tue Jan 19, 2016 8:32 pm
Forum: Support and Development
Topic: Screen Shake effect
Replies: 4
Views: 8179

Re: Screen Shake effect

There is an example in the documentation of hump . If you don't want to use hump, this should work (untested, and should be adapted for use in your game): local t, shakeDuration, shakeMagnitude = 0, -1, 0 function startShake(duration, magnitude) t, shakeDuration, shakeMagnitude = 0, duration or 1, m...
by vrld
Tue Jan 19, 2016 7:36 am
Forum: Libraries and Tools
Topic: [Lib] SUIT - Simple User Interface Toolkit
Replies: 81
Views: 89477

Re: [Lib] SUIT - Simple User Interface Toolkit

Can you post a .love so I can have a look myself?
by vrld
Mon Jan 18, 2016 6:57 pm
Forum: Libraries and Tools
Topic: [Lib] SUIT - Simple User Interface Toolkit
Replies: 81
Views: 89477

Re: [Lib] SUIT - Simple User Interface Toolkit

[Quadruple post] I think the issue is that the UI state is reset in suit.draw(), but hump.gamestate always calls update() before draw. That is, the UI state will not be reset when you enter the menu state again. This is bad design on SUIT's part and will be fixed soon-ish. In the meantime, you can ...
by vrld
Sun Jan 17, 2016 10:43 am
Forum: Support and Development
Topic: Camera movement
Replies: 4
Views: 5448

Re: Camera movement

Do you use a camera library? Which one? Usually, you have to update the camera position together with the player position. hump.camera , has some utilities that make these things easier, e.g.: function love.update(dt) player:update(dt) -- moves player cam:lockPosition(player.x, player.y) -- locks th...
by vrld
Tue Jan 12, 2016 8:16 pm
Forum: Libraries and Tools
Topic: [Lib] SUIT - Simple User Interface Toolkit
Replies: 81
Views: 89477

Re: [Lib] SUIT - Simple User Interface Toolkit

How do I use predefined layouts? Suppose I want to convert following program to use predefined layouts (so I could use "fill" instead of calculating widths):[/code] Better late than never: The (almost) same layout as precomputed layout (with some very recent, not yet documented functions)...