SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Plugin Development (https://forum.sa-mp.com/forumdisplay.php?f=18)
-   -   [Plugin] Color Embled Fix (CEFix) (https://forum.sa-mp.com/showthread.php?t=659441)

bigtigerbeee 03/10/2018 03:25 PM

Color Embled Fix (only for Thai Language)
 
Color Embled Fix

I used two days to develop this plugin however it has some bugs and canít work. This was my first time to develop a plugin on c++. Thai language has tone marks/vowels for example "อ้า อี่ อู่", but in other languages, this becomes useless, and the plugin canít work. I believe SAMP staff will agree that we donít have a good community in Thai to assist us. Our forum looks like "Free system /Asura kills everyone in the server" or "Help me how to make gang/faction on GF game mode" 90% SAMP owned server in Thailand use Godfather Game mode (FeaR) to edit and sell.

Quote:

Edit: Now It work perfectly, In conclusion, the problem of the Thai alphabet is mixed with the tonal, resulting in a shorter text length for the display. So colors are created according to the size of the original text. It can not be used with Thai characters mixed with tonal.
Explain:
simple color embled in English
{00FF00}JKL{FF0000}P: count 4 character, color start after 'L' (index 10) = index 11
Display: JKLP

simple color embled in Thai
{00FF00}AAB{FF0000}A: count 4 character, color start after 'B' (index 10) = index 11 << But not like this...
When display It will be: {00FF00}ACA{FF0000}: count 4 also but vowel/tone will merge to normal character, color start after index 11
Display: ACA
{00FF00}ACA{FF0000} << Here!! red color will disappear.
(My plugin will left shift color embled for 1 step per total vowel found before current embled tag to fix this. example AC{FF0000}A will display correct color like ACA)

Problem:
Input
https://image.ibb.co/hxoMrz/coding.png
Output
https://image.ibb.co/jmb7Wz/diff.png

If I replace all vowel to other normal character, Text will show normally because some vowel (TH lang) will merge with nearby character. Ex. https://image.ibb.co/gkknop/Untitled.png

Embed color will show not correctly on their position.


Download: https://github.com/aktah/SAMP-CEFix

If possible, I would like you to create this or revise it.... (I don't know this call bug or something...)

Issue thread:
- https://forum.sa-mp.com/showthread.php?t=560702


Pastebin: https://pastebin.com/9x1aidUr

Tenka 03/10/2018 05:41 PM

Re: Color Embled Fix (CEFix)
 
Quote:

Originally Posted by ****** (Post 4056276)
1) You need the source code, regardless of its state, before you can release something.

2) Does this work for all of unicode, or just one language (looks like Thai, but I can't be certain)? Thanks.

2) I think hes only test for Thai language because this thing just happen to Thai language or some language probably.

J0sh... 03/10/2018 05:44 PM

Re: Color Embled Fix (CEFix)
 
Please post that code in your post.
So Kalcor can easily test it without having to go through the issue of trying to recreate it from a picture...

bigtigerbeee 03/10/2018 05:51 PM

Re: Color Embled Fix (CEFix)
 
This plugin use simple source from https://forum.sa-mp.com/showthread.php?t=295798
(developed on MVC++ 2010)


Quote:

2) Does this work for all of unicode, or just one language (looks like Thai, but I can't be certain)? Thanks.
I'm only fixes some characters with problems. It needs someone to write this system. I don't know this prob shown only Thai language or not ?

bigtigerbeee 04/10/2018 04:52 AM

Re: Color Embled Fix (CEFix)
 
Quote:

Originally Posted by ****** (Post 4056333)
It seems to me that a simpler solution would be to look up each character's unicode class and use that to determine how to move the colour position.

What do you recommend to me ? I would like to make plugin useful more than this.

old version
https://preview.ibb.co/f9YRte/sa_mp_088.png
https://preview.ibb.co/naRCYe/sa_mp_089.png

new then above
https://preview.ibb.co/ca8gRz/sa_mp_090.png
https://preview.ibb.co/fSJFmz/sa_mp_091.png

IllidanS4 04/10/2018 04:36 PM

Re: Color Embled Fix (CEFix)
 
This looks very useful, but I have no idea from your description what it actually does and how it works.

bigtigerbeee 23/10/2018 11:23 AM

Re: Color Embled Fix (CEFix)
 
Now release 2.0, it work perfectly. (not support on /fontsize 1 and 4 )

In conclusion, the problem of the Thai alphabet is mixed with the tonal, resulting in a shorter text length for the display. So colors are created according to the size of the original text. It can not be used with Thai characters mixed with tonal.

Release source code: Github

Explain:
simple color embled in English
{00FF00}JKL{FF0000}P: count 4 character, color start after 'L' (index 10) = index 11
Display: JKLP

simple color embled in Thai
{00FF00}AAB{FF0000}A: count 4 character, color start after 'B' (index 10) = index 11 << But not like this...
When display It will be: {00FF00}ACA{FF0000}: count 4 also but vowel/tone will merge to normal character, color start after index 11
Display: ACA
{00FF00}ACA{FF0000} << Here!! red color will disappear.
(My plugin will left shift color embled for 1 step per total vowel found before current embled tag to fix this. example AC{FF0000}A will display correct color like ACA)

And have more some vowel with blank space " " need to shift too. Going github for more information.

https://i.imgur.com/IAQkK30.png
https://i.imgur.com/hIkIg3a.png
https://i.imgur.com/22N1tTZ.png
https://i.imgur.com/ubKPmcN.png

I think my post was ignored. Just because it does not involve you. We feel so bad

We could not get a good reception, maybe because of Alien language. Good luck!!

Verc 26/10/2018 08:46 AM

Re: Color Embled Fix (CEFix)
 
There isn't any active member from Thai since I visited this forum(2012) so yeah.
Good job anyway.

Dayrion 26/10/2018 07:54 PM

Re: Color Embled Fix (CEFix)
 
What a beautiful language you have. Unfortunately, I don't speak it. Good job for your plugin which seems to solve a serious problem!

bigtigerbeee 26/10/2018 08:31 PM

Re: Color Embled Fix (CEFix)
 
Quote:

Originally Posted by Dayrion (Post 4061060)
What a beautiful language you have. Unfortunately, I don't speak it. Good job for your plugin which seems to solve a serious problem!

Quote:

Originally Posted by Verc (Post 4060944)
There isn't any active member from Thai since I visited this forum(2012) so yeah.
Good job anyway.


I'm glad to hear that, Maybe someone has to use it in the future.


All times are GMT. The time now is 10:15 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.