设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2147|回复: 12
打印 上一主题 下一主题

请问如何把战斗中的人物名称的字体改颜色?

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
95
在线时间
2 小时
注册时间
2008-5-31
帖子
63
跳转到指定楼层
1
发表于 2008-6-2 18:29:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x


就是早苗这个名字~白色看不太清楚~怎么改成黑色或者其他颜色?
此贴于 2008-6-8 18:15:29 被版主光郎提醒,请楼主看到后对本贴做出回应。
版务信息:版主帮忙结贴~

Lv1.梦旅人

梦石
0
星屑
65
在线时间
13 小时
注册时间
2008-1-11
帖子
330
2
发表于 2008-6-2 18:33:12 | 只看该作者
应该是Window_Base里的

def draw_actor_name(actor, x, y)
    self.contents.font.color = normal_color
      self.contents.draw_text(x, y, 120, 45, actor.name)  
   end


例,你可以把那行改成:self.contents.font.color = Color.new(225,-215,-225,200)

那就是红色了.
系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
7 小时
注册时间
2008-5-29
帖子
112
3
发表于 2008-6-2 19:06:02 | 只看该作者
太麻烦了,不知道VB里有没实现颜色的代码,不用老RGB吧~~


比如

self.contents.font.color = Color.new(Color.RED)之类的.........有没有这类的
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
65
在线时间
13 小时
注册时间
2008-1-11
帖子
330
4
发表于 2008-6-2 19:08:35 | 只看该作者
MS有这种的  Color.new(255,green,blue,200)
回复 支持 反对

使用道具 举报

Lv3.寻梦者

酱油的

梦石
0
星屑
1265
在线时间
2161 小时
注册时间
2007-12-22
帖子
3271

贵宾

5
发表于 2008-6-2 19:16:09 | 只看该作者
可以自己在 class Window_Base下增加方法
比如
def red
  return Color.new(225,-215,-225,200)
end

然後就可以使用
self.contents.font.color = red
來實現
不做頭像做簽名,看我囧冏有神(多謝山人有情提供 )
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
65
在线时间
13 小时
注册时间
2008-1-11
帖子
330
6
发表于 2008-6-2 19:26:18 | 只看该作者
以下引用禾西于2008-6-2 11:16:08的发言:

可以自己在 class Window_Base下增加方法
比如
def red
return Color.new(225,-215,-225,200)
end

然後就可以使用
self.contents.font.color = red
來實現



还是要找(x.x.x.x)对应的颜色值,楼主就是怕这个麻烦,太懒了 {/cy}
回复 支持 反对

使用道具 举报

Lv2.观梦者

神隐的主犯

梦石
0
星屑
373
在线时间
271 小时
注册时间
2008-2-22
帖子
7691

贵宾

7
发表于 2008-6-2 19:58:46 | 只看该作者
怕找三原色的话,可以试试 流星姐 发的这个工具:

http://rpg.blue/viewthread.php?tid=76392&ntime=2008%2D6%2D2+11%3A57%3A20

《天空之城 —— 破碎的命运》
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
7 小时
注册时间
2008-5-29
帖子
112
8
发表于 2008-6-2 22:12:02 | 只看该作者
我都觉得奇怪,怎么会有负数,红色明明是255,0,0


还有最后第四个参数,莫非是透明度的意思?
回复 支持 反对

使用道具 举报

Lv2.观梦者

天仙

梦石
0
星屑
645
在线时间
184 小时
注册时间
2008-4-15
帖子
5023

贵宾

