查看: 4326|回复: 18

[已经解决] 关于UI的问题[已解决]

[复制链接]
梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
回帖
112
发表于 2019-3-27 12:40:44 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 wyw838 于 2019-3-30 23:20 编辑

emmm想在黑框位置插入图片...图片表示支线任务的完成度,如下图...请问各位大佬,这样该如何修改呢QWQ谢谢
KYLTRWT0R%I}]V2Z8J)MXU0.png
梦石
0
星屑
14720
在线时间
2175 小时
注册时间
2016-9-20
回帖
777
发表于 2019-3-27 14:30:37 | 显示全部楼层
那你支线任务想用什么表示方法,进度条,文字还是
贴子只供参考我贴子内容有很多只是我自己标识的内容代指不是原来意思,偏向发贴当时的想法(后来回看贴发现有很多错误,会造成误导 ),如果想靠谱点应 找相关正确的文章   -- 2025/4/19
回复

使用道具 举报

梦石
2
星屑
13784
在线时间
2319 小时
注册时间
2011-6-4
回帖
586
发表于 2019-3-27 18:11:30 | 显示全部楼层
先把所使用的任务脚本贴出来吧
QQ图片20190327180956.jpg
BUG反馈请加QQ 529283039
水友群 917854767

回复

使用道具 举报

梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
回帖
112
 楼主| 发表于 2019-3-28 12:28:56 | 显示全部楼层
本帖最后由 wyw838 于 2019-3-28 12:32 编辑

脚本如下Q
  1. #==============================================================================
  2. # ■ Scene_Menu
  3. #------------------------------------------------------------------------------
  4. #  处理菜单画面的类。
  5. #==============================================================================

  6. #修改部分:
  7. #添加了升级加点
  8. #去除了步数的描绘
  9. class Scene_Menu
  10.   #--------------------------------------------------------------------------
  11.   # ● 初始化对像
  12.   #     menu_index : 命令光标的初期位置
  13.   #--------------------------------------------------------------------------
  14.   def initialize(menu_index = 0)
  15.     @menu_index = menu_index
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 主处理
  19.   #--------------------------------------------------------------------------
  20.   def main
  21.     # 生成命令窗口
  22.     s1 = $data_system.words.item
  23.     s2 = $data_system.words.skill
  24.     s3 = $data_system.words.equip
  25.     s4 = "状态"
  26.     s5 = "存档"
  27.     s7 = "结束游戏"
  28.     s6 = "加点"
  29.     @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6,s7])#宽度
  30.     @command_window.index = @menu_index
  31.     # 同伴人数为 0 的情况下
  32.     if $game_party.actors.size == 0
  33.       # 物品、特技、装备、状态无效化
  34.       @command_window.disable_item(0)
  35.       @command_window.disable_item(1)
  36.       @command_window.disable_item(2)
  37.       @command_window.disable_item(3)
  38.     end
  39.     # 禁止存档的情况下
  40.     if $game_system.save_disabled
  41.       # 存档无效
  42.       @command_window.disable_item(4)
  43.     end
  44.     # 生成游戏时间窗口
  45.     @playtime_window = Window_PlayTime.new
  46.     @playtime_window.x = 0
  47.     @playtime_window.y = 320
  48.     # 生成步数窗口
  49.     #删@steps_window = Window_Steps.new
  50.     #@steps_window.x = 0
  51.     #@steps_window.y = 320
  52.     # 生成金钱窗口
  53.     @gold_window = Window_Gold.new
  54.     @gold_window.x = 0
  55.     @gold_window.y = 416
  56.     # 生成状态窗口
  57.     @status_window = Window_MenuStatus.new
  58.     @status_window.x = 160
  59.     @status_window.y = 0
  60.     # 执行过渡
  61.     Graphics.transition
  62.     # 主循环
  63.     loop do
  64.       # 刷新游戏画面
  65.       Graphics.update
  66.       # 刷新输入信息
  67.       Input.update
  68.       # 刷新画面
  69.       update
  70.       # 如果切换画面就中断循环
  71.       if $scene != self
  72.         break
  73.       end
  74.     end
  75.     # 准备过渡
  76.     Graphics.freeze
  77.     # 释放窗口
  78.     @command_window.dispose
  79.     @playtime_window.dispose
  80.     #删@steps_window.dispose
  81.     @gold_window.dispose
  82.     @status_window.dispose
  83.   end
  84.   #--------------------------------------------------------------------------
  85.   # ● 刷新画面
  86.   #--------------------------------------------------------------------------
  87.   def update
  88.     # 刷新窗口
  89.     @command_window.update
  90.     @playtime_window.update
  91.     #删@steps_window.update
  92.     @gold_window.update
  93.     @status_window.update
  94.     # 命令窗口被激活的情况下: 调用 update_command
  95.     if @command_window.active
  96.       update_command
  97.       return
  98.     end
  99.     # 状态窗口被激活的情况下: 调用 update_status
  100.     if @status_window.active
  101.       update_status
  102.       return
  103.     end
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # ● 刷新画面 (命令窗口被激活的情况下)
  107.   #--------------------------------------------------------------------------
  108.   def update_command
  109.     # 按下 B 键的情况下
  110.     if Input.trigger?(Input::B)
  111.       # 演奏取消 SE
  112.       $game_system.se_play($data_system.cancel_se)
  113.       # 切换的地图画面
  114.       $scene = Scene_Map.new
  115.       return
  116.     end
  117.     # 按下 C 键的情况下
  118.     if Input.trigger?(Input::C)
  119.       # 同伴人数为 0、存档、游戏结束以外的场合
  120.       if $game_party.actors.size == 0 and @command_window.index < 4
  121.         # 演奏冻结 SE
  122.         $game_system.se_play($data_system.buzzer_se)
  123.         return
  124.       end
  125.       # 命令窗口的光标位置分支
  126.       case @command_window.index
  127.       when 0  # 物品
  128.         # 演奏确定 SE
  129.         $game_system.se_play($data_system.decision_se)
  130.         # 切换到物品画面
  131.         $scene = Scene_Item.new
  132.       when 1  # 特技
  133.         # 演奏确定 SE
  134.         $game_system.se_play($data_system.decision_se)
  135.         # 激活状态窗口
  136.         @command_window.active = false
  137.         @status_window.active = true
  138.         @status_window.index = 0
  139.       when 2  # 装备
  140.         # 演奏确定 SE
  141.         $game_system.se_play($data_system.decision_se)
  142.         # 激活状态窗口
  143.         @command_window.active = false
  144.         @status_window.active = true
  145.         @status_window.index = 0
  146.       when 3  # 状态
  147.         # 演奏确定 SE
  148.         $game_system.se_play($data_system.decision_se)
  149.         # 激活状态窗口
  150.         @command_window.active = false
  151.         @status_window.active = true
  152.         @status_window.index = 0
  153.       when 4  # 存档
  154.         # 禁止存档的情况下
  155.         if $game_system.save_disabled
  156.           # 演奏冻结 SE
  157.           $game_system.se_play($data_system.buzzer_se)
  158.           return
  159.         end
  160.         # 演奏确定 SE
  161.         $game_system.se_play($data_system.decision_se)
  162.         # 切换到存档画面
  163.         $scene = Scene_Save.new
  164.       when 6  # 游戏结束
  165.         # 演奏确定 SE
  166.         $game_system.se_play($data_system.decision_se)
  167.         # 切换到游戏结束画面
  168.         $scene = Scene_End.new
  169.       when 5           ###改
  170.         # 演奏确定 SE
  171.         $game_system.se_play($data_system.decision_se)
  172.         # 切换到加点
  173.         $scene = Scene_Lvup.new        
  174.       end
  175.       return
  176.     end
  177.   end
  178.   #--------------------------------------------------------------------------
  179.   # ● 刷新画面 (状态窗口被激活的情况下)
  180.   #--------------------------------------------------------------------------
  181.   def update_status
  182.     # 按下 B 键的情况下
  183.     if Input.trigger?(Input::B)
  184.       # 演奏取消 SE
  185.       $game_system.se_play($data_system.cancel_se)
  186.       # 激活命令窗口
  187.       @command_window.active = true
  188.       @status_window.active = false
  189.       @status_window.index = -1
  190.       return
  191.     end
  192.     # 按下 C 键的情况下
  193.     if Input.trigger?(Input::C)
  194.       # 命令窗口的光标位置分支
  195.       case @command_window.index
  196.       when 1  # 特技
  197.         # 本角色的行动限制在 2 以上的情况下
  198.         if $game_party.actors[@status_window.index].restriction >= 2
  199.           # 演奏冻结 SE
  200.           $game_system.se_play($data_system.buzzer_se)
  201.           return
  202.         end
  203.         # 演奏确定 SE
  204.         $game_system.se_play($data_system.decision_se)
  205.         # 切换到特技画面
  206.         $scene = Scene_Skill.new(@status_window.index)
  207.       when 2  # 装备
  208.         # 演奏确定 SE
  209.         $game_system.se_play($data_system.decision_se)
  210.         # 切换的装备画面
  211.         $scene = Scene_Equip.new(@status_window.index)
  212.       when 3  # 状态
  213.         # 演奏确定 SE
  214.         $game_system.se_play($data_system.decision_se)
  215.         # 切换到状态画面
  216.         $scene = Scene_Status.new(@status_window.index)
  217.       end
  218.       return
  219.     end
  220.   end
  221. end
复制代码
Q
  1. #==============================================================================
  2. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  3. #==============================================================================
  4. #需要调整的地方:
  5. #1.菜单中改角色脸谱为角色头像
  6. #2.升级加点中改角色脸谱为战斗图
  7. #3.加点属性更改
  8. class Scene_Save
  9.   #--------------------------------------------------------------------------
  10.   # ● 写入存档数据
  11.   #     file : 写入用文件对像 (已经打开)
  12.   #--------------------------------------------------------------------------
  13.   def write_save_data(file)
  14.     # 生成描绘存档文件用的角色图形
  15.     characters = []
  16.     for i in 0...[$game_party.actors.size,4].min
  17.       actor = $game_party.actors[i]
  18.       characters.push([actor.character_name, actor.character_hue])
  19.     end
  20.     # 写入描绘存档文件用的角色数据
  21.     Marshal.dump(characters, file)
  22.     # 写入测量游戏时间用画面计数
  23.     Marshal.dump(Graphics.frame_count, file)
  24.     # 增加 1 次存档次数
  25.     $game_system.save_count += 1
  26.     # 保存魔法编号
  27.     # (将编辑器保存的值以随机值替换)
  28.     $game_system.magic_number = $data_system.magic_number
  29.     # 写入各种游戏对像
  30.     Marshal.dump($game_system, file)
  31.     Marshal.dump($game_switches, file)
  32.     Marshal.dump($game_variables, file)
  33.     Marshal.dump($game_self_switches, file)
  34.     Marshal.dump($game_screen, file)
  35.     Marshal.dump($game_actors, file)
  36.     Marshal.dump($game_party, file)
  37.     Marshal.dump($game_troop, file)
  38.     Marshal.dump($game_map, file)
  39.     Marshal.dump($game_player, file)
  40.   end
  41. end

  42. class Scene_Battle
  43.   #--------------------------------------------------------------------------
  44.   # ● 设置物品或特技对像方的战斗者
  45.   #     scope : 特技或者是物品的范围
  46.   #--------------------------------------------------------------------------
  47.   def set_target_battlers(scope)
  48.     # 行动方的战斗者是敌人的情况下
  49.     if @active_battler.is_a?(Game_Enemy)
  50.       # 效果范围分支
  51.       case scope
  52.       when 1  # 敌单体
  53.         index = @active_battler.current_action.target_index
  54.         @target_battlers.push($game_party.smooth_target_actor(index))
  55.       when 2  # 敌全体
  56.         for actor in 0...[$game_party.actors.size,4].min
  57.           if $game_party.actors[actor].exist?
  58.             @target_battlers.push($game_party.actors[actor])
  59.           end
  60.         end
  61.       when 3  # 我方单体
  62.         index = @active_battler.current_action.target_index
  63.         @target_battlers.push($game_troop.smooth_target_enemy(index))
  64.       when 4  # 我方全体
  65.         for enemy in $game_troop.enemies
  66.           if enemy.exist?
  67.             @target_battlers.push(enemy)
  68.           end
  69.         end
  70.       when 5  # 我方单体 (HP 0)
  71.         index = @active_battler.current_action.target_index
  72.         enemy = $game_troop.enemies[index]
  73.         if enemy != nil and enemy.hp0?
  74.           @target_battlers.push(enemy)
  75.         end
  76.       when 6  # 我方全体 (HP 0)
  77.         for enemy in $game_troop.enemies
  78.           if enemy != nil and enemy.hp0?
  79.             @target_battlers.push(enemy)
  80.           end
  81.         end
  82.       when 7  # 使用者
  83.         @target_battlers.push(@active_battler)
  84.       end
  85.     end
  86.     # 行动方的战斗者是角色的情况下
  87.     if @active_battler.is_a?(Game_Actor)
  88.       # 效果范围分支
  89.       case scope
  90.       when 1  # 敌单体
  91.         index = @active_battler.current_action.target_index
  92.         @target_battlers.push($game_troop.smooth_target_enemy(index))
  93.       when 2  # 敌全体
  94.         for enemy in $game_troop.enemies
  95.           if enemy.exist?
  96.             @target_battlers.push(enemy)
  97.           end
  98.         end
  99.       when 3  # 我方单体
  100.         index = @active_battler.current_action.target_index
  101.         @target_battlers.push($game_party.smooth_target_actor(index))
  102.       when 4  # 我方全体
  103.         for actor in 0...[$game_party.actors.size,4].min
  104.           if $game_party.actors[actor].exist?
  105.             @target_battlers.push($game_party.actors[actor])
  106.           end
  107.         end
  108.       when 5  # 我方单体 (HP 0)
  109.         index = @active_battler.current_action.target_index
  110.         actor = $game_party.actors[index]
  111.         if actor != nil and actor.hp0?
  112.           @target_battlers.push(actor)
  113.         end
  114.       when 6  # 我方全体 (HP 0)
  115.         for actor in 0...[$game_party.actors.size,4].min
  116.           if $game_party.actors[actor] != nil and $game_party.actors[actor].hp0?
  117.             @target_battlers.push($game_party.actors[actor])
  118.           end
  119.         end
  120.       when 7  # 使用者
  121.         @target_battlers.push(@active_battler)
  122.       end
  123.     end
  124.   end  
  125.   #--------------------------------------------------------------------------
  126.   # ● 生成行动循序
  127.   #--------------------------------------------------------------------------
  128.   def make_action_orders
  129.     # 初始化序列 @action_battlers
  130.     @action_battlers = []
  131.     # 添加敌人到 @action_battlers 序列
  132.     for enemy in $game_troop.enemies
  133.       @action_battlers.push(enemy)
  134.     end
  135.     # 添加角色到 @action_battlers 序列
  136.     for actor in 0...[$game_party.actors.size,4].min
  137.       @action_battlers.push($game_party.actors[actor])
  138.     end
  139.     # 确定全体的行动速度
  140.     for battler in @action_battlers
  141.       battler.make_action_speed
  142.     end
  143.     # 按照行动速度从大到小排列
  144.     @action_battlers.sort! {|a,b|
  145.       b.current_action.speed - a.current_action.speed }
  146.   end
  147.   #--------------------------------------------------------------------------
  148.   # ● 开始结束战斗回合
  149.   #--------------------------------------------------------------------------
  150.   def start_phase5
  151.     # 转移到回合 5
  152.     @phase = 5
  153.         if $game_switches[79] == true
  154.   $game_variables[100] += 1
  155.   end
  156.     # 演奏战斗结束 ME
  157.     $game_system.me_play($game_system.battle_end_me)
  158.     # 还原为战斗开始前的 BGM
  159.     $game_system.bgm_play($game_temp.map_bgm)
  160.     # 初始化 EXP、金钱、宝物
  161.     exp = 0
  162.     gold = 0
  163.     treasures = []
  164.     # 循环
  165.     for enemy in $game_troop.enemies
  166.       # 敌人不是隐藏状态的情况下
  167.       unless enemy.hidden
  168.         # 获得 EXP、增加金钱
  169.         exp += enemy.exp
  170.         gold += enemy.gold
  171.         # 出现宝物判定
  172.         if rand(100) < enemy.treasure_prob
  173.           if enemy.item_id > 0
  174.             treasures.push($data_items[enemy.item_id])
  175.           end
  176.           if enemy.weapon_id > 0
  177.             treasures.push($data_weapons[enemy.weapon_id])
  178.           end
  179.           if enemy.armor_id > 0
  180.             treasures.push($data_armors[enemy.armor_id])
  181.           end
  182.         end
  183.       end
  184.     end
  185.     # 限制宝物数为 6 个
  186.     treasures = treasures[0..5]
  187.     # 获得 EXP
  188.     for i in 0...[$game_party.actors.size,4].min
  189.       actor = $game_party.actors[i]
  190.       if actor.cant_get_exp? == false
  191.         last_level = actor.level
  192.         actor.exp += exp
  193.         if actor.level > last_level
  194.           @status_window.level_up(i)
  195.         end
  196.       end
  197.     end
  198.     # 获得金钱
  199.     $game_party.gain_gold(gold)
  200.     # 获得宝物
  201.     for item in treasures
  202.       case item
  203.       when RPG::Item
  204.         $game_party.gain_item(item.id, 1)
  205.       when RPG::Weapon
  206.         $game_party.gain_weapon(item.id, 1)
  207.       when RPG::Armor
  208.         $game_party.gain_armor(item.id, 1)
  209.       end
  210.     end
  211.     # 生成战斗结果窗口
  212.     @result_window = Window_BattleResult.new(exp, gold, treasures)
  213.     # 设置等待计数
  214.     @phase5_wait_count = 100
  215.   end
  216.   #--------------------------------------------------------------------------
  217.   # ● 转到输入下一个角色的命令
  218.   #--------------------------------------------------------------------------
  219.   def phase3_next_actor
  220.     # 循环
  221.     begin
  222.       # 角色的明灭效果 OFF
  223.       if @active_battler != nil
  224.         @active_battler.blink = false
  225.       end
  226.       # 最后的角色的情况
  227.       if @actor_index == [$game_party.actors.size-1,3].min
  228.         # 开始主回合
  229.         start_phase4
  230.         return
  231.       end
  232.       # 推进角色索引
  233.       @actor_index += 1
  234.       @active_battler = $game_party.actors[@actor_index]
  235.       @active_battler.blink = true
  236.     # 如果角色是在无法接受指令的状态就再试
  237.     end until @active_battler.inputable?
  238.     # 设置角色的命令窗口
  239.     phase3_setup_command_window
  240.   end
  241. end

  242. class Arrow_Actor < Arrow_Base  
  243.   #--------------------------------------------------------------------------
  244.   # ● 刷新画面
  245.   #--------------------------------------------------------------------------
  246.   def update
  247.     super
  248.     # 光标右
  249.     if Input.repeat?(Input::RIGHT)
  250.       $game_system.se_play($data_system.cursor_se)
  251.       @index += 1
  252.       @index %= [$game_party.actors.size,4].min
  253.     end
  254.     # 光标左
  255.     if Input.repeat?(Input::LEFT)
  256.       $game_system.se_play($data_system.cursor_se)
  257.       @index += $game_party.actors.size - 1
  258.       @index %= [$game_party.actors.size,4].min
  259.     end
  260.     # 设置活动块坐标
  261.     if self.actor != nil
  262.       self.x = self.actor.screen_x
  263.       self.y = self.actor.screen_y
  264.     end
  265.   end
  266. end

  267. #==============================================================================
  268. # ■ Window_Target
  269. #------------------------------------------------------------------------------
  270. #  物品画面与特技画面的、使用对像角色选择窗口。
  271. #==============================================================================

  272. class Window_Target < Window_Selectable
  273. #--------------------------------------------------------------------------
  274. # ● 初始化对像
  275. #--------------------------------------------------------------------------
  276. def initialize
  277.    super(0, 0, 336, 480)
  278.    self.contents = Bitmap.new(width - 32, $game_party.actors.size*112)
  279.    self.z += 10
  280.    @item_max = $game_party.actors.size
  281.    @top_row = 0
  282.    refresh
  283. end
  284. #--------------------------------------------------------------------------
  285. # ● 刷新
  286. #--------------------------------------------------------------------------
  287. def refresh
  288.    self.contents.clear
  289.    for i in 0...$game_party.actors.size
  290.      x = 4
  291.      y = i * 112
  292.      actor = $game_party.actors[i]
  293.      draw_actor_name(actor, x-40, y)
  294.      #draw_actor_class(actor, x + 144, y)
  295.      draw_actor_level(actor, x -32 , y + 32)
  296.      draw_actor_state(actor, x -32, y + 64)
  297.      draw_actor_hp(actor, x + 152, y + 32)
  298.      draw_actor_sp(actor, x + 152, y + 64)
  299.    end
  300. end  
  301. #--------------------------------------------------------------------------
  302. # ● 刷新光标矩形
  303. #--------------------------------------------------------------------------
  304. def update_cursor_rect   
  305.    # 光标位置 -1 为全选、-2 以下为单独选择 (使用者自身)
  306.    if @index <= -2
  307.      self.cursor_rect.set(0, (@index + 10) * 112, self.width - 32, 96)
  308.    elsif @index == -1
  309.      self.cursor_rect.set(0, 0, self.width - 32, @item_max * 112 - 20)
  310.    else
  311.      tpy = @index * 112 - self.oy
  312.      self.cursor_rect.set(0, tpy, self.width - 32, 96)
  313.      if @index < @top_row
  314.        @top_row = @index
  315.        self.oy = @top_row *112
  316.      end
  317.      if @index > @top_row+3
  318.        @top_row = @index-3
  319.        self.oy = @top_row *112
  320.      end
  321.    end   
  322. end
  323. end
  324. #==============================================================================
  325. # ■ Window_MenuStatus
  326. #------------------------------------------------------------------------------
  327. #  显示菜单画面和同伴状态的窗口。
  328. #==============================================================================

  329. class Window_MenuStatus < Window_Selectable
  330.   #--------------------------------------------------------------------------
  331.   # ● 初始化目标
  332.   #--------------------------------------------------------------------------
  333.   def initialize
  334.     super(0, 0, 480, 380)
  335.     self.contents = Bitmap.new(width - 32,  $game_party.actors.size*112)
  336.     refresh
  337.     @top_row = 0
  338.     self.active = false
  339.     self.index = -1
  340.   end
  341.   #--------------------------------------------------------------------------
  342.   # ● 刷新
  343.   #--------------------------------------------------------------------------
  344.   def refresh
  345.     self.contents.clear
  346.     @item_max = $game_party.actors.size
  347.     for i in 0...$game_party.actors.size
  348.       x = 64
  349.       y = i * 112
  350.       if i <=3
  351.         self.contents.font.color = Color.new(255,255,0,255)
  352.         #self.contents.draw_text(x,y,340,32,"[出战]",2)
  353.         self.contents.font.color = normal_color
  354.       else
  355.         self.contents.font.color = Color.new(128,128,128,255)
  356.         self.contents.draw_text(x,y,340,32,"[支援]",2)
  357.         self.contents.font.color = normal_color
  358.       end      
  359.       actor = $game_party.actors[i]
  360.       draw_actor_graphic(actor, x-20, y + 80)
  361.       draw_actor_name(actor, x+20, y)
  362.       #draw_actor_class(actor, x + 144, y)
  363.       draw_actor_level(actor, x+20, y + 32)
  364.       draw_actor_state(actor, x+20, y + 64)
  365.       #draw_actor_exp(actor, x, y + 64)
  366.       draw_actor_hp(actor, x + 136, y + 32)
  367.       draw_actor_sp(actor, x + 136, y + 64)
  368.     end
  369.   end
  370.   #--------------------------------------------------------------------------
  371.   # ● 刷新光标矩形
  372.   #--------------------------------------------------------------------------
  373.   def update_cursor_rect
  374.     if @index < 0
  375.       self.cursor_rect.empty
  376.     else
  377.       tpy = @index * 112 - self.oy
  378.       self.cursor_rect.set(0, tpy, self.width - 32, 96)
  379.       if @index < @top_row
  380.         @top_row = @index
  381.         self.oy = @top_row *112
  382.       end
  383.       if @index > @top_row+3
  384.         @top_row = @index-3
  385.         self.oy = @top_row *112
  386.       end
  387.     end
  388.   end
  389. end

  390. class Game_Party
  391.   #--------------------------------------------------------------------------
  392.   # ● 全灭判定
  393.   #--------------------------------------------------------------------------
  394.   def all_dead?
  395.     # 同伴人数为 0 的情况下
  396.     if $game_party.actors.size == 0
  397.       return false
  398.     end
  399.     # 同伴中无人 HP 在 0 以上
  400.     for i in 0..3
  401.       if @actors[i] != nil and@actors[i].hp >0
  402.         return false
  403.       end
  404.     end
  405.     # 全灭
  406.     return true
  407.   end
  408.   #--------------------------------------------------------------------------
  409.   # ● 加入同伴
  410.   #     actor_id : 角色 ID
  411.   #--------------------------------------------------------------------------
  412.   def add_actor(actor_id)
  413.     # 获取角色
  414.     actor = $game_actors[actor_id]
  415.     # 同伴人数未满 4 人、本角色不在队伍中的情况下
  416.     if not @actors.include?(actor)
  417.       # 添加角色
  418.       @actors.push(actor)
  419.       # 还原主角
  420.       $game_player.refresh
  421.     end
  422.   end
  423. end

  424. #==============================================================================
  425. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  426. #==============================================================================


  427. class Scene_Menu
  428. # --------------------------------
  429.   def initialize(menu_index = 0)
  430.     @menu_index = menu_index
  431.     @changer = 0
  432.     @where = 0
  433.     @checker = 0
  434.   end
  435. # --------------------------------
  436.   def main
  437.     s1 = $data_system.words.item
  438.     s2 = $data_system.words.skill
  439.     s3 = $data_system.words.equip
  440.     s4 = "状态"
  441.     s5 = "储存进度"
  442.     s6 = "离开游戏"
  443.     s7 = "调整队伍"
  444.     s8 = "升级加点"
  445.     s9 = "任务列表(未实装)"
  446.     @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9])
  447.     @command_window.index = @menu_index
  448.     if $game_party.actors.size == 0
  449.       @command_window.disable_item(0)
  450.       @command_window.disable_item(1)
  451.       @command_window.disable_item(2)
  452.       @command_window.disable_item(3)
  453.     end
  454.     if $game_system.save_disabled
  455.       @command_window.disable_item(4)
  456.     end
  457.     if $game_party.actors.size == 1
  458.       @command_window.disable_item(6)
  459.     end
  460.     @playtime_window = Window_PlayTime.new
  461.     @playtime_window.x = 0
  462.     @playtime_window.y = 320
  463.     @gold_window = Window_Gold.new
  464.     @gold_window.x = 0
  465.     @gold_window.y = 416
  466.     @status_window = Window_MenuStatus.new
  467.     @status_window.x = 260
  468.     @status_window.y = 0
  469.     Graphics.transition
  470.     loop do
  471.       Graphics.update
  472.       Input.update
  473.       update
  474.       if $scene != self
  475.         break
  476.       end
  477.     end
  478.     Graphics.freeze
  479.     @command_window.dispose
  480.     @playtime_window.dispose
  481.     @gold_window.dispose
  482.     @status_window.dispose
  483.   end
  484. # --------------------------------
  485.   def update
  486.     @command_window.update
  487.     @playtime_window.update
  488.     @gold_window.update
  489.     @status_window.update
  490.     if @command_window.active
  491.       update_command
  492.       return
  493.     end
  494.     if @status_window.active
  495.       update_status
  496.       return
  497.     end
  498.   end
  499. # --------------------------------
  500.   def update_command
  501.     if Input.trigger?(Input::B)
  502.       $game_system.se_play($data_system.cancel_se)
  503.       $scene = Scene_Map.new
  504.       return
  505.     end
  506.     if Input.trigger?(Input::C)
  507.       if $game_party.actors.size == 0 and @command_window.index < 4
  508.         $game_system.se_play($data_system.buzzer_se)
  509.         return
  510.       end
  511.       if $game_party.actors.size == 1 and @command_window.index ==6
  512.         $game_system.se_play($data_system.buzzer_se)
  513.         return
  514.       end
  515.       case @command_window.index
  516.       when 0
  517.         $game_system.se_play($data_system.decision_se)
  518.         $scene = Scene_Item.new
  519.       when 1
  520.         $game_system.se_play($data_system.decision_se)
  521.         @command_window.active = false
  522.         @status_window.active = true
  523.         @status_window.index = 0
  524.       when 2
  525.         $game_system.se_play($data_system.decision_se)
  526.         @command_window.active = false
  527.         @status_window.active = true
  528.         @status_window.index = 0
  529.       when 3
  530.         $game_system.se_play($data_system.decision_se)
  531.         @command_window.active = false
  532.         @status_window.active = true
  533.         @status_window.index = 0
  534.       when 4
  535.         if $game_system.save_disabled
  536.           $game_system.se_play($data_system.buzzer_se)
  537.           return
  538.         end
  539.         $game_system.se_play($data_system.decision_se)
  540.         $scene = Scene_Save.new
  541.       when 5
  542.         $game_system.se_play($data_system.decision_se)
  543.         $scene = Scene_End.new
  544.       when 6
  545.         $game_system.se_play($data_system.decision_se)
  546.         @checker = 0
  547.         @command_window.active = false
  548.         @status_window.active = true
  549.         @status_window.index = 0
  550.       when 7
  551.         $game_system.se_play($data_system.decision_se)
  552.         @command_window.active = false
  553.         @status_window.active = true
  554.         @status_window.index = 0
  555.       when 8
  556.         $game_system.se_play($data_system.decision_se)
  557.         @command_window.active = false
  558.         @status_window.active = true
  559.         @status_window.index = 0
  560.       end
  561.       return
  562.     end
  563.   end
  564. # --------------------------------
  565.   def update_status
  566.     if Input.trigger?(Input::B)
  567.       $game_system.se_play($data_system.cancel_se)
  568.       @command_window.active = true
  569.       @status_window.active = false
  570.       @status_window.index = -1
  571.       return
  572.     end
  573.     if Input.trigger?(Input::C)
  574.       case @command_window.index
  575.       when 1
  576.         if $game_party.actors[@status_window.index].restriction >= 2
  577.           $game_system.se_play($data_system.buzzer_se)
  578.           return
  579.         end
  580.         $game_system.se_play($data_system.decision_se)
  581.         $scene = Scene_Skill.new(@status_window.index)
  582.       when 2
  583.         $game_system.se_play($data_system.decision_se)
  584.         $scene = Scene_Equip.new(@status_window.index)
  585.       when 3
  586.         $game_system.se_play($data_system.decision_se)
  587.         $scene = Scene_Status.new(@status_window.index)
  588.       when 6
  589.         $game_system.se_play($data_system.decision_se)
  590.         if @checker == 0
  591.           @changer = $game_party.actors[@status_window.index]
  592.           @where = @status_window.index
  593.           @checker = 1
  594.         else
  595.           $game_party.actors[@where] = $game_party.actors[@status_window.index]
  596.           $game_party.actors[@status_window.index] = @changer
  597.           @checker = 0
  598.           @status_window.refresh
  599.         end
  600.       when 7
  601.         $game_system.se_play($data_system.decision_se)
  602.         $scene = Scene_Lvup.new(@status_window.index)
  603.       when 8
  604.         $game_system.se_play($data_system.decision_se)
  605.         $scene = Scene_Charactor.new(@status_window.index)
  606.       end
  607.       return
  608.     end
  609.   end
  610. end



  611.     #插件(升级加点,换队伍顺序,人物介绍,动态行走图)

  612. #==============================================================================
  613. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  614. #==============================================================================


  615. # 作者: 柳柳
  616. #
  617. # 说明:这是功能我再比较早期的时候发布在幻森,不过那时候比较笨,方法很糟糕
  618. #       这次是拿上就可以用的。
  619. #
  620. # 感谢:Claimh的脚本使我想起这个功能重做了一遍,本想直接用他的,不过他的算法过分
  621. #       冗余了,没好意思用。
  622. #==============================================================================
  623. # 使用方法:默认情况下把静态图变为了走步图。如果想自行修改,提供功能如下:
  624. #
  625. # 角色走步图:draw_walk_actor_graphic
  626. # 角色转向图:draw_turn_actor_graphic
  627. #
  628. # 回复原有静态角色图:删除100行以后的内容。修改下面这个变量可以更改行走速度
  629. #==============================================================================

  630. WALK_REFRESH_FRAME_SPEED = 15  # 刷新的速度,越大越慢,你可以改为3左右试试看

  631. #==============================================================================
  632. # Window_Base
  633. #==============================================================================
  634. class Window_Base < Window
  635.   #--------------------------------------------------------------------------
  636.   # 初始化方法
  637.   #--------------------------------------------------------------------------
  638.   alias initialize_walk initialize
  639.   def initialize(x, y, width, height)
  640.     initialize_walk(x, y, width, height)
  641.     @start_walk = false
  642.     @turn_index = 0
  643.     @turn_phase = 0
  644.   end
  645.   #--------------------------------------------------------------------------
  646.   # ★  角色行走图
  647.   #     actor : 角色
  648.   #     x     : 描绘的 X 坐标
  649.   #     y     : 描绘的 Y 坐标
  650.   #--------------------------------------------------------------------------
  651.   def draw_walk_actor_graphic(actor, x, y)
  652.     bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
  653.     cw = bitmap.width / 4
  654.     ch = bitmap.height / 4
  655.     @start_turn = true
  656.     case @turn_phase
  657.     when 0
  658.       x_x = 0
  659.     when 1
  660.       x_x = cw
  661.     when 2
  662.       x_x = cw * 2
  663.     when 3
  664.       x_x = cw * 3
  665.     end
  666.     src_rect = Rect.new(x_x, 0, cw, ch)
  667.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  668.   end
  669.   #--------------------------------------------------------------------------
  670.   # ★  角色转向图
  671.   #     actor : 角色
  672.   #     x     : 描绘的 X 坐标
  673.   #     y     : 描绘的 Y 坐标
  674.   #--------------------------------------------------------------------------
  675.   def draw_turn_actor_graphic(actor, x, y)
  676.     bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
  677.     cw = bitmap.width / 4
  678.     ch = bitmap.height / 4
  679.     @start_turn = true
  680.     case @turn_phase
  681.     when 0
  682.       x_x = 0
  683.     when 1
  684.       x_x = ch
  685.     when 2
  686.       x_x = ch * 3
  687.     when 3
  688.       x_x = ch * 2
  689.     end
  690.     src_rect = Rect.new(0, x_x, cw, ch)
  691.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  692.   end
  693.   #--------------------------------------------------------------------------
  694.   #  更新(可别使用刷新,玩命耗费内存= =)
  695.   #--------------------------------------------------------------------------
  696.   alias walk_update update
  697.   def update
  698.     walk_update
  699.     if @start_turn == true
  700.       @turn_index += 1
  701.       if @turn_index == WALK_REFRESH_FRAME_SPEED
  702.         refresh
  703.         @turn_index = 0
  704.         @turn_phase = (@turn_phase+1)%4
  705.       end
  706.     end
  707.   end  
  708. end

  709. #==============================================================================
  710. # Window_Base
  711. #==============================================================================
  712. class Window_Base < Window
  713.   #--------------------------------------------------------------------------
  714.   # 把原有静态图改为动态走步图
  715.   #--------------------------------------------------------------------------
  716.   def draw_actor_graphic(actor, x, y)
  717.     draw_walk_actor_graphic(actor, x, y)
  718.   end
  719. end

  720. #==============================================================================
  721. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  722. #==============================================================================

  723. #==============================================================================
  724. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  725. #==============================================================================


  726. # 脚本使用设定:

  727. LEVEL_UP_POINT = 3  # 每升一级所增加的点数
  728. LEVEL_UP_VARIABLE = 200  # 储存角色点数的变量编号与角色id编号的差值
  729.                          # 默认情况 = 200,
  730.                          # 则是数据库里1号角色的加点数存于101号变量
  731.                          # 3号角色的加点数存于103号变量。
  732.                          # 你可以直接操作变量赠与角色可分配点数

  733. # 每增加一次点数,各项能力值的变化:357-410行
  734.                         
  735. # 使用方法介绍:

  736. # 本脚本不会取代原升级功能 也就是说,默认的升级还在,但可以用这个功能手动追加点数。
  737. # 如果你想纯粹使用手动加点(而升级不提升能力),只要把数据库中角色升级能力,
  738. # 1-99级全部等于一个相同数值就行了。

  739. # 呼唤加点场景的方法:$scene = Scene_Lvup.new(角色编号,返回菜单编号)。
  740. # 默认都是0号

  741. # 加点场景中,page up,page down换人,如果想加点完毕后返回地图,
  742. # 464行$scene = Scene_Menu.new(0)改为$scene = Scene_Map.new

  743. # 推荐脚本搭配:魔法商店脚本,两者结合,制作自由型RPG

  744. #==============================================================================
  745. # ■ Window_Command
  746. #------------------------------------------------------------------------------
  747. #  一般的命令选择行窗口。(追加定义)
  748. #==============================================================================
  749. class Window_Command < Window_Selectable
  750.   #--------------------------------------------------------------------------
  751.   # ● 项目有效化
  752.   #     index : 项目编号
  753.   #--------------------------------------------------------------------------
  754.   def able_item(index)
  755.     draw_item(index, normal_color)
  756.   end
  757. end
  758. #==============================================================================
  759. # ■ Game_Actor
  760. #------------------------------------------------------------------------------
  761. #  处理角色的类。(再定义)
  762. #==============================================================================
  763. class Game_Actor < Game_Battler
  764.   #--------------------------------------------------------------------------
  765.   # ● 更改 EXP
  766.   #     exp : 新的 EXP
  767.   #--------------------------------------------------------------------------
  768.   def exp=(exp)
  769.     @exp = [[exp, 9999999].min, 0].max
  770.     # 升级
  771.     while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  772.       @level += 1
  773.       # 增加4点可自由分配的点数
  774.       $game_variables[self.id + LEVEL_UP_VARIABLE] += LEVEL_UP_POINT
  775.       # 学会特技
  776.       for j in $data_classes[@class_id].learnings
  777.         if j.level == @level
  778.           learn_skill(j.skill_id)
  779.         end
  780.       end
  781.     end
  782.     # 降级
  783.     while @exp < @exp_list[@level]
  784.       @level -= 1
  785.     end
  786.     # 修正当前的 HP 与 SP 超过最大值
  787.     @hp = [@hp, self.maxhp].min
  788.     @sp = [@sp, self.maxsp].min
  789.   end
  790. end
  791. #==============================================================================
  792. # ■ Window_Base
  793. #------------------------------------------------------------------------------
  794. #  游戏中全部窗口的超级类(追加定义)
  795. #==============================================================================
  796. class Window_Base < Window
  797.   #--------------------------------------------------------------------------
  798.   # ● 描绘 HP
  799.   #     actor : 角色
  800.   #     x     : 描画目标 X 坐标
  801.   #     y     : 描画目标 Y 坐标
  802.   #     width : 描画目标的宽
  803.   #--------------------------------------------------------------------------
  804.   def draw_actor_hp_lvup(actor, x, y)
  805.     self.contents.font.color = system_color
  806.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.hp)
  807.     if $temp_hp == 0
  808.       self.contents.font.color = normal_color
  809.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxhp.to_s, 2)
  810.     else
  811.       maxhp = actor.maxhp + $temp_hp
  812.       self.contents.font.color = Color.new(255, 128, 128, 255)
  813.       self.contents.draw_text(x + 120 , y, 48, 32, maxhp.to_s ,2)
  814.       self.contents.font.color = normal_color      
  815.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  816.       if $temp_hp >=0
  817.         self.contents.font.color = Color.new(255, 128, 128, 255)
  818.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  819.       else
  820.         self.contents.font.color = Color.new(255,255,0,255)
  821.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  822.       end
  823.       self.contents.draw_text(x + 200, y, 36, 32, $temp_hp.to_s, 2)
  824.       self.contents.font.color = normal_color
  825.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  826.     end
  827.   end
  828.   #--------------------------------------------------------------------------
  829.   # ● 描绘 SP
  830.   #     actor : 角色
  831.   #     x     : 描画目标 X 坐标
  832.   #     y     : 描画目标 Y 坐标
  833.   #     width : 描画目标的宽
  834.   #--------------------------------------------------------------------------
  835.   def draw_actor_sp_lvup(actor, x, y)
  836.     self.contents.font.color = system_color
  837.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.sp)
  838.     if $temp_sp == 0
  839.       self.contents.font.color = normal_color
  840.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxsp.to_s, 2)
  841.     else
  842.       maxsp = actor.maxsp + $temp_sp
  843.       self.contents.font.color = Color.new(255, 128, 128, 255)
  844.       self.contents.draw_text(x + 120 , y, 48, 32, maxsp.to_s ,2)
  845.       self.contents.font.color = normal_color      
  846.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  847.       if $temp_sp >=0
  848.         self.contents.font.color = Color.new(255, 128, 128, 255)
  849.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  850.       else
  851.         self.contents.font.color = Color.new(255,255,0,255)
  852.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  853.       end
  854.       self.contents.draw_text(x + 200, y, 36, 32, $temp_sp.to_s, 2)
  855.       self.contents.font.color = normal_color
  856.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  857.     end
  858.   end
  859.   #--------------------------------------------------------------------------
  860.   # ● 描绘能力值
  861.   #     actor : 角色
  862.   #     x     : 描画目标 X 坐标
  863.   #     y     : 描画目标 Y 坐标
  864.   #     type  : 能力值种类 (0~4)
  865.   #--------------------------------------------------------------------------
  866.   def draw_actor_lvup(actor, x, y, type)   
  867.     # 定义数字颜色
  868.     lvup = normal_color
  869.     upcolor = Color.new(255, 128, 128, 255)
  870.     self.contents.font.color = normal_color   
  871.     case type
  872.     when 0
  873.       parameter_name = $data_system.words.str
  874.       parameter_value = actor.str
  875.       parameter_value_temp = parameter_value + $temp_str
  876.       if $temp_str != 0
  877.         lvup = upcolor
  878.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  879.         if $temp_str >= 0
  880.           self.contents.font.color = lvup
  881.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  882.         else
  883.           self.contents.font.color = Color.new(255,255,0,255)
  884.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  885.         end        
  886.         self.contents.draw_text(x + 272, y, 80, 32, $temp_str.abs.to_s,1)
  887.         self.contents.font.color = normal_color
  888.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  889.       end
  890.     when 1
  891.       parameter_name = $data_system.words.dex
  892.       parameter_value = actor.dex
  893.       parameter_value_temp = parameter_value + $temp_dex
  894.       if $temp_dex != 0
  895.         lvup = upcolor
  896.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  897.         if $temp_dex >= 0
  898.           self.contents.font.color = lvup
  899.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  900.         else
  901.           self.contents.font.color = Color.new(255,255,0,255)
  902.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  903.         end        
  904.         self.contents.draw_text(x + 272, y, 80, 32, $temp_dex.abs.to_s,1)
  905.         self.contents.font.color = normal_color
  906.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  907.       end
  908.     when 2
  909.       parameter_name = $data_system.words.agi
  910.       parameter_value = actor.agi
  911.       parameter_value_temp = parameter_value + $temp_agi
  912.       if $temp_agi != 0
  913.         lvup = upcolor
  914.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  915.         if $temp_agi >= 0
  916.           self.contents.font.color = lvup
  917.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  918.         else
  919.           self.contents.font.color = Color.new(255,255,0,255)
  920.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  921.         end        
  922.         self.contents.draw_text(x + 272, y, 80, 32, $temp_agi.abs.to_s,1)
  923.         self.contents.font.color = normal_color
  924.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  925.       end
  926.     when 3
  927.       parameter_name = $data_system.words.int
  928.       parameter_value = actor.int
  929.       parameter_value_temp = parameter_value + $temp_int
  930.       if $temp_int != 0
  931.         lvup = upcolor
  932.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  933.         if $temp_int >= 0
  934.           self.contents.font.color = lvup
  935.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  936.         else
  937.           self.contents.font.color = Color.new(255,255,0,255)
  938.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  939.         end        
  940.         self.contents.draw_text(x + 272, y, 80, 32, $temp_int.abs.to_s,1)
  941.         self.contents.font.color = normal_color
  942.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  943.       end
  944.     when 4
  945.       parameter_name = "剩余点数"
  946.       parameter_value = $point
  947.       if $point != 0
  948.         lvup = upcolor
  949.       end
  950.     end   
  951.     self.contents.font.color = system_color
  952.     self.contents.draw_text(x, y, 120, 32, parameter_name)
  953.     self.contents.font.color = normal_color
  954.     self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s)   
  955.     if type != 4
  956.       self.contents.draw_text(x + 150, y, 36, 32, "→")
  957.     end  
  958.     self.contents.font.color = lvup
  959.     self.contents.draw_text(x + 180, y, 60, 32, parameter_value_temp.to_s)
  960.     self.contents.font.color = normal_color        
  961.   end
  962. end
  963. #==============================================================================
  964. # ■ Window_lvup
  965. #------------------------------------------------------------------------------
  966. #  显示升级状态窗口。
  967. #==============================================================================
  968. class Window_Lvup < Window_Base
  969.   #--------------------------------------------------------------------------
  970.   # ● 初始化对像
  971.   #     actor : 角色
  972.   #--------------------------------------------------------------------------
  973.   def initialize(actor)
  974.     super(0, 0, 512, 320)
  975.     self.contents = Bitmap.new(width - 32, height - 32)
  976.     @actor = actor
  977.     refresh
  978.   end  
  979.   #--------------------------------------------------------------------------
  980.   # ● 刷新
  981.   #--------------------------------------------------------------------------
  982.   def refresh
  983.     self.contents.clear
  984.     draw_actor_graphic(@actor, 40, 112)
  985.     draw_actor_name(@actor, 4, 0)
  986.     draw_actor_class(@actor, 4 + 144, 0)
  987.     draw_actor_level(@actor, 96, 32)
  988.     draw_actor_state(@actor, 96, 64)   
  989.     draw_actor_hp_lvup(@actor, 96+128, 32)
  990.     draw_actor_sp_lvup(@actor, 96+128, 64)
  991.     draw_actor_lvup(@actor, 96, 128, 0)
  992.     draw_actor_lvup(@actor, 96, 160, 1)
  993.     draw_actor_lvup(@actor, 96, 192, 2)
  994.     draw_actor_lvup(@actor, 96, 224, 3)
  995.     draw_actor_lvup(@actor, 96, 256, 4)
  996.   end
  997. end
  998. #==============================================================================
  999. # ■ Window_Help
  1000. #------------------------------------------------------------------------------
  1001. #  特技及物品的说明、角色的状态显示的窗口。
  1002. #==============================================================================
  1003. class Window_Lvup_Help < Window_Base
  1004.   #--------------------------------------------------------------------------
  1005.   # ● 初始化对像
  1006.   #--------------------------------------------------------------------------
  1007.   def initialize
  1008.     super(0, 320, 640, 160)
  1009.     self.contents = Bitmap.new(width - 32, height - 32)
  1010.     @test = "" #——这个东西用来检测,节约内存专用
  1011.   end  
  1012.   #--------------------------------------------------------------------------
  1013.   # ● 设置文本
  1014.   #--------------------------------------------------------------------------
  1015.   def lvup_text(text1, text2 = nil, text3 = nil, text4 = nil)
  1016.     if @test != text1
  1017.       @test = text1
  1018.     else
  1019.       return
  1020.     end   
  1021.     self.contents.clear
  1022.     self.contents.font.color = normal_color
  1023.     self.contents.draw_text(4, 0, self.width - 40, 32, text1)
  1024.     if text2 != nil
  1025.       self.contents.draw_text(4 , 32, self.width - 40, 32, text2)
  1026.     end
  1027.     self.contents.font.size -= 4
  1028.     if text3 != nil
  1029.       self.contents.draw_text(4 , 64, self.width - 40, 32, text3)
  1030.     end
  1031.     if text4 != nil
  1032.       self.contents.draw_text(4 , 96, self.width - 40, 32, text4)
  1033.     end
  1034.     self.contents.font.size += 4
  1035.   end
  1036. end
  1037. #==============================================================================
  1038. # ■ Scene_lvup
  1039. #------------------------------------------------------------------------------
  1040. #  处理升级画面的类。
  1041. #==============================================================================
  1042. class Scene_Lvup
  1043.   #--------------------------------------------------------------------------
  1044.   # ● 初始化对像
  1045.   #     actor_index : 角色索引
  1046.   #     menu_index : 选项起始位置
  1047.   #--------------------------------------------------------------------------
  1048.   def initialize(actor_index = 0 , menu_index = 0)
  1049.     @actor_index = actor_index
  1050.     @menu_index = menu_index
  1051.   end
  1052.   #--------------------------------------------------------------------------
  1053.   # ● 主处理
  1054.   #--------------------------------------------------------------------------
  1055.   def main
  1056.     s1 = "增加体力"
  1057.     s2 = "增加"+$data_system.words.str
  1058.     s3 = "增加"+$data_system.words.dex
  1059.     s4 = "增加"+$data_system.words.agi
  1060.     s5 = "增加"+$data_system.words.int
  1061.     s6 = "确认加点"
  1062.     s7 = "点数重置"
  1063.     @command_window = Window_Command.new(128, [s1, s2, s3, s4, s5, s6, s7])
  1064.     @command_window.index = @menu_index
  1065.     # 获取角色
  1066.     @actor = $game_party.actors[@actor_index]
  1067.     # 将角色的剩余点数带入
  1068.     $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  1069.     # 初始化临时量
  1070.     $temp_str = 0
  1071.     $temp_dex = 0
  1072.     $temp_agi = 0
  1073.     $temp_int = 0
  1074.     $temp_hp = 0
  1075.     $temp_sp = 0
  1076.     #=========================================================================
  1077.     # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
  1078.     #  (各种编程语言都有这种意外),建议还是使用整数,正负不限
  1079.     #=========================================================================
  1080.     # 每提升一次力量,提升多少附加能力
  1081.     #=========================================================================
  1082.     @str_hp = 5     # 每提升一次力量附加提升多少HP
  1083.     @str_sp = 0     # 每提升一次力量附加提升多少SP
  1084.     @str_dex = 1    # 每提升一次力量附加提升多少灵巧
  1085.     @str_agi = 1    # 每提升一次力量附加提升多少速度
  1086.     @str_int = 0    # 每提升一次力量附加提升多少魔力
  1087.     @str_str = 3    # 每提升一次力量附加提升多少力量
  1088.     #=========================================================================
  1089.     # 每提升一次灵巧,提升多少附加能力
  1090.     #=========================================================================
  1091.     @dex_hp = 2     # 每提升一次灵巧附加提升多少HP
  1092.     @dex_sp = 3     # 每提升一次灵巧附加提升多少SP
  1093.     @dex_str = 1    # 每提升一次灵巧附加提升多少力量
  1094.     @dex_agi = 1    # 每提升一次灵巧附加提升多少速度
  1095.     @dex_int = 0    # 每提升一次灵巧附加提升多少魔力
  1096.     @dex_dex = 3    # 每提升一次灵巧附加提升多少灵巧
  1097.     #=========================================================================
  1098.     # 每提升一次速度,提升多少附加能力
  1099.     #=========================================================================
  1100.     @agi_hp = 0     # 每提升一次速度附加提升多少HP
  1101.     @agi_sp = 0     # 每提升一次速度附加提升多少SP
  1102.     @agi_str = 0    # 每提升一次速度附加提升多少力量
  1103.     @agi_dex = 1    # 每提升一次速度附加提升多少灵巧
  1104.     @agi_int = 0    # 每提升一次速度附加提升多少魔力
  1105.     @agi_agi = 3    # 每提升一次速度附加提升多少速度
  1106.     #=========================================================================
  1107.     # 每提升一次魔力,提升多少附加能力
  1108.     #=========================================================================
  1109.     @int_hp = 1     # 每提升一次魔力附加提升多少HP
  1110.     @int_sp = 15    # 每提升一次魔力附加提升多少SP
  1111.     @int_str = -1   # 每提升一次魔力附加提升多少力量
  1112.     @int_dex = 0   # 每提升一次魔力附加提升多少灵巧
  1113.     @int_agi = 0   # 每提升一次魔力附加提升多少速度
  1114.     @int_int = 7   # 每提升一次魔力附加提升多少魔力
  1115.     #=========================================================================
  1116.     # 每提升一次体力,提升多少附加能力
  1117.     #=========================================================================
  1118.     @hp = 20       # 每提升一次体力提升多少HP
  1119.     @sp = 10       # 每提升一次体力提升多少SP
  1120.     @hp_str = 0   # 每提升一次体力提升多少力量
  1121.     @hp_dex = 0   # 每提升一次体力提升多少速度
  1122.     @hp_agi = 0   # 每提升一次体力提升多少灵巧
  1123.     @hp_int = -1   # 每提升一次体力提升多少魔力   
  1124.     # 定义说明文字
  1125.     @text_hp_sc = "体力可以增加生存的能力,增加HP与SP的最大上限!"
  1126.     @text_str_sc = $data_system.words.str + "可以增加物理攻击和物理技能的威力!"
  1127.     @text_dex_sc = $data_system.words.dex + "可以提高攻击的命中率和防御系数!"
  1128.     @text_agi_sc = $data_system.words.agi + "可以提高行动速度、逃跑成功率!"
  1129.     @text_int_sc = $data_system.words.int + "可以提高魔法攻击的效果!"
  1130.     @text_save = "保存分配情况并返回游戏"
  1131.     @text_reset= "重新分配能力点数"
  1132.     @text_2 = "每增加一次此项能力值,可以提升能力值"
  1133.     @text_hp = "最大" + $data_system.words.hp + "值"
  1134.     @text_sp = "最大" + $data_system.words.sp + "值"
  1135.     @text_str = "最大" + $data_system.words.str + "值"
  1136.     @text_dex = "最大" + $data_system.words.dex + "值"
  1137.     @text_agi = "最大" + $data_system.words.agi + "值"
  1138.     @text_int = "最大" + $data_system.words.int + "值"
  1139.     s_disable
  1140.     # 生成状态窗口
  1141.     @lvup_window = Window_Lvup.new(@actor)
  1142.     @lvup_window.x = 128
  1143.     @lvup_window.y = 0   
  1144.     # 生成帮助窗口并初始化帮助文本
  1145.     @help_window = Window_Lvup_Help.new   
  1146.     # 执行过渡
  1147.     Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition)
  1148.     # 主循环
  1149.     loop do
  1150.       # 刷新游戏画面
  1151.       Graphics.update
  1152.       # 刷新输入信息
  1153.       Input.update
  1154.       # 刷新画面
  1155.       update
  1156.       # 如果切换画面就中断循环
  1157.       if $scene != self
  1158.         break
  1159.       end
  1160.     end
  1161.     # 准备过渡
  1162.     Graphics.freeze
  1163.     # 释放窗口
  1164.     @command_window.dispose
  1165.     @lvup_window.dispose
  1166.     @help_window.dispose
  1167.   end
  1168.   #--------------------------------------------------------------------------
  1169.   # ● 刷新画面
  1170.   #--------------------------------------------------------------------------
  1171.   def update
  1172.     # 刷新窗口
  1173.     @command_window.update
  1174.     # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
  1175.     s_disable
  1176.     @lvup_window.update
  1177.     #=============================================================
  1178.     # 按下 B 键的情况下
  1179.     #=============================================================
  1180.     if Input.trigger?(Input::B)
  1181.       # 演奏取消 SE
  1182.       $game_system.se_play($data_system.cancel_se)
  1183.       # 切换到地图画面
  1184.       $scene = Scene_Menu.new
  1185.       return
  1186.     end
  1187.     #=============================================================
  1188.     # 按下 C 键的情况下
  1189.     #=============================================================
  1190.     if Input.trigger?(Input::C)      
  1191.       if @command_window.index == 5
  1192.           # 演奏确定 SE
  1193.         $game_system.se_play($data_system.decision_se)
  1194.         # 将角色的剩余点数带回
  1195.         $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
  1196.         # 将角色点数实际加上
  1197.         @actor.str += $temp_str
  1198.         @actor.dex += $temp_dex
  1199.         @actor.agi += $temp_agi
  1200.         @actor.int += $temp_int
  1201.         @actor.maxhp += $temp_hp
  1202.         @actor.maxsp += $temp_sp
  1203.         # 切换到地图画面
  1204.         $scene = Scene_Menu.new
  1205.         return
  1206.       end
  1207.       if @command_window.index == 6
  1208.           # 演奏确定 SE
  1209.         $game_system.se_play($data_system.cancel_se)
  1210.           # 将角色的剩余点数带入
  1211.         $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  1212.           # 初始化临时量
  1213.         $temp_str = 0
  1214.         $temp_dex = 0
  1215.         $temp_agi = 0
  1216.         $temp_int = 0
  1217.         $temp_hp = 0
  1218.         $temp_sp = 0
  1219.         @lvup_window.refresh
  1220.         return
  1221.       end
  1222.       if $point == 0
  1223.         # 演奏冻结 SE
  1224.         $game_system.se_play($data_system.buzzer_se)
  1225.         return
  1226.       end
  1227.       case @command_window.index
  1228.       when 0
  1229.         # 演奏确定 SE
  1230.         $game_system.se_play($data_system.decision_se)
  1231.         $temp_hp += @hp
  1232.         $temp_sp += @sp
  1233.         $temp_str += @hp_str
  1234.         $temp_dex += @hp_dex
  1235.         $temp_agi += @hp_agi
  1236.         $temp_int += @hp_int
  1237.         $point -= 1
  1238.         @lvup_window.refresh
  1239.         s_disable
  1240.         return
  1241.       when 1
  1242.         # 演奏确定 SE
  1243.         $game_system.se_play($data_system.decision_se)
  1244.         $temp_str += @str_str
  1245.         $temp_hp += @str_hp
  1246.         $temp_sp += @str_sp
  1247.         $temp_dex += @str_dex
  1248.         $temp_agi += @str_agi
  1249.         $temp_int += @str_int
  1250.         $point -= 1
  1251.         @lvup_window.refresh
  1252.         s_disable
  1253.         return
  1254.       when 2
  1255.         # 演奏确定 SE
  1256.         $game_system.se_play($data_system.decision_se)
  1257.         $temp_dex += @dex_dex
  1258.         $temp_hp += @dex_hp
  1259.         $temp_sp += @dex_sp
  1260.         $temp_str += @dex_str
  1261.         $temp_agi += @dex_agi
  1262.         $temp_int += @dex_int
  1263.         $point -= 1
  1264.         @lvup_window.refresh
  1265.         s_disable
  1266.         return
  1267.       when 3
  1268.         # 演奏确定 SE
  1269.         $game_system.se_play($data_system.decision_se)
  1270.         $temp_agi += @agi_agi
  1271.         $temp_hp += @agi_hp
  1272.         $temp_sp += @agi_sp
  1273.         $temp_str += @agi_str
  1274.         $temp_dex += @agi_dex
  1275.         $temp_int += @agi_int
  1276.         $point -= 1
  1277.         @lvup_window.refresh
  1278.         s_disable
  1279.         return
  1280.       when 4
  1281.         # 演奏确定 SE
  1282.         $game_system.se_play($data_system.decision_se)
  1283.         $temp_int += @int_int
  1284.         $temp_hp += @int_hp
  1285.         $temp_sp += @int_sp
  1286.         $temp_str += @int_str
  1287.         $temp_dex += @int_dex
  1288.         $temp_agi += @int_agi
  1289.         $point -= 1
  1290.         @lvup_window.refresh
  1291.         s_disable
  1292.         return
  1293.       end
  1294.     end
  1295.     #=============================================================
  1296.     # 什么都没有按下的情况
  1297.     #=============================================================
  1298.     case @command_window.index   
  1299.     when 0  # 增加体力
  1300.       temptext1 = @text_hp + @hp.to_s + "点   " + @text_str + @hp_str.to_s + "点   " + @text_dex + @hp_dex.to_s + "点"
  1301.       temptext2 = @text_sp + @sp.to_s + "点   " + @text_agi + @hp_agi.to_s + "点   " + @text_int + @hp_int.to_s + "点"
  1302.       @help_window.lvup_text(@text_hp_sc , @text_2 , temptext1 , temptext2)
  1303.     when 1  # 增加力量
  1304.       temptext1 = @text_hp + @str_hp.to_s + "点   " + @text_str + @str_str.to_s + "点   " + @text_dex + @str_dex.to_s + "点"
  1305.       temptext2 = @text_sp + @str_sp.to_s + "点   " + @text_agi + @str_agi.to_s + "点   " + @text_int + @str_int.to_s + "点"
  1306.       @help_window.lvup_text(@text_str_sc , @text_2 , temptext1 , temptext2)
  1307.     when 2  # 增加灵巧
  1308.       temptext1 = @text_hp + @dex_hp.to_s + "点   " + @text_str + @dex_agi.to_s + "点   " + @text_dex + @dex_dex.to_s + "点"
  1309.       temptext2 = @text_sp + @dex_sp.to_s + "点   " + @text_agi + @dex_agi.to_s + "点   " + @text_int + @dex_int.to_s + "点"
  1310.       @help_window.lvup_text(@text_dex_sc , @text_2 , temptext1 , temptext2)
  1311.     when 3  # 增加速度
  1312.       temptext1 = @text_hp + @agi_hp.to_s + "点   " + @text_str + @agi_str.to_s + "点   " + @text_dex + @agi_dex.to_s + "点"
  1313.       temptext2 = @text_sp + @agi_sp.to_s + "点   " + @text_agi + @agi_agi.to_s + "点   " + @text_int + @agi_int.to_s + "点"
  1314.       @help_window.lvup_text(@text_agi_sc , @text_2 , temptext1 , temptext2)
  1315.     when 4  # 增加魔力
  1316.       temptext1 = @text_hp + @int_hp.to_s + "点   " + @text_str + @int_str.to_s + "点   " + @text_dex + @int_dex.to_s + "点"
  1317.       temptext2 = @text_sp + @int_sp.to_s + "点   " + @text_agi + @int_agi.to_s + "点   " + @text_int + @int_int.to_s + "点"
  1318.       @help_window.lvup_text(@text_int_sc , @text_2 , temptext1 , temptext2)
  1319.     when 5 # 保存设定
  1320.       @help_window.lvup_text(@text_save)
  1321.     when 6 # 点数重置
  1322.       @help_window.lvup_text(@text_reset)     
  1323.     end
  1324.     #=============================================================
  1325.     # 按下R与L换人的情况
  1326.     #=============================================================      
  1327.     if Input.trigger?(Input::R)
  1328.       # 演奏光标 SE
  1329.       $game_system.se_play($data_system.cursor_se)
  1330.       # 移至下一位角色
  1331.       @actor_index += 1
  1332.       @actor_index %= $game_party.actors.size
  1333.       # 切换到别的状态画面
  1334.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  1335.       return
  1336.     end
  1337.     # 按下 L 键的情况下
  1338.     if Input.trigger?(Input::L)
  1339.       # 演奏光标 SE
  1340.       $game_system.se_play($data_system.cursor_se)
  1341.       # 移至上一位角色
  1342.       @actor_index += $game_party.actors.size - 1
  1343.       @actor_index %= $game_party.actors.size
  1344.       # 切换到别的状态画面
  1345.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  1346.       return
  1347.     end
  1348.   end  
  1349.   #--------------------------------------------------------------------------
  1350.   # ● 选项明暗判断
  1351.   #--------------------------------------------------------------------------
  1352.   def s_disable
  1353.     # 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
  1354.     if $point == 0
  1355.       @command_window.disable_item(0)
  1356.       @command_window.disable_item(1)
  1357.       @command_window.disable_item(2)
  1358.       @command_window.disable_item(3)
  1359.       @command_window.disable_item(4)
  1360.     else
  1361.       @command_window.able_item(0)
  1362.       @command_window.able_item(1)      
  1363.       @command_window.able_item(2)
  1364.       @command_window.able_item(3)
  1365.       @command_window.able_item(4)
  1366.     end
  1367.   end
  1368. end

  1369. #==============================================================================
  1370. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  1371. #==============================================================================

  1372. #==============================================================================
  1373. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  1374. #==============================================================================



