조회 수 167 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

>게임을 만드는 도중, 크나큰 문제에 봉착했습니다.
>이런저런 스크립트를 끼워넣고, 이벤트를 만드는 도중...
>이벤트에서 선택지 만들었는데...
>
>선택지를 알 수 있는.. 그러니까 회색 커서가 안보입니다.
>무엇을 선택했는지를 알 수가 없어요 ㅠ.ㅠ
>
>뭐가 문제일까요...
>(훌쩍)
>
>타이틀에서는 멀쩡히 잘 나오던데....
>
>아시는 분... 좀 도와주세요~ 뭐가 문제인지도 모르겠어요 ㅠ.ㅠ
>
>
>
>덧. 대화창에 사용하는 - 명령어 문자를 쓰기 위한 스크립트를 추가하니
>그리 되었다는 것은 알았지만.... 몽땅 일본어라 뭘 어떻게 고쳐야 할 지... ㅠ.ㅠ
>고수분들... 도와주세요~~~



메세지 스크립트 최신 버젼을 사용하셔야 할 것 같습니다.

일단, 제가 쓰고 있는 메세지 스크립트를 올려드리겠습니다. 그래도 안되면( 안될리 없지만...요.. )

다른 메세지 스크립트를 찾아보시길...

# 겈겂겈 XRXS 9. 긽긞긜?긙?렑긲깑긐깒?긤귺긞긵 ver..12d 겈겂겈
# by 랎됰 띪뱘, 쁝딍, RaTTiE

