SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 03/10/2018, 02:25 PM   #1
bigtigerbeee
Big Clucker
 
bigtigerbeee's Avatar
 
Join Date: Oct 2012
Location: Thailand
Posts: 107
Reputation: 6
Default 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:
  • 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

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

Output


If I replace all vowel to other normal character, Text will show normally because some vowel (TH lang) will merge with nearby character. Ex.

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

Last edited by bigtigerbeee; 25/10/2018 at 09:25 AM.
bigtigerbeee is offline   Reply With Quote
Old 03/10/2018, 04:41 PM   #2
Tenka
Little Clucker
 
Tenka's Avatar
 
Join Date: Nov 2016
Location: MdpM0n8RLK
Posts: 39
Reputation: 2
Default Re: Color Embled Fix (CEFix)

Quote:
Originally Posted by ****** View Post
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.
Tenka is online now   Reply With Quote
Old 03/10/2018, 04:44 PM   #3
J0sh...
Banned
 
Join Date: Aug 2014
Location: Hamburger
Posts: 1,297
Reputation: 461
Default 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...
J0sh... is offline   Reply With Quote
Old 03/10/2018, 04:51 PM   #4
bigtigerbeee
Big Clucker
 
bigtigerbeee's Avatar
 
Join Date: Oct 2012
Location: Thailand
Posts: 107
Reputation: 6
Default 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 ?

Last edited by bigtigerbeee; 24/10/2018 at 03:37 PM.
bigtigerbeee is offline   Reply With Quote
Old 04/10/2018, 03:52 AM   #5
bigtigerbeee
Big Clucker
 
bigtigerbeee's Avatar
 
Join Date: Oct 2012
Location: Thailand
Posts: 107
Reputation: 6
Default Re: Color Embled Fix (CEFix)

Quote:
Originally Posted by ****** View Post
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



new then above


Last edited by bigtigerbeee; 24/10/2018 at 01:53 PM.
bigtigerbeee is offline   Reply With Quote
Old 04/10/2018, 03:36 PM   #6
IllidanS4
Huge Clucker
 
IllidanS4's Avatar
 
Join Date: Feb 2013
Posts: 343
Reputation: 260
Default 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.
__________________
• PawnPlus •
• YSF •
• Yet Another Lua Plugin •
• Long Function Names •
• i_quat.inc •


kingsofsa.cz:8888 running Cinematic Mode
IllidanS4 is offline   Reply With Quote
Old 23/10/2018, 10:23 AM   #7
bigtigerbeee
Big Clucker
 
bigtigerbeee's Avatar
 
Join Date: Oct 2012
Location: Thailand
Posts: 107
Reputation: 6
Default 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:
  • 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

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.






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!!

Last edited by bigtigerbeee; 25/10/2018 at 09:28 AM.
bigtigerbeee is offline   Reply With Quote
Old 26/10/2018, 07:46 AM   #8
Verc
Banned
 
Join Date: Apr 2018
Location: 🇯🇵
Posts: 175
Reputation: 42
Default Re: Color Embled Fix (CEFix)

There isn't any active member from Thai since I visited this forum(2012) so yeah.
Good job anyway.
Verc is offline   Reply With Quote
Old 26/10/2018, 06:54 PM   #9
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,921
Reputation: 258
Default 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!
__________________
actor_plus - v5.0.2
« I'm a goner, somebody catch my breath,
I'm a goner, somebody catch my breath »
Dayrion is offline   Reply With Quote
Old 26/10/2018, 07:31 PM   #10
bigtigerbeee
Big Clucker
 
bigtigerbeee's Avatar
 
Join Date: Oct 2012
Location: Thailand
Posts: 107
Reputation: 6
Default Re: Color Embled Fix (CEFix)

Quote:
Originally Posted by Dayrion View Post
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 View Post
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.
bigtigerbeee is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] [INC]Screen Fader -- Supports color-to-color fades! Joe Staff Includes 97 20/11/2018 05:39 PM
Get Player color and change vehicle color to the player color gurmani11 Scripting Help 4 03/07/2015 11:34 AM
Change color whith hidden color for coins TheLastShadow Scripting Help 1 16/12/2014 09:57 AM
[Include] [INC] Color Inlcude (Most used color defines in one include!) (New Link) Oxside Includes 19 14/05/2014 05:42 PM
Go back to default text color after using embedded color? 101 Scripting Help 4 03/07/2013 11:09 PM


All times are GMT. The time now is 04:06 PM.


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