49 Commits

Author SHA1 Message Date
Ekdohibs
ce488ea7f4 Escape more strings: formspecs, item descriptions, infotexts...
Also, change the escape character to the more standard \x1b
Thus, it can be used in the future for translation or colored text,
for example.
2016-04-24 03:54:11 +10:00
rubenwardy
3f47cc7f5d Fix inventory hud scaling 2016-04-12 23:10:28 +10:00
PilzAdam
06bb87f15d Fix hotbar placement on displays with low screen density 2016-04-11 23:04:42 +02:00
kwolekr
81e06b1f01 Hud: Cache hud_scaling, fix minor style issues 2016-04-10 23:54:34 -04:00
rubenwardy
cbff06cadc Hud: Fix offset being ignored by inventory bar 2016-04-10 23:54:23 -04:00
RealBadAngel
786beec51b Use single box for halo mesh 2016-02-11 13:11:25 +01:00
RealBadAngel
8b602bba0f Cleanup selection mesh code, add shaders for halo and selection boxes 2016-02-08 03:57:42 -05:00
est31
3bb1d941ad small drawItemStack cleanup
-> Replace the three bool params with an enum
-> Add struct for the static content, leads to less repetition
-> cache enable_animations setting
2016-02-08 00:35:24 +01:00
RealBadAngel
013ef76173 Use meshes to display inventory items 2016-02-07 19:51:55 +01:00
David Jones
9d1284b324 Change i++ to ++i 2015-08-25 18:33:52 -04:00
est31
dd302e0032 Use UTF-8 instead of narrow
Use wide_to_utf8 and utf8_to_wide instead of wide_to_narrow and narrow_to_wide at almost all places.
Only exceptions: test functions for narrow conversion, and chat, which is done in a separate commit.
2015-07-08 10:12:44 +02:00
Craig Robbins
0731f9ed2a 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
Aaron Suen
e8d51554ae Clean scaling pre-filter for formspec/HUD. 2015-04-01 00:01:05 -04:00
Loic Blot
188c15c3d8 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
kwolekr
50d5b59eeb Hud: Modify Y-positioning of health/breath starbars to prevent overlapping with Hotbar 2015-02-08 12:47:45 -05:00
sapier
5d689693ae Split gui_scaling to gui_scaling + hud_scaling as those elements need different handling on some devices 2015-01-09 14:31:33 +01:00
SmallJoker
30a051a904 Fix MSVC build
Note: The unit test was technically incorrect for all platforms but passes due to implicit casting
2014-12-05 16:09:53 +10:00
sapier
71a289a979 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
sapier
268ff61168 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
d23ac22ad9 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
sapier
1bc27bc115 Small cleanup of hud add/remove code 2014-05-31 22:32:44 +02:00
sapier
1d6a1f727d Add support for interlaced polarized 3d screens
Add (experimental) support for topbottom as well as sidebyside 3d mode
2014-05-18 01:08:13 +02:00
sapier
72ba414bf1 Fix old client showing duplicated health bar on new server
Fix client not showing hearts and bubbles on connecting to old server
Fix server not remembering hud flags correctly
2014-05-11 22:34:44 +02:00
sapier
56702c92f8 Fix incorrect scaling of customized hud item selection marker 2014-05-11 13:26:23 +02:00
sapier
d83d1a95b7 Fix heart + bubble bar size on different texture packs
Add DPI support for statbar
Move heart+bubble bar to Lua HUD
Add statbar size (based upon an idea by blue42u)
Add support for customizing breath and statbar
2014-05-07 21:46:27 +02:00
RealBadAngel
b14b428096 Bugfix: make waypoints respect camera offset 2014-05-05 09:03:37 +02:00
sapier
9f48edc5f5 Fix rounding issue of hud dpi on some machines 2014-04-27 22:44:37 +02:00
sapier
f4753a9cd4 Add support for dpi based HUD scaling
Add support for (configurable) multiline hotbar
Improved screensize handling
Add userdefined gui scale by BlockMen
2014-04-27 21:53:13 +02:00
Perttu Ahola
18e2af95ea Client: Don't crash if trying to draw too many items from inventory in HUD 2014-04-27 09:49:19 +03:00
BlockMen
a5db2961b2 Add player:set_eye_offset() by @MirceaKitsune and clean up 2014-04-12 17:44:20 +02:00
BlockMen
8909fe913c Add third person view 2014-04-12 17:44:15 +02:00
sapier
bc7084892d Cleanup client init states by bumping protocol version
Don't use TOSERVER_RECEIVED_MEDIA but TOSERVER_CLIENT_READY as indicatio for client ready
Handle clients with protocol version < 23 (almost) same way as before
Make client tell server about it's version
Add client state to not send bogus player position updates prior init complete
Add access to statistics information (peer connction time,rtt,version)
Fix clients standing stalled in world while preloading item visuals (new clients only)
Add get_player_information to read client specific information from lua
2014-04-08 21:12:20 +02:00
RealBadAngel
6d28b11897 New HUD element - waypoint. 2014-01-26 21:31:59 +01:00
BlockMen
89896b73fb Add option to scale image to percentage values 2013-09-20 20:03:58 +02:00
BlockMen
9fd8f6091e Fix hotbar padding at bottom 2013-09-10 23:39:38 +02:00
PilzAdam
49f6e00cf3 Use player:set_hotbar_image() instead of hardcoded hotbar.png 2013-09-05 00:21:16 +02:00
BlockMen
a7e604de67 Add support for using textures in hotbar 2013-08-25 18:49:10 +02:00
Kahrl
ee90d438b8 Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
Kahrl
46340cbbe0 Remove texture atlas / AtlasPointer, rename getTextureRaw to getTexture 2013-07-02 03:03:10 +02:00
PilzAdam
942228a796 Add drowning 2013-06-19 15:47:00 +00:00
Kahrl
780a234d48 Add ObjectRef.hud_set_hotbar_itemcount and add TOCLIENT_HUD_SET_PARAM 2013-05-26 00:23:33 +02:00
kwolekr
a7e732f387 Minor hud.cpp cleanup 2013-04-25 20:56:12 -04:00
Esteban I. Ruiz Moreno
560a1cd794 Ability to change the crosshair using textures 2013-04-25 20:07:46 -04:00
kwolekr
c3b246b585 Generalize hud_builtin_enable into hud_set_flags 2013-04-25 19:37:36 -04:00
Diego Martínez
b02e6b1403 Added support to disable built-in HUD elements 2013-04-24 17:28:00 +03:00
Diego Martínez
f2e5d4ebe2 Added offset support for HUD items 2013-04-23 09:34:11 +03:00
Diego Martínez
cf39a2950a Added support for alignment in HUD items 2013-04-23 09:34:10 +03:00
kwolekr
b1ab2a5c35 Add direction parameter to statbars in HUD API
Fix health bar overlap when a larger texture is used
2013-04-20 00:22:12 -04:00
kwolekr
45409b509b Split HUD code off to hud.cpp, make into a class, extensive Lua HUD modification 2013-04-18 02:19:31 -04:00