admannon   03-10-2013, 09:14 PM
#1
Message Thai Vovel and Outline Fix

สคริปต์เขียนโดย : Admannon (เขียนเองนะครับ)


รายละเอียด :
เป็นสคริปต์แก้สระลอยในภาษาไทย และแก้ตัวอักษรแหว่งได้ด้วย (ถ้าไม่แก้ จะไม่เห็นไม้เอกเลยล่ะ)

สกรีนช๊อต :
ก่อนใช้
[Image: 119untitled.jpg]

หลังใช้
[Image: 18untitled2.jpg]

ลองแบบผสมดูบ้าง
[Image: 120untitled.jpg]

เห็นความแตกต่างหรือยัง /cereal1

วิธีการใช้งาน :
ในสคริปต์นี้ใส่ล่าง Materials ก่อน Main

Code:
#==============================================================================
# ** Message Thai Vovel and Outline Fix
#------------------------------------------------------------------------------
#  By : Admannon
#==============================================================================

#==============================================================================
# ** Window Base
#==============================================================================
class Window_Base < Window
  @@thai_vovel = "ัิีึื่้๊๋็์ุูํฺ"
  #--------------------------------------------------------------------------
  # * Preconvert Control Characters
  #--------------------------------------------------------------------------
  alias thai_fix_convert_escape_characters convert_escape_characters unless $@
  def convert_escape_characters(text)
    result = thai_fix_convert_escape_characters(text).clone
    result.gsub!(/ำ/) { "ํา" }
    result
  end
  #--------------------------------------------------------------------------
  # * Normal Character Processing
  #--------------------------------------------------------------------------
  def process_normal_character(c, pos)
    text_width = text_size(c).width
    draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c)
    pos[:x] += text_width unless @@thai_vovel.include?(c)
  end
end

#==============================================================================
# ** Bitmap
#==============================================================================
class Bitmap
  alias outline_fix_draw_text draw_text unless $@
  def draw_text(*args)
    s = text_size("  ").width
    a = args.size - (args[args.size - 1].is_a?(String) ? 1 : 2)
    args[a] = "  " + args[a].to_s
    if args[0].is_a?(Rect)
      args[0].x -= s
      args[0].width += s
    else
      args[0] -= s
      args[2] += s
    end
    outline_fix_draw_text(*args)
  end
end


ข้อตกลงการนำไปใช้งาน :
สคริปต์นี้ยังมีบัคอยู่บ้าง แนะนำกันได้นะครับ
และที่สำคัญ
/puke/puke/puke/puke/puke/puke/puke/puke/puke/puke/puke

ใครเครดิตถึงผมด้วยนะครับ ผมขอล่ะ

/puke/puke/puke/puke/puke/puke/puke/puke/puke/puke/puke


This post was last modified: 09-12-2024, 06:35 PM by OP_Jum_RPG.
  
Users browsing this thread: 1 Guest(s)
Powered By MyBB, © 2002-2025 MyBB Group.
Made with by Curves UI.