Image Here
Just trying to get the image on the left (The current script) to look like the mock up I made on the right.
Here is the small portion of the script for that section.
Just trying to get the image on the left (The current script) to look like the mock up I made on the right.
Here is the small portion of the script for that section.
def draw_ingredients(y)
s1 = "Ingredients(Need/Have):"
x = 0
ny = 0
change_color(system_color)
draw_text(x, y, contents.width-x, line_height, s1)
change_color(normal_color)
x += text_size(s1).width
@recipe.ingredients.each do |ingredient|
@y_add += line_height
item = case ingredient.type
when :item; $data_items[ingredient.id]
when :weapon; $data_weapons[ingredient.id]
when :armor; $data_armors[ingredient.id]
when :gold; $imported["CSCA-CurrencySystem"] ? $game_party.get_csca_cs_currency(ingredient.id)[:currency_unit] : Vocab::currency_unit
end
if ingredient.type == :gold
change_color($game_party.get_csca_cs_currency(ingredient.id)[:color]) if $imported["CSCA-CurrencySystem"]
draw_text(x, y + ny, contents.width-x, line_height, sprintf("%d%s", ingredient.amount, item))
change_color(normal_color)
else
draw_icon(item.icon_index, x, y + ny)
x += 24
draw_text(x, y + ny, contents.width-x, line_height, sprintf("%s (%d/%2d)", item.name, ingredient.amount, $game_party.item_number(item)))
end
ny += line_height
x -= 24
end
end
s1 = "Ingredients(Need/Have):"
x = 0
ny = 0
change_color(system_color)
draw_text(x, y, contents.width-x, line_height, s1)
change_color(normal_color)
x += text_size(s1).width
@recipe.ingredients.each do |ingredient|
@y_add += line_height
item = case ingredient.type
when :item; $data_items[ingredient.id]
when :weapon; $data_weapons[ingredient.id]
when :armor; $data_armors[ingredient.id]
when :gold; $imported["CSCA-CurrencySystem"] ? $game_party.get_csca_cs_currency(ingredient.id)[:currency_unit] : Vocab::currency_unit
end
if ingredient.type == :gold
change_color($game_party.get_csca_cs_currency(ingredient.id)[:color]) if $imported["CSCA-CurrencySystem"]
draw_text(x, y + ny, contents.width-x, line_height, sprintf("%d%s", ingredient.amount, item))
change_color(normal_color)
else
draw_icon(item.icon_index, x, y + ny)
x += 24
draw_text(x, y + ny, contents.width-x, line_height, sprintf("%s (%d/%2d)", item.name, ingredient.amount, $game_party.item_number(item)))
end
ny += line_height
x -= 24
end
end