Commit Graph

130 Commits

Author SHA1 Message Date
David Jones 34b7a147dc Change i++ to ++i 2015-08-25 18:33:52 -04:00
Kahrl 6c0c27f662 Fix intlGUIEditBox leak and uninitialized value in Mapper (reported by valgrind) 2015-08-10 08:41:45 +02:00
est31 2c1fd29884 Add MoveSomewhere inventory action
Improve shift+click experience
2015-06-23 20:18:41 +02:00
est31 ea1b17b88f Don't print an error for valid listring[] formspec 2015-06-18 04:25:11 +02:00
est31 7a90b31b30 GUIFormSpecMenu::OnEvent code style update and small refactor
* Make method (more) consistent with current code stlye
* Move index into loop constructor after @rubenwardy's suggestion
* Cache inv_s->getList(s.listname), which removes a possibly bad scenario
of inv_s being null.
* Properly check for validity
2015-06-16 20:33:07 +02:00
est31 c977fbd928 Add list-rings
Adds list-rings, a method to implement item sending between inventories via shift-click.
Nice insider feature: a ring consisting of a single inventory list serves as nice clean-up method.
Also adds them to minimal game, and the standard inventory.
Craft output slots are not supported.
2015-06-16 14:51:26 +02:00
Ilya Zhuravlev b6387b4e0f Use utf-8 in formspecs 2015-06-13 19:49:55 +02:00
est31 617a3d426f Make split method static 2015-06-01 17:04:21 +02:00
kwolekr da34a2b33e Replace instances of std::map<std::string, std::string> with StringMap
Also, clean up surrounding code style
Replace by-value parameter passing with const refs when possible
Fix post-increment of iterators
2015-05-19 16:10:49 -04:00
Craig Robbins 9527984dbc Move globals from main.cpp to more sane locations
Move debug streams to log.cpp|h

Move GUI-related globals to clientlauncher

Move g_settings and g_settings_path to settings.cpp|h

Move g_menuclouds to clouds.cpp|h

Move g_profiler to profiler.cpp|h
2015-04-01 23:04:25 +10:00
kwolekr ddf96c7a17 Fix some minor details from 6d61375 2015-04-01 00:19:10 -04:00
Aaron Suen 6d61375cc7 Clean scaling pre-filter for formspec/HUD. 2015-04-01 00:01:05 -04:00
Craig Robbins de6d5ce2cd Disable double-click -> ESC translation for main menu 2015-03-14 23:41:42 +10:00
est31 140245a76f Unescape tooltip texts
Previously, tooltips didn't unescape escaped formspec texts.
Item descriptions that trigger tooltips like inside inventories or for item_image_button
don't need to get unescaped, as they don't get set using formspec, but from lua.
2015-03-11 14:33:07 +01:00
Craig Robbins e74b8da54e Stop formspecs closing with double-click in empty area
Behaviour on Android remains the same until other alternatives can be devised (if possible)

