效果如下:
烦请各位帮忙测试,在手机上全屏是否有效,谢谢!
JAVASCRIPT 代码 下载
- //=============================================================================
- // MrLiu_FullScreenOpition.js
- //=============================================================================
- /*:
- * @plugindesc 在RMMV游戏中的选项菜单显示窗口/全屏切换选项
- * @author MrLiu-过眼云烟
- *
- * @param FullScreen Option
- * @desc 选项中显示全屏、窗口模式的切换文字
- * @default 窗口/全屏切换
- *
- */
- //-----------------------------------------------------------------------------
- var Lmd = Lmd || {};
- var parameters = PluginManager.parameters('MrLiu_FullScreenOpition');//Yanfly.Param.ASP3CameraOption = String(Yanfly.Parameters['Camera Option']);
- var fullScreenOpitionText = String(parameters['FullScreen Option']);
- var _Window_Options_addGeneralOptions = Window_Options.prototype.addGeneralOptions;
- Window_Options.prototype.addGeneralOptions = function(){
- _Window_Options_addGeneralOptions.call(this);
- this.addCommand(fullScreenOpitionText, 'FullScreen');
- };
- var _Window_Options_cursorRight = Window_Options.prototype.cursorRight;
- Window_Options.prototype.cursorRight = function(wrap){
- _Window_Options_cursorRight.call(this);
- var index = this.index();
- var symbol = this.commandSymbol(index);
- var value = this.getConfigValue(symbol);
- if(this.isScreenChangeSymbol(symbol)){
- Graphics._switchFullScreen();
- }
- };
- var _Window_Options_cursorLeft = Window_Options.prototype.cursorLeft;
- Window_Options.prototype.cursorLeft = function(wrap){
- _Window_Options_cursorLeft.call(this);
- var index = this.index();
- var symbol = this.commandSymbol(index);
- var value = this.getConfigValue(symbol);
- if(this.isScreenChangeSymbol(symbol)){
- Graphics._switchFullScreen();
- }
- };
- Window_Options.prototype.isScreenChangeSymbol = function(symbol){
- return symbol.contains('FullScreen');
- };
复制代码
本帖来自P1论坛作者过眼云烟,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址: https://rpg.blue/forum.php?mod=viewthread&tid=386162 若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。 |