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

Project1

 找回密码
 注册会员
搜索
查看: 2045|回复: 5

[已经解决] 如何將對話框底下箭頭 (暫停標記) 移到右下角?

[复制链接]

Lv3.寻梦者

梦石
0
星屑
2637
在线时间
365 小时
注册时间
2015-12-8
帖子
104
发表于 2018-11-12 14:10:52 | 显示全部楼层 |阅读模式
50星屑
本帖最后由 冰冷水藍 于 2018-11-17 15:28 编辑

如何將對話框底下箭頭(或稱暫停標記)移至右下角?
就像這樣

02.jpg

嘗試過了板上的對話框加強腳本,會有很多部分衝突
希望能基於內建腳本著手,謝謝!!


國外論壇爬到了一篇
但基本上似乎都是VXACE可用的,找尋VX版本當中......

RUBY 代码复制
  1. #==============================================================================
  2. # Relocated Pause Graphic
  3. # by: Racheal
  4. # Version 1.0
  5. # Created: 11/11/2013
  6. #==============================================================================
  7. # Replicates the pause graphic in Window_Message to allow for repositioning
  8. #==============================================================================
  9. # Instructions:
  10. # * Insert in the Materials section
  11. # * Configure to your liking below
  12.  
  13. #~ 介紹
  14. #~ 厭倦了暫停圖形總是在消息窗口的中間? 此腳本重新創建暫停圖形,
  15. #~ 允許您將其移動到任何您想要的位置。 該腳本默認為將圖形放在右側,但它很容易更改。
  16.  
  17. #~ 特徵
  18. #~  - 從默認中心位置移動暫停圖形。
  19.  
  20. #~ 如何使用
  21. #~  - 插入腳本編輯器的材料部分,然後根據需要配置選項。
  22. #==============================================================================
  23.  
  24. #==============================================================================
  25. # Customization
  26. #==============================================================================
  27. module Racheal_Move_Pause
  28. #Set the position of the pause graphic. :left, :center, and :right supported
  29. POSITION = :right
  30.  
  31. #Set fine tuning of position here
  32. X_OFFSET = 12
  33. Y_OFFSET = 4
  34. end
  35. #==============================================================================
  36. # End Customization
  37. #==============================================================================
  38.  
  39. class Window_Message < Window_Base
  40. #--------------------------------------------------------------------------
  41. # * Alias: Initialize
  42. #--------------------------------------------------------------------------
  43. alias move_pause_graphic_initialize initialize
  44. def initialize
  45. move_pause_graphic_initialize
  46. make_pause_sprite
  47. end
  48. #--------------------------------------------------------------------------
  49. # * Alias: Dispose
  50. #--------------------------------------------------------------------------
  51. alias move_pause_graphic_dispose dispose
  52. def dispose
  53. move_pause_graphic_dispose
  54. @pause_sprite.dispose
  55. end
  56. #--------------------------------------------------------------------------
  57. # * Make Pause Sprite
  58. #--------------------------------------------------------------------------
  59. def make_pause_sprite
  60. @pause_sprite = Sprite.new
  61. @pause_sprite.bitmap = self.windowskin
  62. @pause_sprite.src_rect = Rect.new(96, 64, 16, 16)
  63. @pause_sprite.z = self.z + 10
  64. @pause_sprite.visible = false
  65. end
  66. #--------------------------------------------------------------------------
  67. # * Alias: Update
  68. #--------------------------------------------------------------------------
  69. alias move_pause_graphic_update update
  70. def update
  71. move_pause_graphic_update
  72. update_pause_sprite if @pause_sprite.visible
  73. end
  74. #--------------------------------------------------------------------------
  75. # * Frame Update
  76. #--------------------------------------------------------------------------
  77. def update_pause_sprite
  78. frame = Graphics.frame_count % 60 / 15
  79. @pause_sprite.src_rect.x = 96 + 16 * (frame % 2)
  80. @pause_sprite.src_rect.y = 64 + 16 * (frame / 2)
  81. end
  82. #--------------------------------------------------------------------------
  83. # * Overwrite: Set Pause
  84. #--------------------------------------------------------------------------
  85. def pause=(pause)
  86. if pause
  87. case Racheal_Move_Pause::pOSITION
  88. when :left
  89. @pause_sprite.x = self.x + padding + Racheal_Move_Pause::X_OFFSET
  90. when :center
  91. @pause_sprite.x = self.x + self.width / 2 + Racheal_Move_Pause::X_OFFSET
  92. when :right
  93. @pause_sprite.x = self.x + self.width - padding - Racheal_Move_Pause::X_OFFSET
  94. end
  95. @pause_sprite.y = self.y + self.height - padding - Racheal_Move_Pause::Y_OFFSET
  96. end
  97. @pause_sprite.visible = pause
  98. end
  99. end



点评

这个是window内部类处理的,你可以将皮肤文件的箭头去掉,手动在窗口里面绘制箭头。  发表于 2018-12-5 16:42

Lv4.逐梦者

