Page 1 of 1

position for formspecs

PostPosted: Sat Jun 28, 2014 15:19
by webdesigner97
Formspecs currently always appear in the center of the screen. IMO it would be nice if we were able to set the position to make it appear e.g. on the bottom right. For some formspecs (e.g. awards or just those showing information), it's not really useful to have them block your screen.

Also it would be nice to be able to tell a form wheter it should block movement of the player or not. For an award, you shouldn't get blocked, while for a little menu you should.

Re: position for formspecs

PostPosted: Sat Jun 28, 2014 19:17
by LionsDen
I like these ideas. +1000

Re: position for formspecs

PostPosted: Sat Jun 28, 2014 19:31
by rubenwardy
Awards should probably use HUDs.

Re: position for formspecs

PostPosted: Sat Jun 28, 2014 19:33
by webdesigner97
rubenwardy wrote:Awards should probably use HUDs.

Well, awards were just an example :) There are of course other situations where this will be useful.

Re: position for formspecs

PostPosted: Sat Jun 28, 2014 19:42
by Krock
A formspec redo has already been discussed earlier, this suggestion here pushes it a bit forward.

Re: position for formspecs

PostPosted: Sun Jun 29, 2014 20:41
by rubenwardy
I tried editing the formspec CPP code, and it is HORRIBLE.

Re: position for formspecs

PostPosted: Sun Jul 06, 2014 02:59
by prestidigitator
I wonder how difficult it would be to have a hotkey which detaches the mouse from the camera. Then maybe HUDs themselves could be made more interactive....

Re: position for formspecs

PostPosted: Sun Jul 06, 2014 14:18
by rubenwardy
prestidigitator wrote:I wonder how difficult it would be to have a hotkey which detaches the mouse from the camera. Then maybe HUDs themselves could be made more interactive....


Not that difficult.

This is the section of the code which controls the mouse to camera relationship:

https://github.com/minetest/minetest/bl ... 2254-L2307

You could replace:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
if((device->isWindowActive() && noMenuActive()) || random_input)


with

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
if((device->isWindowActive() && noMenuActive() && !mouse_detached) || random_input)


where mouse_detached is a boolean which toggles when the hotkey is pressed.