(Picture) How do I insert a break so that the image on left turns into the image on the right?

Morpheus

Graphic Designer
Veteran
Joined
Mar 14, 2012
Messages
123
Reaction score
10
First Language
english
Primarily Uses
N/A
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.

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
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
299
Reaction score
1,145
First Language
Bahasa
Primarily Uses
RMMV
Sure...
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)
y += line_height
@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

What I did is just changing a single line.

FYI, I'm removing this :
x += text_size(s1).width

then replace it to this :
y += line_height

It should've worked as intention.
 
Last edited:

Morpheus

Graphic Designer
Veteran
Joined
Mar 14, 2012
Messages
123
Reaction score
10
First Language
english
Primarily Uses
N/A
Sure...

What I did is just changing a single line.

FYI, I'm removing this :
x += text_size(s1).width

then replace it to this :
y += line_height

It should've worked as intention.
I was going to say that now it overlaps the description text but I was able to fix it myself. Thank you so so much!
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Well it's been almost a whole year since I joined RMW, so i figured I should update my status.
This is my updated status.
Here's a sample of some pixel edits I made.

Maybe for use as sidewalks.
If there are any mods or admins online, could you please see about the re-translation pages for RPG Maker MV? They are all down :rsad:
Werewolf cons: you lose control of yourself once a month and could accidentally kill your friends. Vampire cons: no garlic bread. The choice is simple. Werewolf for sure.
2 huge market drops in 2 days. So glad I sold my non-dividend stocks about 2 weeks ago. And if the dividend ones drop heavily, hey more cheap stocks for me!

Forum statistics

Threads
94,525
Messages
921,603
Members
124,377
Latest member
Darkyyy
Top