UltimaForum

Pomoc [VXAce] - Item Color do VXAce

Leoś - Wto 24 Sty, 2012 23:36
Temat postu: Item Color do VXAce
http://www.ultimateam.pl/viewtopic.php?t=8471
Dałoby rade przerobić skrypt na ACE? XD

Ayene - Wto 24 Sty, 2012 23:48

Powinno działać po korekcie:
znajdź fragment kodu
Kod:
def draw_item_name(item, x, y, enabled = true)
    if item != nil
      draw_icon(item.icon_index, x, y, enabled)
      self.contents.font.color = normal_color
      if item.note.include?("<IQC ")
        quality = get_single_for(item.note,"IQC")
        self.contents.font.color = text_color(IQC_quality.index(quality).to_i)
      end
      self.contents.font.color.alpha = enabled ? 255 : 128
      self.contents.draw_text(x + 24, y, 172, line_height, item.name)
      self.contents.font.color = normal_color
    end
  end

i zamień na:
Kod:
def draw_item_name(item, x, y, enabled = true, width = 172)
    return unless item
    draw_icon(item.icon_index, x, y, enabled)
    if item.note.include?("<IQC ")
      quality = get_single_for(item.note,"IQC")
      color = text_color(IQC_quality.index(quality).to_i)
    else
      color = normal_color
    end
    change_color(color, enabled)
    draw_text(x + 24, y, width, line_height, item.name)
  end

Leoś - Wto 24 Sty, 2012 23:51

Super dzięki :I

Powered by phpBB modified by Przemo © 2003 phpBB Group