复制代码

点评

一个是原版的,一个是后加调整队伍顺序的QWQ  发表于 2019-3-28 12:33
回复

使用道具 举报

梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
回帖
112
 楼主| 发表于 2019-3-28 12:48:14 | 显示全部楼层
插入图片的示意图差不多是这样...(画的很丑==)
新建画布1.png
回复

使用道具 举报

梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
回帖
112
 楼主| 发表于 2019-3-30 11:24:17 | 显示全部楼层
顶顶QWQ(应该没有违规吧==)
回复

使用道具 举报

梦石
0
星屑
42345
在线时间
6022 小时
注册时间
2006-11-10
回帖
6975
发表于 2019-3-30 14:34:15 | 显示全部楼层
你上面那些脚本 并没有"任务脚本", 我想应该不会有能在不知道你用什么脚本的情况下, 给你变窗口来的大神

还是说你还没使用任务脚本?  那你的任务完成度数值是怎么来的?

点评

支线任务系统后面再加嘛..任务完成度可以用变量表示..只需要显示变量就行了吧QWQ  发表于 2019-3-30 14:37
回复

使用道具 举报

梦石
0
星屑
42345
在线时间
6022 小时
注册时间
2006-11-10
回帖
6975
发表于 2019-3-30 15:04:45 | 显示全部楼层
那你可以自己加窗口

常规窗口写法可以参考 game gold 它就是标准的XP窗口模范,  把def refresh 这段 里面保留第一句, 下面的擦掉, 它就是一个空窗口, 然后填上自己的内容

描绘文字写法 self.contents.draw_text(x, y, 宽, 高, 要描绘的字符串, 对齐0左1中2右)
要描绘某个变量的数值, 就在"要描绘的字符串"里,填上 $game_variables[编号].to_s

描绘图片写法 self.contents.blt(x, y, bitmap, Rect.new(x, y, 宽, 高),透明度)
bitmap 是图片文件, 例如 bitmap = RPG::Cache.picture("一张图片")  这样写就可以调用pictures文件夹里的叫"一张图片.png"名字的图片文件
回复

使用道具 举报

梦石
0
星屑
14720
在线时间
2175 小时
注册时间
2016-9-20
回帖
777
发表于 2019-3-30 15:49:34 | 显示全部楼层
本帖最后由 ppspssss 于 2019-3-30 17:18 编辑

第一步插入腳本Window_j_mission
  1. #==============================================================================
  2. # ■ Window_j_mission
  3. #------------------------------------------------------------------------------
  4. #  显示任务的窗口。
  5. #==============================================================================
  6. $任务叙术_1 = "打以下列怪"
  7. $任务叙术_2 = "吱喳鸡"
  8. $任务叙术_3 = "狸花猫"
  9. $任务类型 = "打怪"
  10. $已完成任务 = 1
  11. $任务完成率 = 1
  12. $任务要求打多少只_1 = 5
  13. $任务你打了多少只_1 = 10
  14. $任务要求打多少只_2 = 0
  15. $任务你打了多少只_2 = 20

  16. $是否已完成 = "不是"


  17. class Window_j_mission < Window_Base
  18.   #--------------------------------------------------------------------------
  19.   # ● 初始化窗口
  20.   #--------------------------------------------------------------------------
  21.   def initialize
  22.     super(0, 0, 100, 480)
  23.     self.contents = Bitmap.new(width - 32, height - 32)
  24.     refresh
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # ● 刷新
  28.   #--------------------------------------------------------------------------
  29.   def refresh
  30.     self.contents.clear
  31.     #cx = contents.text_size($data_system.words.gold).width
  32.     self.contents.font.color = normal_color
  33.     self.contents.font.size = 16
  34.     self.contents.draw_text(0, 0, 70, 60, "现在任务", 0)
  35.     self.contents.draw_text(0, 0+20, 70, 60, "#{$任务类型}", 0)
  36.     self.contents.draw_text(0, 0+40, 70, 60, "#{$任务叙术_1}", 0)
  37.     self.contents.draw_text(0, 0+60, 70, 60, "#{$任务叙术_2}", 0)
  38.     self.contents.draw_text(0, 0+80, 70, 60, "#{$任务叙术_3}", 0)

  39.     self.contents.font.color = text_color(5)
  40.     self.contents.font.size = 16
  41.     self.contents.draw_text(0, 150, 70, 60, "已打完成数量", 0)
  42.     self.contents.draw_text(0, 150+20, 70, 60, "#{$任务你打了多少只_1}"+"/"+"#{$任务要求打多少只_1}", 0)
  43.     self.contents.draw_text(0, 150+40, 70, 60, "#{$任务你打了多少只_2}"+"/"+"#{$任务要求打多少只_2}", 0)
  44.     self.contents.font.color = text_color(6)
  45.     self.contents.font.size = 16
  46.     self.contents.draw_text(0, 350, 70, 60, "任务进度", 0)
  47.     self.contents.draw_text(0, 350+20, 70, 60,"是否已完成", 0)
  48.     self.contents.draw_text(0, 350+40, 70, 60,"#{$是否已完成}" , 0)
  49.   end
  50. end
