Du hast doch den Punkt, wo der Text ausgegeben wird, direkt vor dir
Schau mal in die Hilfe was die Methode draw_text für Parameter hat. Abgekürzt:
Startposition horizontal, Startposition vertikal, Länge, Höhe, Ausgabetext, Ausrichtung (0= links, 1 = mittig, 2 = rechts)
Du musst also mit der Startposition und der Länge schauen, wenn es dir noch zu weit auseinander ist.
Der TP-Wert wird über eine andere Methode geschrieben - die man sofort findet, wenn man im Scripteditor mal nach der sucht, die ich dir hier genannt habe.
Dort machst du hinten auch einfach aus der 2 eine 0 und schon ist es linksbündig.
Code:
class Window_Base < Window
def draw_current_and_max_values(x, y, width, current, max, color1, color2)
change_color(color1)
xr = x + width
if width < 96
draw_text(xr - 40, y, 42, line_height, current, 0)
else
draw_text(xr - 92, y, 42, line_height, current, 0)
change_color(color2)
draw_text(xr - 52, y, 12, line_height, "/", 0)
draw_text(xr - 42, y, 42, line_height, max, 0)
end
end
def draw_actor_tp(actor, x, y, width = 124)
draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
change_color(system_color)
draw_text(x, y, 30, line_height, Vocab::tp_a)
change_color(tp_color(actor))
draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 0 )
end
end
Edit: Beziehungsweise musst du hier, weil die Methode für HP und MP verwendet wird, die aufrufende Methode am besten bearbeiten:
Code:
class Window_Base < Window
def draw_current_and_max_values(x, y, width, current, max, color1, color2)
change_color(color1)
xr = x + width
if width < 96
draw_text(xr - 40, y, 42, line_height, current, 0)
else
draw_text(xr - 92, y, 42, line_height, current, 0)
change_color(color2)
draw_text(xr - 52, y, 12, line_height, "/", 0)
draw_text(xr - 42, y, 42, line_height, max, 0)
end
end
def draw_actor_tp(actor, x, y, width = 124)
draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
change_color(system_color)
draw_text(x, y, 30, line_height, Vocab::tp_a)
change_color(tp_color(actor))
draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 0)
end
#--------------------------------------------------------------------------
# * Draw MP
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 124)
draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
change_color(system_color)
draw_text(x, y, 30, line_height, Vocab::hp_a)
draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
hp_color(actor), normal_color)
end
#--------------------------------------------------------------------------
# * Draw MP
#--------------------------------------------------------------------------
def draw_actor_mp(actor, x, y, width = 124)
draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
change_color(system_color)
draw_text(x, y, 30, line_height, Vocab::mp_a)
draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,
mp_color(actor), normal_color)
end
end