See #2425 (and the many other -- now closed -- issues reporting this feature as a bug)
2015-03-09 12:42:25 +10:00
Craig Robbins ced6d20295 For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
Loic Blot 0d1eedcccc Replace std::list to std::vector into tile.cpp (m_texture_trash) and move tile.hpp to src/client/ 2015-03-05 11:59:40 +01:00
Loic Blot 5a5854ea9d Move hex.h to util/ 2015-02-21 14:32:35 +01:00
ngosang dd2bb950be Fix Exit to OS button focus in Pause Menu 2015-02-10 21:23:16 +10:00
ShadowNinja 9e2a9b55e1 Reduce gettext wide/narrow and string/char* conversions 2015-02-05 03:24:22 -05:00
onkrot 0fd1ee0380 Performance fixes. 2015-01-13 23:48:56 +10:00
sapier de3888ca09 Remove automatic consistent formspec size <-> font size (now has to be done manually)
Set builtin formspecs to autoscale in order to get consistent formspec look and feel
Uncouple label positioning from font size (May break some formspecs but is required to allow manual font adjustment)
2015-01-09 18:46:24 +01:00
Kahrl 2ab97a7821 Fix logic of checkbox formspec element validity checking 2015-01-09 16:57:54 +01:00
sapier 083d19b3fc Fixes for android
Copy only minetest_game to apk by default
Don't copy .git and .svn folders to apk
Fix bouncing asset copy scrollbar due to long filepaths
Reenable font scaling to fix broken menu on high dpi screens
Implement minetest loglevel to android loglevel mapping
Disable touch digging while moving around
2015-01-06 16:13:39 +01:00
sapier aaec558f85 Fix rounding error in font size making main menu and in game font sizes inconsistent 2015-01-02 16:52:02 +01:00
Kahrl c4624639e6 Fix segfault when dragging mouse out of mainmenu window (#1910) 2014-12-13 00:39:07 +01:00
Kodexky 6ba50aa8f9 Responsive tooltip offset for Android.
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-13 00:43:37 +10:00
Craig Robbins f7f7fec497 (INTERIM) Make sizes of the font in formspecs consistent and not so large
Until a permanent fix can be developed
2014-12-05 02:35:21 +10:00
Craig Robbins f6912f4241 Right mouse button behaviour for craft/inventory If right mousebutton clicked once then don't drop single items into slots. If right mouse button has been clicked and held a second time, drop items as the mouse is moved. In the second case (automatically drop/place items as mouse is moved) only auto-drop into blank slots, or slots that contain the same item. 2014-12-04 23:30:53 +10:00
sapier 39162de15a Make hud use fontengine too
Fix non coding style conforming glb_fontengine to g_fontengine
Fix fonts never been deleted due to grabbed to often
2014-11-30 18:06:54 +01:00
Zefram d1d6a97b1c Scale form elements consistently
The ratios between the sizes of form elements, including text, is now
fixed, aside from variations caused by rounding.  This makes form layout
almost fully predictable, and particularly independent of player's
screen size.  The proportions of non-text elements are the traditional
proportions.

For compatibility, the way in which element positions and sizes are
specified remains unchanged, in all its baroqueness, with one exception.
The exception is that the position of a label[] element is now defined
in terms of the vertically center of the first line of the label,
rather than the bottom of the first line of the label.  This change
allows a label to be precisely aligned with button text or an edit box,
which are positioned in a centering manner.  Label positioning remains
consistent with the previous system, just more precisely defined.

Make multi-line label[] elements work properly.  Previously the code set
a bounding rectangle assuming that there would be only a single line,
and as a result a multi-line label would be cut somewhere in the middle
of the second line.  Now multi-line labels not only work, but have
guaranteed line spacing relative to inventory slots, to aid alignment.

Incidentally fix tabheader[] elements which were being constrained to
the wrong width.

Given an unusually large form, in variable-size mode, the form rendering
system now chooses a scale that will fit the entire form on the screen,
if that doesn't make elements too small.  Fixed-size forms, including the
main menu, are have their sizes fixed in inch terms.  The fixed size for
fixed-size forms and the preferred and minimum sizes for variable-size
forms all scale according to the gui_scaling parameter.
2014-11-30 17:50:09 +01:00
sapier dceb9f7d60 Implement proper font handling 2014-11-30 17:50:09 +01:00
kwolekr f0ae2da89e Fix uninitialized variable warning 2014-10-30 02:53:20 -04:00
Kahrl b49e5cfc70 Remove m_ext_ptr in GUIFormSpecMenu, replaced by refcount mechanism 2014-10-24 21:14:48 +02:00
Craig Robbins 914f850d31 Fix use of unitialized variables in mouse button handling 2014-10-08 14:56:29 -04:00
BlockMen 28438bba27 Add [colorize modifier 2014-10-05 16:49:52 +02:00
BlockMen 61ed56f916 Standardize tooltip row detection 2014-09-28 10:10:43 +02:00
BlockMen b75e7148c2 Fix multilined description in tooltips (fixes #1688) 2014-09-28 08:44:05 +02:00
ShadowNinja fb35cfb2dc Fix GCC reorder warning
Caused by a020d1b653.
2014-09-21 15:23:36 -04:00
sruz25 f6321e277b Add inventory right click drag and drop 2014-09-21 15:23:27 -04:00
BlockMen a020d1b653 Allow taking screenshots of formspecs and move message to chat 2014-09-21 19:15:48 +02:00
Zefram 7d72ac6a69 Make tooltip_show_delay=0 work 2014-07-16 18:06:31 +02:00
Zefram 07f444ed85 Permit non-integer sizes for item_image[] 2014-07-16 17:37:12 +02:00
sapier 65b8b524c0 Add srollbar formspec element 2014-07-16 15:02:56 +02:00
sfan5 eadde1e741 Fix errors/warnings reported by valgrind 2014-07-06 16:33:02 +02:00
sapier 1cc40c0a7c Add support for Android 2.3+
There have been plenty of ppl involved in creating this version.
I don't wanna mention names as I'm sure I'd forget someone so I
just tell where help has been done:
- The partial android versions done by various ppl
- Testing on different android devices
- reviewing code (especially the in core changes)
- testing controls
- reviewing texts

A big thank you to everyone helping this to be completed!
2014-06-29 18:17:56 +02:00
sapier ebf7ea5019 Add formspec api versioning 2014-06-29 12:13:55 +02:00
RealBadAngel 09ba047c01 Add setting for tooltips show delay. 2014-06-25 16:23:05 +02:00
RealBadAngel 27538ecef5 Tooltips rework.
Separate element for tooltips. Delayed showing,
use global color or given ones.
2014-06-24 22:11:47 +02:00
sapier d4245e6cac Support for scalable font and gui elements
Fix positioning of tabheader in order to be usable for scaling GUIs
WARNING: this changes position of current tabheaders, mods have to adjust!
2014-06-22 00:08:55 +02:00