position for formspecs

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

position for formspecs

by webdesigner97 » Sat Jun 28, 2014 15:19

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.
 

User avatar
LionsDen
Member
 
Posts: 525
Joined: Thu Jun 06, 2013 03:19

Re: position for formspecs

by LionsDen » Sat Jun 28, 2014 19:17

I like these ideas. +1000
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: position for formspecs

by rubenwardy » Sat Jun 28, 2014 19:31

Awards should probably use HUDs.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: position for formspecs

by webdesigner97 » Sat Jun 28, 2014 19:33

rubenwardy wrote:Awards should probably use HUDs.

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

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: position for formspecs

by Krock » Sat Jun 28, 2014 19:42

A formspec redo has already been discussed earlier, this suggestion here pushes it a bit forward.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: position for formspecs

by rubenwardy » Sun Jun 29, 2014 20:41

I tried editing the formspec CPP code, and it is HORRIBLE.
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

Re: position for formspecs

by prestidigitator » Sun Jul 06, 2014 02:59

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....
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: position for formspecs

by rubenwardy » Sun Jul 06, 2014 14:18

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.
 


Return to Minetest Features

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron