赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 17573 |
最后登录 | 2020-3-13 |
在线时间 | 304 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 138
- 在线时间
- 304 小时
- 注册时间
- 2014-4-11
- 帖子
- 419
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
我就想问问这个窗口的“按esc返回地图场景”怎么写
- #encoding:utf-8
- #==============================================================================
- # ■ 积分查询窗口
- #------------------------------------------------------------------------------
- # 作者:季寒
- # 版本:1.0
- #==============================================================================
- class Window_JHScorePoint < Window_Base
-
- def initialize(x,y,width,height)
- super(0,0,330,360)#这里是积分窗口的x,y,宽,高
- refresh
- end
-
- def update
- super
- refresh
- end
-
-
- def refresh
- self.contents.clear
- self.contents_opacity = 255
- self.contents.font.size=18 #字体大小
- @Jhnumy=32 #积分内容的行距
- @JHnumx=25 #图标离变量的距离
-
- #以下为变量的具体内容 125是图标的编号 第二行最后是变量的编号
- draw_icon(125, 0, @Jhnumy*0, enabled = true)
- draw_text_ex(@JHnumx,@Jhnumy*0,"\\c[1]积分1:\\c[0]#{$game_variables[1]}")
-
- draw_icon(125, 0, @Jhnumy*1, enabled = true)
- draw_text_ex(@JHnumx,@Jhnumy*1,"\\c[1]积分2:\\c[0]#{$game_variables[2]}")
-
- draw_icon(125, 0, @Jhnumy*2, enabled = true)
- draw_text_ex(@JHnumx,@Jhnumy*2,"\\c[1]积分3:\\c[0]#{$game_variables[3]}")
-
- draw_icon(125, 0, @Jhnumy*3, enabled = true)
- draw_text_ex(@JHnumx,@Jhnumy*3,"\\c[1]积分4:\\c[0]#{$game_variables[4]}")
-
- draw_icon(125, 0, @Jhnumy*4, enabled = true)
- draw_text_ex(@JHnumx,@Jhnumy*4,"\\c[1]积分5:\\c[0]#{$game_variables[5]}")
-
- draw_icon(125, 0, @Jhnumy*5, enabled = true)
- draw_text_ex(@JHnumx,@Jhnumy*5,"\\c[1]积分6:\\c[0]#{$game_variables[6]}")
- end
-
- end
- class Window_JHMsg < Window_Base
-
- def initialize(x,y,width,height)
- super(0,360,330,416-360)#消息显示窗口的x,y,宽,高
- refresh
- end
-
- def update
- super
- refresh
- end
-
-
- def refresh
- self.contents.clear
- self.contents_opacity = 255
- self.contents.font.size=20
- draw_text_ex(0,0,"\\c[1]积分NPC:\\c[0]哟~~~hohoho") #窗口里的内容
- end
-
- end
- class Window_JHPic < Window_Base
-
- def initialize(x,y,width,height)
- super(330,0,544-330,416) #立绘窗口的x y 宽 高
- refresh
- end
-
- def update
- super
- refresh
- end
-
- def refresh
- end
-
- end
- class ScorePoint < Scene_MenuBase
- def start
- super
- create_scorepoint_window
- create_message_window
- create_pic_window
- create_background
- end
-
- def create_background
- x=0
- y=0
- width=544
- height=416
- bitmap = Bitmap.new("Graphics/System/bg")
- @bg_sprite = Sprite.new(Viewport.new(x,y,bitmap.width,bitmap.height))
- @bg_sprite.bitmap = bitmap
- end
- def create_scorepoint_window
- @scorepoint_window = Window_JHScorePoint.new(0,0,0,0)
- end
- def create_message_window
- @message_window = Window_JHMsg.new(0,0,0,0)
- end
- def create_pic_window
- @create_pic_window=Window_JHPic.new(0,0,0,0)
- @create_pic_window.opacity=0
- x=330
- y=0
- width=194
- height=416
- bitmap = Bitmap.new("Graphics/Pictures/npc")
- end
- end
复制代码 |
|