梦石
0
星屑
19269
在线时间
3073 小时
注册时间
2013-1-11
帖子
1288
发表于 2018-11-12 14:10:53 | 显示全部楼层
  1. #==============================================================================
  2. # Relocated Pause Graphic
  3. # by: Racheal
  4. # Version 1.0
  5. # Created: 11/11/2013
  6. #==============================================================================
  7. # Replicates the pause graphic in Window_Message to allow for repositioning
  8. #==============================================================================
  9. # Instructions:
  10. # * Insert in the Materials section
  11. # * Configure to your liking below

  12. #~ 介紹
  13. #~ 厭倦了暫停圖形總是在消息窗口的中間? 此腳本重新創建暫停圖形,
  14. #~ 允許您將其移動到任何您想要的位置。 該腳本默認為將圖形放在右側,但它很容易更改。

  15. #~ 特徵
  16. #~  - 從默認中心位置移動暫停圖形。

  17. #~ 如何使用
  18. #~  - 插入腳本編輯器的材料部分,然後根據需要配置選項。
  19. #==============================================================================

  20. #==============================================================================
  21. # Customization
  22. #==============================================================================
  23. module Racheal_Move_Pause
  24. #Set the position of the pause graphic. :left, :center, and :right supported
  25. POSITION = :right

  26. #Set fine tuning of position here
  27. X_OFFSET = 12
  28. Y_OFFSET = 4
  29. end
  30. #==============================================================================
  31. # End Customization
  32. #==============================================================================

  33. class Window_Message < Window_Selectable
  34. #--------------------------------------------------------------------------
  35. # * Alias: Initialize
  36. #--------------------------------------------------------------------------
  37. alias move_pause_graphic_initialize initialize
  38. def initialize
  39. move_pause_graphic_initialize
  40. make_pause_sprite
  41. end
  42. #--------------------------------------------------------------------------
  43. # * Alias: Dispose
  44. #--------------------------------------------------------------------------
  45. alias move_pause_graphic_dispose dispose
  46. def dispose
  47. move_pause_graphic_dispose
  48. @pause_sprite.dispose
  49. end
  50. #--------------------------------------------------------------------------
  51. # * Make Pause Sprite
  52. #--------------------------------------------------------------------------
  53. def make_pause_sprite
  54. @pause_sprite = Sprite.new
  55. @pause_sprite.bitmap = self.windowskin
  56. @pause_sprite.src_rect = Rect.new(96, 64, 16, 16)
  57. @pause_sprite.z = self.z + 10
  58. @pause_sprite.visible = false
  59. end
  60. #--------------------------------------------------------------------------
  61. # * Alias: Update
  62. #--------------------------------------------------------------------------
  63. alias move_pause_graphic_update update
  64. def update
  65. move_pause_graphic_update
  66. update_pause_sprite if @pause_sprite.visible
  67. end
  68. #--------------------------------------------------------------------------
  69. # * Frame Update
  70. #--------------------------------------------------------------------------
  71. def update_pause_sprite
  72. frame = Graphics.frame_count % 60 / 15
  73. @pause_sprite.src_rect.x = 96 + 16 * (frame % 2)
  74. @pause_sprite.src_rect.y = 64 + 16 * (frame / 2)
  75. end
  76.   #--------------------------------------------------------------------------
  77.   # * Overwrite: Set Pause
  78.   #--------------------------------------------------------------------------
  79.   def pause=(pause)
  80.     if pause
  81.       padding = 16
  82.       case Racheal_Move_Pause::POSITION
  83.       when :left
  84.         @pause_sprite.x = self.x + padding + Racheal_Move_Pause::X_OFFSET
  85.       when :center
  86.         @pause_sprite.x = self.x + self.width / 2 + Racheal_Move_Pause::X_OFFSET
  87.       when :right
  88.         @pause_sprite.x = self.x + self.width - padding - Racheal_Move_Pause::X_OFFSET
  89.       end
  90.       @pause_sprite.y = self.y + self.height - padding - Racheal_Move_Pause::Y_OFFSET
  91.     end
  92.     @pause_sprite.visible = pause
  93.   end
  94.   def pause; @pause_sprite.visible; end
  95. end
复制代码

点评

終、終於成功了,真是太感謝了,請收下獎賞 (淚目)  发表于 2018-12-8 03:51

评分

参与人数 2星屑 +50 +1 收起 理由
正太君 + 50 认可答案
冰冷水藍 + 1 精品文章

查看全部评分

回复

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2637
在线时间
365 小时
注册时间
2015-12-8
帖子
104
 楼主| 发表于 2018-12-6 19:13:09 | 显示全部楼层
本帖最后由 冰冷水藍 于 2018-12-6 19:17 编辑

咚咚大您好,我先前參考了沉影大的這篇對話框強化作品嘗試去修改
https://rpg.blue/thread-158161-1-1.html
這是目前找遍中英文網站,唯一可以適用於VX引擎的範本(淚)

因為這套多功能腳本其他功能暫時用不到,而且會改變目前已做好的系統
原本想只保留「自定暫停標記」的部分
但花了一整天的時間研究終究沒能成功
如果能夠正確簡化這套腳本的話,理論是可行的
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-3-29 21:18

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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