#==============================================================================
# 걾 Window_Message
#==============================================================================
class Window_Message < Window_Selectable
  # 덇빒럻궦궰?롃
  DEFAULT_TYPING_ENABLE = true                # false궸궥귡궴뢷듩?렑
  #--------------------------------------------------------------------------
  # 걶 긆긳긙긃긏긣룊딖돸
  #--------------------------------------------------------------------------
  alias xrxs9_initialize initialize
  def initialize
    xrxs9_initialize
    # 띋맯긖긂깛긤뼹궕궶궋뤾뜃궼""궴궥귡
    if $soundname_on_speak == nil then
      $soundname_on_speak = ""
    end
    # 둖럻긲?귽깑긬긚먠믦
    $gaiji_file = "./Graphics/Gaiji/sample.png"
    # 둖럻긢??벶귒뜛귒
    if FileTest.exist?($gaiji_file)
      @gaiji_cache = Bitmap.new($gaiji_file)
    else
      @gaigi_cache = nil
    end
    # 빒럻벁됡?몭뾭긫긞긲?
    @opacity_text_buf = Bitmap.new(32, 32)
  end
  #--------------------------------------------------------------------------
  # 걶 긽긞긜?긙뢎뿹룉뿚
  #--------------------------------------------------------------------------
  alias xrxs9_terminate_message terminate_message
  def terminate_message
    if @name_window_frame != nil
      @name_window_frame.dispose
      @name_window_frame = nil
    end
    if @name_window_text  != nil
      @name_window_text.dispose
      @name_window_text  = nil
    end
    xrxs9_terminate_message
  end
  #--------------------------------------------------------------------------
  # 걶 깏긲깒긞긘깄
  #--------------------------------------------------------------------------
  def refresh
    # 룊딖돸
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.font.size  = Font.default_size
    @x = @y = @max_x = @max_y = @indent = @lines = 0
    @face_indent = 0
    @opacity = 255
    @cursor_width = 0
    @write_speed = 0
    @write_wait = 0
    @mid_stop = false
    @face_file = nil
    # @popchar 궕 -2 궻뤾뜃갂뷭?댧뭫갃-1궻뤾뜃갂빒럻긜깛??갃
    # 0댥뤵궻뤾뜃?긌긿깋?긞긵갃0궼롥릐?A1댥?궼귽긹깛긣갃
    @popchar = -2
    # 멗묖럥궶귞럻돷궛귩뛱궎
    if $game_temp.choice_start == 0
      @x = 8
    end
    # ?렑뫲궭궻긽긞긜?긙궕궇귡뤾뜃
    if $game_temp.message_text != nil
      @now_text = $game_temp.message_text
      # 딁?렑럚믦F궕궇귡궔갎
      if (/A\[Ff][(.+?)]/.match(@now_text))!=nil then
        # 긲?귽깑?긃긞긏
        if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
          # 딁긐깋귩?됪
          @face_file = $1 + ".png"
          self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
          # 멣뛱 128긯긏긜깑궻귽깛긢깛긣귩볺귢귡갃
          @x = @face_indent = 128
        end
        @now_text.gsub!(/\[Ff][(.*?)]/) { "" }
      end
      # 맕뚥빒럻룉뿚
      begin
      last_text = @now_text.clone
      # V귩벲렔깑??깛궸빾뛛(믁돿븫빁)
      @now_text.gsub!(/\[Vv][([IiWwAaSs]?)([0-9]+)]/) { convart_value($1, $2.to_i) }
      end until @now_text == last_text
      @now_text.gsub!(/\[Nn][([0-9]+)]/) do
        $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
      end
      # name궕궇귡궔갎
      name_window_set = false
      if (/\[Nn]ame[(.+?)]/.match(@now_text)) != nil
        # 뭠귩먠믦
        name_window_set = true
        name_text = $1
        # name[]븫빁귩랁룣
        @now_text.sub!(/\[Nn]ame[(.*?)]/) { "" }
      end
      # 긂귻깛긤긂댧뭫뵽믦
      if (/\[Pp][([-1,0-9]+)]/.match(@now_text))!=nil then
        @popchar = $1.to_i
        if @popchar == -1
          @x = @indent = 48
          @y = 4
        end
        @now_text.gsub!(/\[Pp][([-1,0-9]+)]/) { "" }
      end
      # 긂귻깛긤긂븴궻롦벦
      @max_choice_x = 0
      if @popchar >= 0
        @text_save = @now_text.clone
        @max_x = 0
        @max_y = 4
        for i in 0..3
          line = @now_text.split(/n/)[3-i]
          @max_y -= 1 if line == nil and @max_y <= 4-i
          next if line == nil
          line.gsub!(/\w[(w+)]/) { "" }
          cx = contents.text_size(line).width
          @max_x = cx if cx > @max_x
          if i >= $game_temp.choice_start
            @max_choice_x = cx if cx > @max_choice_x
          end
        end
        self.width = @max_x + 32 + @face_indent
        self.height = (@max_y - 1) * 32 + 64
        @max_choice_x -= 68
        @max_choice_x -= @face_indent*216/128
      else
        @max_x = self.width - 32 - @face_indent
        for i in 0..3
          line = @now_text.split(/n/)[i]
          next if line == nil
          line.gsub!(/\w[(w+)]/) { "" }
          cx = contents.text_size(line).width
          if i >= $game_temp.choice_start
            @max_choice_x = cx if cx > @max_choice_x
          end
        end
        @max_choice_x += 8
      end
      # 멗묖럥궶귞긇??깑궻븴귩뛛륷
      @cursor_width = 0
      #if @lines >= $game_temp.choice_start
      #  @cursor_width = [@cursor_width, @max_choice_x - @face_indent].max
      #end
      # 뺇딿뤵갂"\\" 귩 "00" 궸빾듂
      @now_text.gsub!(/\\/) { "00" }
      # "\C" 귩 "01" 궸갂"\G" 귩 "02" 궸갂
      # "\S" 귩 "03" 궸갂"\A" 귩 "04" 궸빾듂
      @now_text.gsub!(/\[Cc][([0-9]+)]/) { "01[#{$1}]" }
      @now_text.gsub!(/\[Gg]/) { "02" }
      @now_text.gsub!(/\[Ss][([0-9]+)]/) { "03[#{$1}]" }
      @now_text.gsub!(/\[Aa][(.*?)]/) { "04[#{$1}]" }
      @now_text.gsub!(/\[.]/) { "05" }
      @now_text.gsub!(/\[|]/) { "06" }
      # 떍뜃궥귡궴돺궔궴딠귏궦궋궻궳갂16댥?귩럊뾭궥귡
      @now_text.gsub!(/\[>]/) { "16" }
      @now_text.gsub!(/\[<]/) { "17" }
      @now_text.gsub!(/\[!]/) { "20" }
      @now_text.gsub!(/\[~]/) { "21" }
      @now_text.gsub!(/\[Ee][([0-9]+)]/) { "22[#{$1}]" }
      # 귽깛긢깛긣먠믦(믁돿븫빁)
      @now_text.gsub!(/\[Ii]/) { "23" }
      # 긡긌긚긣벁됡뿦럚믦(믁돿븫빁)
      @now_text.gsub!(/\[Oo][([0-9]+)]/) { "24[#{$1}]" }
      # 긡긌긚긣긖귽긛럚믦(믁돿븫빁)
      @now_text.gsub!(/\[Hh][([0-9]+)]/) { "25[#{$1}]" }
      # 뗴뵏?볺(믁돿븫빁)
      @now_text.gsub!(/\[Bb][([0-9]+)]/) { "26[#{$1}]" }
      # 깑긮?렑(믁돿븫빁)
      @now_text.gsub!(/\[Rr][(.*?)]/) { "27[#{$1}]" }
      # 궞궞궳덇뭊긂귻깛긤긂댧뭫뛛륷
      reset_window
      # name궕궇귡궔갎
      if name_window_set
        # 긆긲긜긞긣댧뭫
        off_x =  0
        off_y =  -10
        # 쁤궬궚긂귻깛긤긂궻띿맟(?뵏귩 2 궸먠믦)
        space = 2
        x = self.x + off_x - space / 2
        y = self.y + off_y - space / 2
        w = self.contents.text_size(name_text).width + 8 + space
        h = 26 + space
        @name_window_frame = Window_Frame.new(x, y, w, h)
        @name_window_frame.z = self.z + 1
        # ?럸밒궶뗴뭷빒럻?롃긂귻깛긤긂귩띿맟
        x = self.x + off_x + 4
        y = self.y + off_y
        @name_window_text  = Air_Text.new(x, y, name_text)
        @name_window_text.z = self.z + 2
      end
    end
    # 긂귻깛긤긂귩뛛륷
    reset_window
    # 멗묖럥궻뤾뜃
    if $game_temp.choice_max > 0
      @item_max = $game_temp.choice_max
      self.active = true
      self.index = 0
    end
    # 릶뭠볺쀍궻뤾뜃
    if $game_temp.num_input_variable_id > 0
      digits_max = $game_temp.num_input_digits_max
      number = $game_variables[$game_temp.num_input_variable_id]
      @input_number_window = Window_InputNumber.new(digits_max)
      @input_number_window.number = number
      @input_number_window.x = self.x + 8
      @input_number_window.y = self.y + $game_temp.num_input_start * 32
    end
  end
  #--------------------------------------------------------------------------
  # 걶 긲깒??뛛륷
  #--------------------------------------------------------------------------
  def update
    super
    # 긲긃?긤귽깛궻뤾뜃
    if @fade_in
      self.contents_opacity += 24
      if @input_number_window != nil
        @input_number_window.contents_opacity += 24
      end
      if self.contents_opacity == 255
        @fade_in = false
      end
      return
    end
    @now_text = nil if @now_text == "" # 빾듂
    # ?렑뫲궭궻긽긞긜?긙궕궇귡뤾뜃
    if @now_text != nil and @mid_stop == false
      if @write_wait > 0
        @write_wait -= 1
        return
      end
      text_not_skip = DEFAULT_TYPING_ENABLE
      while true
        # 띍묈 x y 궻뺎뫔갃
        @max_x = @x if @max_x < @x
        @max_y = @y if @max_y < @y
        # c 궸 1 빒럻귩롦벦 (빒럻궕롦벦궳궖궶궘궶귡귏궳깑?긵)
        if (c = @now_text.slice!(/./m)) != nil
          # \ 궻뤾뜃
          if c == "00"
            # ?뿀궻빒럻궸뽣궥
            c = "\"
          end
          # C[n] 궻뤾뜃
          if c == "01"
            # 빒럻륡귩빾뛛
            @now_text.sub!(/[([0-9]+)]/, "")
            color = $1.to_i
            if color >= 0 and color <= 7
              self.contents.font.color = text_color(color)
              if @opacity != nil
                color = self.contents.font.color
                self.contents.font.color = Color.new(color.red, color.green, color.blue, color.alpha * @opacity / 255)
              end
            end
            # 렅궻빒럻귉
            c = ""
          end
          # G 궻뤾뜃
          if c == "02"
            # 긕?깑긤긂귻깛긤긂귩띿맟
            if @gold_window == nil and @popchar <= 0
              @gold_window = Window_Gold.new
              @gold_window.x = 560 - @gold_window.width
              if $game_temp.in_battle
                @gold_window.y = 192
              else
                @gold_window.y = self.y >= 128 ? 32 : 384
              end
              @gold_window.opacity = self.opacity
              @gold_window.back_opacity = self.back_opacity
            end
            # 렅궻빒럻귉
            c = ""
          end
          # S[n] 궻뤾뜃
          if c == "03"
            # 빒럻륡귩빾뛛
            @now_text.sub!(/[([0-9]+)]/, "")
            speed = $1.to_i
            if speed >= 0 and speed <= 19
              @write_speed = speed
            end
            # 렅궻빒럻귉
            c = ""
          end
          # A[soundname] 궻뤾뜃
          if c == "04"
            # 띋맯긲?귽깑귩빾뛛궥귡궫귕궻?뷈
            @now_text.sub!(/[(.*?)]/, "")
            buftxt = $1.dup.to_s
            # 띋맯긲?귽깑뼹궸"/"궕궇귡궔갎
            if buftxt.match(///) == nil and buftxt != "" then
              # 궶궚귢궽"Audio/SE/"귩뙅뜃궥귡
              $soundname_on_speak = "Audio/SE/" + buftxt
            else
              # 궇귢궽궩궻귏귏긓긯?
              $soundname_on_speak = buftxt.dup
            end
            # 렅궻빒럻귉
            c = ""
          elsif c == "04"
            # 렅궻빒럻귉
            c = ""
          end
          # . 궻뤾뜃
          if c == "05"
            @write_wait += 5
            c = ""
          end
          # | 궻뤾뜃
          if c == "06"
            @write_wait += 20
            c = ""
          end
          # > 궻뤾뜃
          if c == "16"
            text_not_skip = false
            c = ""
          end
          # <궻뤾뜃
          if c == "17"
            text_not_skip = true
            c = ""
          end
          # !궻뤾뜃
          if c == "20"
            @mid_stop = true
            c = ""
          end
          # ~궻뤾뜃
          if c == "21"
            terminate_message
            return
          end
          # I궻뤾뜃(믁돿븫빁)
          if c == "23"
            # 뜞궻@x귩귽깛긢깛긣댧뭫궸먠믦
            @indent = @x
            c = ""
          end
          # O궻뤾뜃(믁돿븫빁)
          if c == "24"
            @now_text.sub!(/[([0-9]+)]/, "")
            @opacity = $1.to_i
            color = self.contents.font.color
            self.contents.font.color = Color.new(color.red, color.green, color.blue, color.alpha * @opacity / 255)
            c = ""
          end
          # H궻뤾뜃(믁돿븫빁)
          if c == "25"
            @now_text.sub!(/[([0-9]+)]/, "")
            self.contents.font.size = [[$1.to_i, 6].max, 32].min
            c = ""
          end
          # B궻뤾뜃(믁돿븫빁)
          if c == "26"
            @now_text.sub!(/[([0-9]+)]/, "")
            @x += $1.to_i
            c = ""
          end
          # R궻뤾뜃(믁돿븫빁)
          if c == "27"
            @now_text.sub!(/[(.*?)]/, "")
            # 빒럻귩?됪
            @x += ruby_draw_shadow_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), $1, @opacity)
            # 빒럻?롃궻SE귩뎶몋
            if $soundname_on_speak != ""
              Audio.se_play($soundname_on_speak)
            end
            c = ""
          end
          # 귺귽긓깛?됪뾭긘?긑깛긚궻뤾뜃(믁돿븫빁)
          if c == "30"
            # 귺귽긓깛긲?귽깑뼹귩롦벦
            @now_text.sub!(/[(.*?)]/, "")
            # 귺귽긓깛귩?됪
            self.contents.blt(@x , @y * line_height + 8, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
            # 빒럻?롃궻SE귩뎶몋
            if $soundname_on_speak != ""
              Audio.se_play($soundname_on_speak)
            end
            @x += 24
            # 렅궻빒럻귉
            c = ""
          end
          # 둂뛱빒럻궻뤾뜃
          if c == "n"
            # y 궸 1 귩돿럁
            @lines += 1
            @y += 1
            @x = 0 + @indent + @face_indent
            # 멗묖럥궶귞럻돷궛귩뛱궎
            if @lines >= $game_temp.choice_start
              @x = 8 + @indent + @face_indent
              # 긇??깑궻뛛륷
              @cursor_width = @max_choice_x
            end
            # 렅궻빒럻귉
            c = ""
          end
          # 둖럻?렑궻뤾뜃
          if c == "22"
            # []븫빁궻룣땸
            @now_text.sub!(/[([0-9]+)]/, "")
            # 둖럻귩?렑
            @x += gaiji_draw(4 + @x, @y * line_height + (line_height - self.contents.font.size), $1.to_i)
            # 렅궻빒럻귉
            c = ""
          end
          if c != ""
            # 빒럻귩?됪
            self.contents.draw_shadow_text(4+@x, 32 * @y, 40, 32, c)
            @x += self.contents.text_size(c).width
            # 빒럻?롃궻SE귩뎶몋
            if $soundname_on_speak != "" then
              Audio.se_play($soundname_on_speak)
            end
          end
          # B??깛궕돓궠귢궫뤾뜃
          if Input.press?(Input::B)
            text_not_skip = false
          end
        else
          text_not_skip = true
          break
        end
        # 뢎뿹뵽믦
        if text_not_skip
          break
        end
      end
      @write_wait += @write_speed
      return
    end
    # 릶뭠볺쀍뭷궻뤾뜃
    if @input_number_window != nil
      @input_number_window.update
      # 뙂믦
      if Input.trigger?(Input::C)
        $game_system.se_play($data_system.decision_se)
        $game_variables[$game_temp.num_input_variable_id] =
          @input_number_window.number
        $game_map.need_refresh = true
        # 릶뭠볺쀍긂귻깛긤긂귩됶뺳
        @input_number_window.dispose
        @input_number_window = nil
        terminate_message
      end
      return
    end
    # 긽긞긜?긙?렑뭷궻뤾뜃
    if @contents_showing
      # 멗묖럥궻?렑뭷궳궶궚귢궽??긛긖귽깛귩?렑
      if $game_temp.choice_max == 0
        self.pause = true
      end
      # 긌긿깛긜깑
      if Input.trigger?(Input::B)
        if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
          $game_system.se_play($data_system.cancel_se)
          $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
          terminate_message
        end
      end
      # 뙂믦
      if Input.trigger?(Input::C)
        if $game_temp.choice_max > 0
          $game_system.se_play($data_system.decision_se)
          $game_temp.choice_proc.call(self.index)
        end
        if @mid_stop
          @mid_stop = false
          return
        else
          terminate_message
        end
      end
      return
    end
    # 긲긃?긤귺긂긣뭷댥둖궳?렑뫲궭궻긽긞긜?긙궔멗묖럥궕궇귡뤾뜃
    if @fade_out == false and $game_temp.message_text != nil
      @contents_showing = true
      $game_temp.message_window_showing = true
      refresh
      Graphics.frame_reset
      self.visible = true
      self.contents_opacity = 0
      if @input_number_window != nil
        @input_number_window.contents_opacity = 0
      end
      @fade_in = true
      return
    end
    # ?렑궥귊궖긽긞긜?긙궕궶궋궕갂긂귻깛긤긂궕됀럨륉뫴궻뤾뜃
    if self.visible
      @fade_out = true
      self.opacity -= 48
      if self.opacity == 0
        self.visible = false
        @fade_out = false
        $game_temp.message_window_showing = false
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # 걶 긌긿깋긏??궻롦벦
  #     parameter : 긬깋긽??
  #--------------------------------------------------------------------------
  def get_character(parameter)
    # 긬깋긽??궳빁딌
    case parameter
    when 0  # 긵깒귽깂?
      return $game_player
    else  # 벫믦궻귽긹깛긣
      events = $game_map.events
      return events == nil ? nil : events[parameter]
    end
  end
  #--------------------------------------------------------------------------
  # 걶 긂귻깛긤긂궻댧뭫궴븉벁뼻뱗궻먠믦
  #--------------------------------------------------------------------------
  def reset_window
    # 뵽믦
    if @popchar >= 0
      events = $game_map.events
      if events != nil
        character = get_character(@popchar)
        x = [[character.screen_x -  0 - self.width / 2, 4].max, 636 - self.width].min
        y = [[character.screen_y - 48 - self.height, 4].max, 476 - self.height].min
        self.x = x
        self.y = y
      end
    elsif @popchar == -1
      self.x = -4
      self.y = -4
      self.width = 648
      self.height = 488
    else
      if $game_temp.in_battle
        self.y = 16
      else
        case $game_system.message_position
        when 0  # 뤵
          self.y = 16
        when 1  # 뭷
          self.y = 230
        when 2  # 돷
          self.y = 304
        end
        self.x = 80
        if @face_file == nil
          self.width = 480
        else
          self.width = 600
          self.x -= 60
        end
        self.height = 160
      end
    end
    self.contents = Bitmap.new(self.width - 32, self.height - 32)
    if @face_file != nil
      self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
    end
    if @popchar == -1
      self.opacity = 255
      self.back_opacity = 0
    elsif $game_system.message_frame == 0
      self.opacity = 255
      self.back_opacity = 160
    else
      self.opacity = 0
      self.back_opacity = 160
    end
  end
  #--------------------------------------------------------------------------
  # 걶 둖럻?됪
  #--------------------------------------------------------------------------
  # x?? 갌굹띆뷭
  # y?? 갌굺띆뷭
  # num? 갌둖럻붥뜂
  # 뺅귟뭠갌둖럻븴(@x몵돿뭠)
  #--------------------------------------------------------------------------
  def gaiji_draw(x, y, num)
    # 둖럻긢??궕뫔띪궢궶궋뤾뜃궼돺귖궢궶궋
    if @gaiji_cache == nil
      return 0
    else
      # 럚믦궢궫둖럻궕긌긿긞긘깄붝댪귩뮪궑궲궋귡뤾뜃궼돺귖궢궶궋
      if @gaiji_cache.width < num * 24
        return 0
      end

      # 빒럻긖귽긛귩똶럁
      if self.contents.font.size >= 20 and self.contents.font.size <= 24
        size = 24
      else
        size = self.contents.font.size * 100 * 24 / 2200
      end

      # 둖럻긢??귩stretch_blt궳?몭
      self.contents.stretch_blt(Rect.new(x, y, size, size), @gaiji_cache, Rect.new(num * 24, 0, 24, 24))

      # 빒럻?롃궻SE귩뎶몋
      if $soundname_on_speak != "" then
        Audio.se_play($soundname_on_speak)
      end

      # 빒럻긖귽긛귩뺅궥
      return size
    end
  end
  #--------------------------------------------------------------------------
  # 걶 line_height
  #--------------------------------------------------------------------------
  # 뺅귟뭠갌뛱궻뛼궠(@y몵돿뭠)귩뺅궢귏궥갃
  #--------------------------------------------------------------------------
  def line_height
    # 뙸륉갂멗묖럥뱳궸뫮돒궕궳궖궶궋댴갂렔벍밒궸32귩뺅궢귏궥갃
    return 32

    # 빒럻긖귽긛귩똶럁
    if self.contents.font.size >= 20 and self.contents.font.size <= 24
      return 32
    else
      return self.contents.font.size * 15 / 10
    end
  end
  #--------------------------------------------------------------------------
  # 걶 깑긮빒럻?됪
  #--------------------------------------------------------------------------
  # target 갌?됪뫮뤭갃Bitmap긏깋긚귩럚믦갃
  # x      갌x띆뷭
  # y      갌y띆뷭
  # str?  갌?됪빒럻쀱갃?빒,깑긮궻?렜궳볺쀍갃
  # ???? ,뗦먛귟궕2궰댥뤵궇궯궫뤾뜃궼렔벍밒궸뼰럨궠귢귡갃
  # opacity갌벁됡뿦(0?255)
  # 뺅귟뭠 갌빒럻븴(@x몵돿뭠)갃
  #--------------------------------------------------------------------------
  def ruby_draw_text(target, x, y, str,opacity)
    # 긲긅깛긣긖귽긛귩긫긞긏귺긞긵궢궲궓궘
    sizeback = target.font.size
    # 깑긮긖귽긛궻똶럁
    target.font.size * 3 / 2 > 32 ? rubysize = 32 - target.font.size : rubysize = target.font.size / 2
    rubysize = [rubysize, 6].max
    
    # opacity궸딮믦뭠댥뤵궻뭠궕볺궯궲궋귡뤾뜃궼뢇맫갃
    opacity = [[opacity, 0].max, 255].min
    # str귩split궳빁뒆궢갂split_s궸둰?
    split_s = str.split(/,/)

    # split_s궕nil궻뤾뜃궼""궸궢궲궓궘(뚮벍띿뻞?)
    split_s[0] == nil ? split_s[0] = "" : nil
    split_s[1] == nil ? split_s[1] = "" : nil

    # height궴width귩똶럁
    height = sizeback + rubysize
    width  = target.text_size(split_s[0]).width

    # 긫긞긲?뾭궻븴똶럁(깑긮궻븴궕?빒궻븴귩뎭궑귡됀?맜궕궇귡댴)
    target.font.size = rubysize
    ruby_width = target.text_size(split_s[1]).width
    target.font.size = sizeback

    buf_width = [target.text_size(split_s[0]).width, ruby_width].max

    # ?빒궻?됪븴궴깑긮궻?됪븴궻뜼귩1/2궸궢궲빾릶궸둰?(뚣궳럊뾭)
    width - ruby_width != 0 ? sub_x = (width - ruby_width) / 2 : sub_x = 0

    # opacity궕255(벁됡궶궢)궻뤾뜃궼믅륂?됪
    if opacity == 255
    # 깑긮궻?됪
      target.font.size = rubysize
      target.draw_shadow_text(x + sub_x, y - target.font.size, target.text_size(split_s[1]).width, target.font.size, split_s[1])
      target.font.size = sizeback
    # ?빒궻?됪
      target.draw_shadow_text(x, y, width, target.font.size, split_s[0])
      return width
    else
      # ?렑긡긌긚긣궻height갂width궕긫긞긲?긖귽긛귩뤵됷귡뤾뜃궼
      # 긫긞긲?귩띋맯맟궥귡갃
      if @opacity_text_buf.width < buf_width or @opacity_text_buf.height < height
        @opacity_text_buf.dispose
        @opacity_text_buf = Bitmap.new(buf_width, height)
      # 궩궎궳궶궋뤾뜃궼긫긞긲?긏깏귺갃
      else
        @opacity_text_buf.clear
      end
      # 긫긞긲?궸긡긌긚긣?됪
      # 깑긮궻?됪
      @opacity_text_buf.font.size = rubysize
      @opacity_text_buf.draw_shadow_text(0 , 0, buf_width, rubysize, split_s[1], 1)
      @opacity_text_buf.font.size = sizeback
      # ?빒궻?됪
      @opacity_text_buf.draw_shadow_text(0 , rubysize, buf_width, sizeback, split_s[0], 1)
      # 깑긮궻븴궕?빒궻븴귩돷됷귡뤾뜃
      if sub_x >= 0
        target.blt(x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
      # 깑긮궻븴궕?빒궻븴귩뤵됷귡뤾뜃
      else
        target.blt(x + sub_x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
      end
      # 빒럻긖귽긛귩뺅궥
      return width
    end
  end
  #--------------------------------------------------------------------------
  # 걶 V빾듂
  #--------------------------------------------------------------------------
  # option 갌긆긵긘깈깛갃뼰럚믦뼌궼딮믦둖궻뤾뜃궼index궻깇?긗빾릶뭠귩뺅궥갃
  # index  갌귽깛긢긞긏긚
  # 뺅귟뭠 갌빾듂뙅됈(귺귽긓깛?렑뾭긘?긑깛긚뜛귒)
  #--------------------------------------------------------------------------
  def convart_value(option, index)
    # option궕nil궻뤾뜃궼""궸뮳궥(뚮벍띿뻞?)
    option == nil ? option = "" : nil

    # option궼downcase궢궲궓궘갃
    option.downcase!

    # 30궼귺귽긓깛?렑뾭궻긘?긑깛긚갃30[귺귽긓깛긲?귽깑뼹]궳믦?갃
    case option
    when "i"
      unless $data_items[index].name == nil
        r = sprintf("30[%s]%s", $data_items[index].icon_name, $data_items[index].name)
      end
    when "w"
      unless $data_weapons[index].name == nil
        r = sprintf("30[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name)
      end
    when "a"
      unless $data_armors[index].name == nil
        r = sprintf("30[%s]%s", $data_armors[index].icon_name, $data_armors[index].name)
      end
    when "s"
      unless $data_skills[index].name == nil
        r = sprintf("30[%s]%s", $data_skills[index].icon_name, $data_skills[index].name)
      end
    else
      r = $game_variables[index]
    end

    r == nil ? r = "" : nil
    return r
  end
  #--------------------------------------------------------------------------
  # 걶 됶뺳
  #--------------------------------------------------------------------------
  def dispose
    terminate_message

    # 둖럻긌긿긞긘깄둎뺳
    if @gaiji_cache != nil
      unless @gaiji_cache.disposed?
        @gaiji_cache.dispose
      end
    end

    # 빒럻벁됡?몭뾭긫긞긲?둎뺳
    unless @opacity_text_buf.disposed?
      @opacity_text_buf.dispose
    end

    $game_temp.message_window_showing = false
    if @input_number_window != nil
      @input_number_window.dispose
    end
    super
  end
  #--------------------------------------------------------------------------
  # 걶 긇??깑궻뗩?뛛륷
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index >= 0
      n = $game_temp.choice_start + @index
      self.cursor_rect.set(8 + @indent + @face_indent, n * 32, @cursor_width, 32)
    else
      self.cursor_rect.empty
    end
  end
end
#==============================================================================
# 걾 Window_Frame (쁤궬궚궳뭷릆궻뼰궋긂귻깛긤긂)
#==============================================================================
class Window_Frame < Window_Base
  #--------------------------------------------------------------------------
  # 걶 긆긳긙긃긏긣룊딖돸
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super(x, y, width, height)
    self.contents = nil
    #self.back_opacity = 240
  end
  #--------------------------------------------------------------------------
  # 걶 됶뺳
  #--------------------------------------------------------------------------
  def dispose
    super
  end
end
#==============================================================================
# 걾 Air_Text (돺귖뼰궋궴궞귣궸빒럻?롃 = 쁤궻뼰궋뢷듩?렑긽긞긜?긙긂귻깛긤긂)
#==============================================================================
class Air_Text < Window_Base
  #--------------------------------------------------------------------------
  # 걶 긆긳긙긃긏긣룊딖돸
  #--------------------------------------------------------------------------
  def initialize(x, y, designate_text)
    super(x-16, y-16, 32 + designate_text.size * 12, 56)
    self.opacity      = 0
    self.back_opacity = 0
    self.contents = Bitmap.new(self.width - 32, self.height - 32)
    w = self.contents.width
    h = self.contents.height
    self.contents.draw_shadow_text(0, 0, w, h, designate_text)
  end
  #--------------------------------------------------------------------------
  # 걶 됶뺳
  #--------------------------------------------------------------------------
  def dispose
    self.contents.clear
    super
  end
end


제것도 이상한 말로 되있지만, 커서창은 잘 보이더군요..
?

  1. 쯔꾸르 mv 게임을 apk 파일로 변환했는데...

  2. 쯔꾸르 젖소이야기 결혼 방법좀 알려주세요...

  3. No Image 29Nov
    by game메이커xp
    2021/11/29 by game메이커xp
    Views 1257 

    apk포팅 승인 어케 하나요?

  4. No Image 15Jul
    by Neuromancer
    2021/07/15 by Neuromancer
    Views 1541 

    Yanfly님의 Action Sequence Pack 질문드립니다

  5. 싸게 MV 를 먼저? 아니면 돈을 더 들어서라도 MZ?

  6. RMMV - 스탯창과 대화창 변견 관련 질문입니다. (초보입니다 도움좀 주세요 ㅜㅜ)

  7. 아오오니를 하는 사람인데요 질문 두가지가 있어요

  8. No Image 07Dec
    by land_tnt
    2020/12/07 by land_tnt
    Views 1455 

    재밌는게임

  9. No Image 10Nov
    by 세종기항19
    2020/11/10 by 세종기항19
    Views 1684 

    c언어 질문

  10. 코딩 질문

  11. No Image 07Nov
    by 드래곤규
    2020/11/07 by 드래곤규
    Views 1402 

    혹시나 물어보는데

  12. No Image 09Sep
    by 이부닝
    2020/09/09 by 이부닝
    Views 1224 

    오픈보 게임 더블드래곤 리로디드 얼티네이트에 대해 궁금

  13. No Image 02Sep
    by 스트레이보우
    2020/09/02 by 스트레이보우
    Views 1006 

    상태이상 확률 결정

  14. No Image 23May
    by WOONAALAA
    2020/05/23 by WOONAALAA
    Views 963 

    다음 인디사이드 제작대회는 언제쯤 열릴까요?

  15. xp로 제작된 어플 실행자체가 안된다는 분이 있습니다.(제생각엔 apk로 변환하는 과정에서 버전자체가 낮은 것 같습니다)

  16. apk 포팅하는데 게임 이름이 필요합니다 뜨는데

  17. No Image 22Mar
    by 랖랖
    2020/03/22 by 랖랖
    Views 1780 

    쯔꾸르VX Ace렉먹음 도와주세요...

  18. 안녕하세요

  19. 포팅 중 '게임 이름이 필요합니다' 오류

  20. RPGMV 거리 추적

Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 442 Next
/ 442


[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)