03.10.2018, 14:25
(
Last edited by bigtigerbeee; 25/10/2018 at 09:25 AM.
)
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. |
- Suppose 'A' is a normal character like
- Suppose 'B' is a vowel/tone character like
- Suppose 'C' = A+B
If next to 'A' are 'B' they will display like this
{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://sampforum.blast.hk/showthread.php?tid=560702
Pastebin: https://pastebin.com/9x1aidUr