查看: 3073|回复: 2

[交流讨论] 有沒有辦法在標題寫者更新版本?

[复制链接]
梦石
0
星屑
497
在线时间
266 小时
注册时间
2015-12-8
回帖
729
发表于 2015-12-27 15:35:46 | 显示全部楼层 |阅读模式

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

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

×
比較能讓人知道甚麼時候更新過了~{:2_248:}  要改圖片也太麻煩了
梦石
0
星屑
22879
在线时间
8598 小时
注册时间
2011-12-31
回帖
3270
发表于 2015-12-27 15:46:36 | 显示全部楼层
本帖最后由 tseyik 于 2015-12-27 17:27 编辑

有的,但要找一找
[fold=Custom Text on Title Screen]       

    // Place file inside /js/plugins
    // Remember to save after adding plugins or changing parameters.
    // Made by request.
    //=============================================================================
    // Custom Text on Title Screen
    //=============================================================================
    /*:
     * Version: 2015-11-06-0008
     *
     * CHANGE LOG:
     * 2015-11-06-0008 - Released.
     *
     *
     * @plugindesc Ver.2015-11-06-0008. Displays a custom text on title screen.
     * <Ellye Title Text>
     * @author https://ellyeblog.wordpress.com/ || http://steamcommunity.com/id/Ellye
     *
     * @param Text
     * @desc The text to display
     * @default Version1.0
     *
     * @param h_align
     * @desc 0: Left. 1: Center. 2: Right.
     * @default 2
     *
     * @param v_align
     * @desc 0: Top. 1: Center. 2: Bottom.
     * @default 2
     *
     * @param X Offset
     * @desc The X offset for the text.
     * @default 0
     *
     * @param Y Offset
     * @desc The Y offset for the text.
     * @default 0
     *
     * @param Outline Color
     * @desc Color of the text outline
     * @default #000000
     *
     * @param Outline Width
     * @desc Width of the outline
     * @default 3
     *
     * @param Font Size
     * @desc Size of the font
     * @default 27
     *
     * @param Text Color
     * @desc Color of the text
     * @default #FFFFFF
     *
     * @help This plugin displays a single string on your title screen. For showing the game version, for example.
     *
     */
     
    (function() {
        var parameters = $plugins.filter(function(p) {
            return p.description.contains('<Ellye Title Text>');
        })[0].parameters; //Thanks to Iavra
     
     
        var custom_text = String(parameters['Text'] || "");
        var h_align = Number(parameters['h_align'] || 2);
        var v_align = Number(parameters['v_align'] || 2);
        var x_offset = Number(parameters['x_offset'] || 0);
        var y_offset = Number(parameters['y_offset'] || 0);
        var outline_color = String(parameters['Outline Color'] || "#000000");
        var outline_width = Number(parameters['Outline Width'] || 2);
        var font_size = Number(parameters['Font Size'] || 18);
        var text_color = String(parameters['Text Color'] || "#FFFFFF");
     
     
        _alias_scene_title_create_ = Scene_Title.prototype.create;
        Scene_Title.prototype.create = function()
        {
            _alias_scene_title_create_.call(this);
            this.DisplayCustomText();
        };
     
        Scene_Title.prototype.DisplayCustomText = function()
        {
            this._titleCustomText = new Sprite(new Bitmap(Graphics.width, Graphics.height));
            this.addChild(this._titleCustomText);
            var y = VerticalPosition() + y_offset;
            var maxWidth = Graphics.width - x_offset * 2;
            var text = custom_text;
            this._titleCustomText.bitmap.outlineColor = outline_color;
            this._titleCustomText.bitmap.outlineWidth = outline_width;
            this._titleCustomText.bitmap.fontSize = font_size;
            this._titleCustomText.bitmap.textColor = text_color;
            this._titleCustomText.bitmap.drawText(text, x_offset, y, maxWidth, font_size, HorizontalAlignment());
        };
     
        VerticalPosition = function()
        {
            switch (v_align)
            {
                case 0:
                    return 0;
                case 1:
                    return Graphics.height / 2 - font_size / 2;
                default:
                    return Graphics.height - font_size;
            }
        };
     
        HorizontalAlignment = function()
        {
            switch (h_align)
            {
                case 0:
                    return 'left';
                case 1:
                    return 'center';
                default:
                    return 'right';
            }
        };
     
    })();

[/fold]
回复

使用道具 举报

梦石
0
星屑
100
在线时间
268 小时
注册时间
2010-12-22
回帖
17
发表于 2015-12-27 16:29:01 | 显示全部楼层
本帖最后由 mitori10feet 于 2015-12-27 16:31 编辑

