Commit graph

53 commits

Author SHA1 Message Date
Jupeyy e54da1b396 Cleanup backend a bit for vulkan 2022-03-20 18:03:25 +01:00
ChillerDragon b770bc6988 Use ETextAlignment enum for UI
Replaces the magic numbers -1/0/1 for left/center/right

Based on the work done in upstream:

@cinaera added alignment enums
	04ee8b20a1

@TsFreddie renamed them
	67651e8122
2022-01-21 16:26:19 +01:00
Jupeyy fd68cc3a05 Add basic selection support for ui ex edit boxes 2021-10-04 19:58:25 +02:00
Jupeyy 08881e8a6f Refactor text renderer 2021-09-15 19:46:58 +02:00
Jupeyy 7f5ca0ffe1 Small graphic refactoring 2021-09-14 00:21:17 +02:00
Дядя Женя 9b4dfc142a Merge branch 'master' into pr_color_picker
# Conflicts:
#	src/game/client/components/chat.h
#	src/game/client/components/menus_settings.cpp
2020-12-13 20:40:33 +03:00
Jupeyy a9631bf9cd Fix text color change 2020-11-08 19:43:01 +01:00
Дядя Женя 638a82b9bb Merge branch 'master' into pr_color_picker 2020-10-30 22:18:47 +03:00
bors[bot] 641d4db676
Merge #3171
3171: Some chat fixes r=def- a=Jupeyy