9
发表于 2008-6-2 22:17:38 | 只看该作者
http://www.w3schools.com/html/html_colornames.asp
顏色列表
加上剛才紫妹提供給你的工具獲取三原色
或是直接用下面的腳本
self.contents.color = 某顏色名
下面的腳本還沒打完
目前到 fire_brick
  1. class Window
  2.   #============================================================================
  3.   #  紅色
  4.   #============================================================================
  5.   def red
  6.     return Color.new(255, 0, 0)
  7.   end
  8.   #============================================================================
  9.   #  綠色
  10.   #============================================================================
  11.   def green
  12.     return Color.new(0, 255, 0)
  13.   end
  14.   #============================================================================
  15.   #  藍色
  16.   #============================================================================
  17.   def blue
  18.     return Color.new(0, 0, 255)
  19.   end
  20.   #============================================================================
  21.   #  黃色
  22.   #============================================================================
  23.   def yellow
  24.     return Color.new(255, 255, 0)
  25.   end
  26.   #============================================================================
  27.   #  藍綠色
  28.   #============================================================================
  29.   def cyan
  30.     return Color.new(0, 255, 255)
  31.   end
  32.   #============================================================================
  33.   #  洋紅色
  34.   #============================================================================
  35.   def magenta
  36.     return Color.new(255, 0, 255)
  37.   end
  38.   #============================================================================
  39.   #  白色
  40.   #============================================================================
  41.   def white
  42.     return Color.new(255, 255, 255)
  43.   end
  44.   #============================================================================
  45.   #  黑色
  46.   #============================================================================
  47.   def black
  48.     return Color.new(0, 0, 0)
  49.   end
  50.   #============================================================================
  51.   #  灰色
  52.   #============================================================================
  53.   def grey
  54.     return Color.new(128, 128, 128)
  55.   end
  56.   #============================================================================
  57.   #  冰藍色
  58.   #============================================================================
  59.   def alice_blue
  60.     return Color.new(240,248,255)
  61.   end
  62.   #============================================================================
  63.   #  骨董白
  64.   #============================================================================
  65.   def antique_white
  66.     return Color.new(250,235,215)
  67.   end
  68.   #============================================================================
  69.   #  水藍色
  70.   #============================================================================
  71.   def aqua
  72.     return Color.new(0,237,255)
  73.   end
  74.   #============================================================================
  75.   #  碧綠色
  76.   #============================================================================
  77.   def aquamarine
  78.     return Color.new(127,255,212)
  79.   end
  80.   #============================================================================
  81.   #  淡青色
  82.   #============================================================================
  83.   def azure
  84.     return Color.new(240,255,255)
  85.   end
  86.   #============================================================================
  87.   #  灰棕色
  88.   #============================================================================
  89.   def beige
  90.     return Color.new(245,245,220)
  91.   end
  92.   #============================================================================
  93.   #  陶黃色
  94.   #============================================================================
  95.   def bisque
  96.     return Color.new(255,228,196)
  97.   end
  98.   #============================================================================
  99.   #  杏白色
  100.   #============================================================================
  101.   def blanched_almond
  102.     return Color.new(255,235,205)
  103.   end
  104.   #============================================================================
  105.   #  藍紫色
  106.   #============================================================================
  107.   def blue_violet
  108.     return Color.new(138,43,226)
  109.   end
  110.   #============================================================================
  111.   #  棕色
  112.   #============================================================================
  113.   def brown
  114.     return Color.new(165,42,42)
  115.   end
  116.   #============================================================================
  117.   #  粗木色
  118.   #============================================================================
  119.   def burly_wood
  120.     return Color.new(222,184,135)
  121.   end
  122.   #============================================================================
  123.   #  軍藍色
  124.   #============================================================================
  125.   def cadet_blue
  126.     return Color.new(95,158,160)
  127.   end
  128.   #============================================================================
  129.   #  淡黃綠色
  130.   #============================================================================
  131.   def chartreuse
  132.     return Color.new(127,255,0)
  133.   end
  134.   #============================================================================
  135.   #  巧克力色
  136.   #============================================================================
  137.   def chocolate
  138.     return Color.new(210,105,30)
  139.   end
  140.   #============================================================================
  141.   #  珊瑚色
  142.   #============================================================================
  143.   def coral
  144.     return Color.new(255,127,80)
  145.   end
  146.   #============================================================================
  147.   #  瞿麥藍色
  148.   #============================================================================
  149.   def cornflower_blue
  150.     return Color.new(100,149,237)
  151.   end
  152.   #============================================================================
  153.   #  黍穗色
  154.   #============================================================================
  155.   def cornsilk
  156.     return Color.new(255,248,220)
  157.   end
  158.   #============================================================================
  159.   #  深紅色
  160.   #============================================================================
  161.   def crimson
  162.     return Color.new(220,20,60)
  163.   end
  164.   #============================================================================
  165.   #  暗藍色
  166.   #============================================================================
  167.   def dark_blue
  168.     return Color.new(0,0,139)
  169.   end
  170.   #============================================================================
  171.   #  暗藍綠色
  172.   #============================================================================
  173.   def dark_cyan
  174.     return Color.new(0,139,139)
  175.   end
  176.   #============================================================================
  177.   #  暗金黃色
  178.   #============================================================================
  179.   def dark_goldenrod
  180.     return Color.new(184,134,11)
  181.   end
  182.   #============================================================================
  183.   #  暗灰色
  184.   #============================================================================
  185.   def dark_grey
  186.     return Color.new(169,169,169)
  187.   end
  188.   #============================================================================
  189.   #  暗綠色
  190.   #============================================================================
  191.   def dark_green
  192.     return Color.new(0,100,0)
  193.   end
  194.   #============================================================================
  195.   #  暗黃褐色
  196.   #============================================================================
  197.   def dark_khaki
  198.     return Color.new(189,183,107)
  199.   end
  200.   #============================================================================
  201.   #  暗洋紅色
  202.   #============================================================================
  203.   def dark_magenta
  204.     return Color.new(139,0,139)
  205.   end
  206.   #============================================================================
  207.   #  暗橄欖綠色
  208.   #============================================================================
  209.   def dark_olive_green
  210.     return Color.new(85,107,47)
  211.   end
  212.   #============================================================================
  213.   #  暗橘色
  214.   #============================================================================
  215.   def dark_orange
  216.     return Color.new(255,140,0)
  217.   end
  218.   #============================================================================
  219.   #  暗紫蘭色
  220.   #============================================================================
  221.   def dark_orchid
  222.     return Color.new(153,50,204)
  223.   end
  224.   #============================================================================
  225.   #  暗紅色
  226.   #============================================================================
  227.   def dark_red
  228.     return Color.new(139,0,0)
  229.   end
  230.   #============================================================================
  231.   #  暗粉紅色
  232.   #============================================================================
  233.   def dark_salmon
  234.     return Color.new(233,150,122)
  235.   end
  236.   #============================================================================
  237.   #  暗海綠色
  238.   #============================================================================
  239.   def dark_seagreen
  240.     return Color.new(143,188,143)
  241.   end
  242.   #============================================================================
  243.   #  暗石板藍
  244.   #============================================================================
  245.   def dark_slate_blue
  246.     return Color.new(72,61,139)
  247.   end
  248.   #============================================================================
  249.   #  暗石板灰
  250.   #============================================================================
  251.   def dark_slate_grey
  252.     return Color.new(47,79,79)
  253.   end
  254.   #============================================================================
  255.   #  暗青綠色
  256.   #============================================================================
  257.   def dark_turquoise
  258.     return Color.new(0,206,209)
  259.   end
  260.   #============================================================================
  261.   #  暗紫色
  262.   #============================================================================
  263.   def dark_violet
  264.     return Color.new(148,0,211)
  265.   end
  266.   #============================================================================
  267.   #  深粉紅色
  268.   #============================================================================
  269.   def deep_pink
  270.     return Color.new(255,20,147)
  271.   end
  272.   #============================================================================
  273.   #  深天藍色
  274.   #============================================================================
  275.   def deep_sky_blue
  276.     return Color.new(0,191,255)
  277.   end
  278.   #============================================================================
  279.   #  幽灰色
  280.   #============================================================================
  281.   def dim_grey
  282.     return Color.new(105,105,105)
  283.   end
  284.   #============================================================================
  285.   #  混藍色
  286.   #============================================================================
  287.   def dodger_blue
  288.     return Color.new(30,144,255)
  289.   end
  290.   #============================================================================
  291.   #  火磚紅
  292.   #============================================================================
  293.   def fire_brick
  294.     return Color.new(178,34,34)
  295.   end
  296.   #============================================================================
  297.   #  顏色
  298.   #============================================================================
  299.   def color
  300.     return Color.new(255, 255, 255)
  301.   end
  302. end
复制代码
VA脚本开工中...
偷窃脚本1.0 - 已完成
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
3 小时
注册时间
2005-12-4
帖子
85
10
发表于 2008-6-2 22:50:09 | 只看该作者
正好想问一个差不多的问题,就借用楼主的帖子吧。。。。
字体的大小在哪里改?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-8-3 03:26

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表