轉貼一個遊戲的插件  這可以實現
https://play.google.com/store/ap ... t.cretia.loveescape
  1. //=============================================================================
  2. // CRTA_TitleManager.js
  3. //=============================================================================

  4. /*:
  5. * @plugindesc v1.00 タイトル画面の構成等を変更するプラグイン
  6. * @author tokineco from cretia studio.
  7. *
  8. * @param Show Option
  9. * @desc オプションを表示する場合はtrue。非表示ならfalse。
  10. * Default: true
  11. * @default true
  12. *
  13. * @param Show Version
  14. * @desc ゲームのバージョンを表示する場合はtrue。非表示ならfalse。
  15. * Default: false
  16. * @default false
  17. *
  18. * @param Version
  19. * @desc ゲームのバージョン
  20. * Default: Ver.1.0.0
  21. * @default Ver.1.0.0
  22. *
  23. * @param Version Pos X
  24. * @desc バージョンの横位置
  25. * Default: Graphics.width - 90
  26. * @default Graphics.width - 90
  27. *
  28. * @param Version Pos Y
  29. * @desc バージョンの縦位置
  30. * Default: Graphics.height - 38
  31. * @default Graphics.height - 38
  32. *
  33. * @param Version Font Size
  34. * @desc バージョンのフォントサイズ
  35. * Default: 16
  36. * @default 16
  37. *
  38. * @param Window Width
  39. * @desc ウィンドウの横幅
  40. * Default: 240
  41. * @default 240
  42. *
  43. * @param Text Align
  44. * @desc テキストの揃え位置(left/center/right)
  45. * Default: left
  46. * @default left
  47. *
  48. * @param Position Delta X
  49. * @desc ウィンドウの初期値からの移動量(X)
  50. * Default: 0
  51. * @default 0
  52. *
  53. * @param Position Delta Y
  54. * @desc ウィンドウの初期値からの移動量(Y)
  55. * Default: 0
  56. * @default 0
  57. *
  58. * @help このプラグインにはプラグインコマンドはありません。
  59. *
  60. *  
  61. * ※ このプラグインでは、以下を書き換えていますので、本体アップデートや競合に注意してください。
  62. *    Window_TitleCommand.windowWidth
  63. *    Window_TitleCommand.itemTextAlign
  64. *
  65. * ※ その他、 下記のメソッドを追加しています
  66. *    Window_TitleCommand.removeCommand(name)
  67. *    Scene_Title.drawGameVersion()
  68. *
  69. * MIT License.
  70. */

  71. (function() {

  72.     var parameters = PluginManager.parameters('CRTA_TitleManager');
  73.     var showOption = eval(parameters['Show Option']);
  74.     var showVersion = eval(parameters['Show Version']);
  75.     var version = String(parameters['Version']);
  76.     var verPosX = String(parameters['Version Pos X']);
  77.     var verPosY = String(parameters['Version Pos Y']);
  78.     var verSize = Number(parameters['Version Font Size']);
  79.     var width = String(parameters['Window Width']);
  80.     var align = String(parameters['Text Align']);
  81.     var deltaX = Number(parameters['Position Delta X']);
  82.     var deltaY = Number(parameters['Position Delta Y']);


  83.     var _Scene_Title_createForeground = Scene_Title.prototype.createForeground;
  84.     Scene_Title.prototype.createForeground = function() {
  85.         _Scene_Title_createForeground.call(this);

  86.         this._gameVersionSprite = new Sprite(new Bitmap(Graphics.width, Graphics.height));
  87.         this.addChild(this._gameVersionSprite);
  88.         if (showVersion) {
  89.             this.drawGameVersion();
  90.         }
  91.     };

  92.     // ゲームバージョンを描画する
  93.     Scene_Title.prototype.drawGameVersion = function() {
  94.         var x = eval(verPosX);
  95.         var y = eval(verPosY);
  96.         var maxWidth = Graphics.width;
  97.         var text = version;
  98.         this._gameVersionSprite.bitmap.fontSize = verSize;
  99.         this._gameVersionSprite.bitmap.drawText(text, x, y, maxWidth, 48, 'left');
  100.     };

  101.     // タイトルのコマンドを作成する
  102.     var _Window_TitleCommand_makeCommandList = Window_TitleCommand.prototype.makeCommandList;
  103.     Window_TitleCommand.prototype.makeCommandList = function() {
  104.         _Window_TitleCommand_makeCommandList.call(this);
  105.         if (!showOption){
  106.             this.removeCommand(TextManager.options);
  107.         }
  108.     };

  109.     // override
  110.     Window_TitleCommand.prototype.windowWidth = function() {
  111.         return eval(width);
  112.     };

  113.     // override
  114.     Window_TitleCommand.prototype.itemTextAlign = function() {
  115.         return align;
  116.     };

  117.     var _Window_TitleCommand_updatePlacement = Window_TitleCommand.prototype.updatePlacement;
  118.     Window_TitleCommand.prototype.updatePlacement = function() {
  119.         _Window_TitleCommand_updatePlacement.call(this);
  120.         this.x += deltaX;
  121.         this.y += deltaY;
  122.     };

  123.     // 本体側にremoveCommdandメソッドを追加
  124.     Window_TitleCommand.prototype.removeCommand = function(name) {
  125.         for (var i=0; i<this._list.length; i++) {
  126.             if (this._list[i].name == name) {
  127.                 this._list.splice(i, 1);
  128.             }
  129.         }
  130.     };

  131. })();
复制代码
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部