复制代码

QQ截图20190330154714.png QQ截图20190330154803.png QQ截图20190330154751.png QQ截图20190330154628.png
之后照图修改,$符那些變量我只是打例子
QQ截图20190330171813.png

点评

跟着学习了!  发表于 2019-3-31 22:31
我已经学会了QWQ谢谢大佬的帮助了QWQ  发表于 2019-3-30 22:11
那你要不要显示图片的功能  发表于 2019-3-30 17:53
虽然说大佬没有理解我的意思==,但是代码给了我很多参考价值,谢谢QWQ  发表于 2019-3-30 17:29

评分

参与人数 1星屑 +80 收起 理由
RyanBern + 80 认可答案

查看全部评分

贴子只供参考我贴子内容有很多只是我自己标识的内容代指不是原来意思,偏向发贴当时的想法(后来回看贴发现有很多错误,会造成误导 ),如果想靠谱点应 找相关正确的文章   -- 2025/4/19
回复 2 0

使用道具 举报

梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
回帖
112
 楼主| 发表于 2019-3-30 16:13:13 | 显示全部楼层
本帖最后由 wyw838 于 2019-3-30 16:34 编辑
灯笼菜刀王 发表于 2019-3-30 15:04
那你可以自己加窗口

常规窗口写法可以参考 game gold 它就是标准的XP窗口模范,  把def refresh  ...


感谢大佬的帮助,但是我描绘的字符串和图片并没有出来,只有一个孤零零窗口QAQ如下图
9RYOPPO808XSL]$`]_1R)9L.png
OS%X@6K[T7$W{Y}WGD4WQ[M.png

点评

测试用的字符串真是皮  发表于 2019-3-30 19:06
嗯嗯...现在好了,谢谢qwq  发表于 2019-3-30 17:28
坐标问题哦, x,y不是根据640*480的窗口, 而是要根据你的这个窗口为标准的, 很显然, 你这个窗口宽肯定没有120, 所以你文字都显示到外太空去了  发表于 2019-3-30 17:18
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部