Very round:
![screenshot_2020-10-22_22-16-56](https://user-images.githubusercontent.com/6654924/96926091-6a4d0280-14b5-11eb-81bf-387019f29562.png)

bit round:
![screenshot_2020-10-22_22-17-33](https://user-images.githubusercontent.com/6654924/96926098-6de08980-14b5-11eb-8086-6b1ffc48bc86.png)

No rounding left:
![screenshot_2020-10-22_22-18-16](https://user-images.githubusercontent.com/6654924/96926111-72a53d80-14b5-11eb-93d3-cb3e4ff8b475.png)

No rounding at all:
![screenshot_2020-10-22_22-18-54](https://user-images.githubusercontent.com/6654924/96926120-76d15b00-14b5-11eb-8ab8-1cb1dfc8c1a8.png)

old chat:
![screenshot_2020-10-22_22-28-43](https://user-images.githubusercontent.com/6654924/96926568-04ad4600-14b6-11eb-92eb-ff3400edc499.png)


Just gave some examples so its easier to see what is nice

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-29 17:04:14 +00:00
Дядя Женя 94e227c8c3 Color picker: Settings UI + Picker Logic, Editboxes left 2020-10-29 03:55:01 +03:00
bors[bot] b0803b26e0
Merge #3077
3077: UI Elements r=def- a=Jupeyy

Build will fail bcs of clang-format,
i'll update this comment to explain.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-26 08:37:25 +00:00
Jupeyy 13c5e039c9 Some chat fixes 2020-10-25 15:57:21 +01:00
bors[bot] e5870ab06f
Merge #3113
3113: Visual Chat Update r=def- a=Banana090

https://github.com/ddnet/ddnet/pull/3093

Co-authored-by: Дядя Женя <spy090@yandex.ru>
2020-10-20 16:03:57 +00:00
Jupeyy 74515d4b95 UI Elements 2020-10-19 23:52:29 +02:00
Дядя Женя 6708a7a69d Chat visual update 2020-10-17 15:50:35 +02:00
Jupeyy 186206d40c Fix and change text cursor 2020-10-17 15:26:33 +02:00
Jupeyy 5ebabe2ece Text alignment 2020-10-07 04:44:35 +02:00
def 61e985457d Clean up font buffers & texturedata 2020-09-30 23:59:33 +02:00
def 3be8a592e5 Run clang-format
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:

$ python scripts/fix_style.py
2020-09-26 21:50:15 +02:00
bors[bot] edb4462f8a
Merge #2814 #2818
2814: Remove saving to other servers r=Learath2 a=def-

sv_sql_valid_servernames is no longer required

2818: Load fonts from memory (fixes #2810) r=Learath2 a=def-

Missing: Freeing the memory again. But not so important since we keep
the same fonts until end of process anyway in our case.

@QingGo Could you give this a try from the Github build artifacts? If not, I can provide you a nightly build.

Co-authored-by: def <dennis@felsin9.de>
2020-09-15 17:16:21 +00:00
Jupeyy 8923116324 Fix entity text 2020-09-14 16:42:21 +02:00
def 77d47a85ee Load fonts from memory (fixes #2810)
Missing: Freeing the memory again. But not so important since we keep
the same fonts until end of process anyway in our case.

@QingGo Could you give this a try from the Github build artifacts?
2020-09-13 23:06:12 +02:00
TsFreddie f71c36285f Textrender: count glyphs and chars separately 2020-09-03 23:53:26 +01:00
def c85ffb90af Revert "Revert Jupeyy's OpenGL changes"
This reverts commit 3eab3f5eb7.
2020-08-29 12:10:53 +02:00
def 3eab3f5eb7 Revert Jupeyy's OpenGL changes
Emergency-revert for 14.5.1 release, too many problems
2020-08-26 20:03:22 +02:00
bors[bot] 9ba36991a9
Merge #2655
2655: Entity text should use space more effectively r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-08-26 16:07:58 +00:00
Jupeyy 410c4b3250 Entity text should use space more effectivly 2020-08-26 15:56:23 +02:00
bors[bot] 694db44ee2
Merge #2598
2598: Allow specifying an OpenGL version manually r=def- a=Jupeyy

Ofc don't merge, we'll test it first, and if we want merge it, i'd need to enable shader compability for OpenGL 4+, and general support for OpenGL 3.1 and 3.2(bcs i think they already don't allow some older GL commands).

Also i never really read in the OpenGL 1.x specification, i remember that older OpenGL versions required glBegin and stuff like that

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-08-25 15:35:30 +00:00
Jupeyy a07e9ac2cf Add OpenGL 1.x, 2.x, 3.x support (fixes #2619) (fixes #2607) 2020-08-22 10:22:51 +02:00
def a388b709d6 Generalize loading fallback fonts 2020-08-20 19:48:08 +02:00
def 446526486d Use two fonts, one as explicit fallback
Merging with fontforge had problems, for example for the Bei (U+5317) in
Beijing, see https://github.com/fontforge/fontforge/issues/4432
2020-08-20 11:13:08 +02:00
Jupeyy 7450e354de Add OpenGL 4.x support & cleanup 2020-08-19 08:42:09 +02:00
Fireball ab9b96ddb2 Backported fix for Text() incorrect parameter type (int -> float)
The original fix was done by @oy for 0.7.4.
2020-07-15 20:49:14 +01:00
Fireball b1c17c3248 Backported fix for TextWidth() parameter mix-up
Fixes #2511 (Stack-buffer-overflows in some UIs).
The original fix was done by @oy for 0.7.4.
2020-07-15 20:48:29 +01:00
Magnus Auvinen 6a6a5f00c9 more typesafty in the graphics. introduced the IGraphics::CTextureHandle
Edited by @ChillerDragon to fit in ddnet
(cherry picked from commit cb95e8dfe8)
2019-11-22 18:08:37 +01:00
Andrii Vynychenko 1671e6fbfc numbers dynamically centered for OpenGL 3.3 2019-08-17 03:42:54 +03:00
Andrew 0fffd7705f Cl_text_entities_size (#1632)
* new command added

* fix code duplication after merge

* merge #1632 suggestions

* align the texture to the center vertically

* refactor

* fix RenderSwitchOverlay

* Update src/engine/client/text.cpp

Co-Authored-By: BannZay <bannzay3@gmail.com>

* Apply suggestions from code review

Co-Authored-By: BannZay <bannzay3@gmail.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-Authored-By: BannZay <bannzay3@gmail.com>

* Apply suggestions from code review
2019-05-06 14:19:10 +02:00
Learath 979d58f830 Use colors in CTextRender 2019-04-27 01:34:20 +03:00
jupeyy 619a33a7d5 text kerning fix, add new text render flags for accurate positioning 2019-01-06 06:42:57 +01:00
Jupeyy 70c06be87e allow non pixel alignment rendering, instead fo changing texture filter
add window resize event, and remove the font size limitation
2018-03-21 15:45:08 +01:00
Jupeyy 62c3074c88 add new text renderer engine to support text buffering, cursors, text
marking and less character texture updates
2018-03-13 21:49:07 +01:00
def 151da9af97 Remove Emojis 2018-01-25 20:03:18 +01:00
Michał 58b0ae5fc7 Possible emoji rendering fix 2017-10-28 09:08:17 +02:00
Jupeyy 9fd1290734 auto adjust font size for entity overlay 2017-09-27 12:19:39 +02:00
Jupeyy 31844d3353 set max width for custom text texture upload and fixing alignments for
texture updates
2017-09-15 03:01:26 +02:00
Jupeyy 2af3393810 add glyph upload for custom textures 2017-09-12 20:11:14 +02:00
oy 06115dd49d added "Whitespace and line Endings cleanup" by GreYFoX 2011-04-13 20:37:12 +02:00
oy 09dc08859d added a function to set the text outline colour and increased readability of nameplates on bright backgrounds. Closes #205 2011-03-13 12:55:00 +01:00
Sworddragon fc9211c777 Updated copyrights 2010-11-20 21:26:06 +01:00
oy 411db8b885 fixed that chat message gets out of the window. Closes #102 2010-10-11 02:29:30 +02:00