mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
Added https://github.com/elizagamedev/mkxp-oneshot/pull/44, added https://github.com/elizagamedev/mkxp-oneshot/pull/51, added Debug mode!
This commit is contained in:
parent
87819a0f66
commit
ceceda1f04
9 changed files with 96 additions and 137 deletions
88
README.md
88
README.md
|
|
@ -1,86 +1,6 @@
|
||||||
# mkxp-oneshot
|
# mkxp-sunshine
|
||||||
|
|
||||||
This is a specialized fork of [mkxp by Ancurio](https://github.com/Ancurio/mkxp) designed for [*OneShot*](http://oneshot-game.com/).
|
This is a specialized fork of [mkxp-oneshot](https://github.com/elizagamedev/mkxp-oneshot) designed for OneShot: sunshine.
|
||||||
|
|
||||||
Thanks to [hunternet93](https://github.com/hunternet93) for starting the reimplementation of the journal program!
|
# xScripts.rxdata
|
||||||
|
./rpgscript.rb scripts/ [GameDir]
|
||||||
> mkxp is a project that seeks to provide a fully open source implementation of the Ruby Game Scripting System (RGSS) interface used in the popular game creation software "RPG Maker XP", "RPG Maker VX" and "RPG Maker VX Ace" (trademark by Enterbrain, Inc.), with focus on Linux. The goal is to be able to run games created with the above software natively without changing a single file.
|
|
||||||
>
|
|
||||||
> It is licensed under the GNU General Public License v2+.
|
|
||||||
|
|
||||||
*OneShot* also makes use of [steamshim](https://hg.icculus.org/icculus/steamshim/) for GPL compliance while making use of Steamworks features. See LICENSE.steamshim.txt for details.
|
|
||||||
|
|
||||||
## Building (Supported on Windows, Ubuntu Linux, in progress on macOS)
|
|
||||||
|
|
||||||
Preface: This only supports Visual Studio on Windows and Xcode on macOS. Ubuntu should work with either GCC or clang. You can probably compile with other platforms/setups, but beware.
|
|
||||||
|
|
||||||
With Python 3 and pip installed, install Conan via `pip3 install conan`. Afterwards, add the necessary package repositories by adding running the following commands:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
conan remote add eliza https://rkevin.jfrog.io/artifactory/api/conan/eliza
|
|
||||||
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan
|
|
||||||
conan config set general.revisions_enabled=1
|
|
||||||
setx CONAN_USE_ALWAYS_SHORT_PATHS 1 (windows only)
|
|
||||||
```
|
|
||||||
|
|
||||||
Prepare to build *OneShot* by installing the necessary dependencies with Conan.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd mkxp-oneshot
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
conan install .. --build=missing
|
|
||||||
```
|
|
||||||
|
|
||||||
Hopefully, this should complete without error. It may take quite a while to build all of the dependencies.
|
|
||||||
|
|
||||||
On Ubuntu, make sure you install the necessary dependencies before building *OneShot* proper:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
sudo apt install libgtk2.0-dev libxfconf-0-dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Finally, you can build the project by running the following:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
conan build ..
|
|
||||||
```
|
|
||||||
|
|
||||||
On Linux, you likely want to generate an AppImage. Please refer to how to build the Journal app below, as this is a prerequisite for building the AppImage. Afterwards, you may run the command, from the root directory of the repository:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
./make-appimage.sh . build /path/to/game/files /path/to/journal/_______ /some/path/OneShot.AppImage`
|
|
||||||
```
|
|
||||||
|
|
||||||
Requires [linuxdeploy](https://github.com/linuxdeploy/linuxdeploy) and [AppImageTool](https://github.com/AppImage/AppImageKit) in your `PATH`.
|
|
||||||
|
|
||||||
## Building the Journal app on Unix systems
|
|
||||||
|
|
||||||
As a prerequisite on Ubuntu, ensure that the following packages are installed.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
sudo apt install python3-venv libxcb-xinerama
|
|
||||||
```
|
|
||||||
|
|
||||||
Then run the script. From the root of the repository:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
./make-journal-linux.sh . /path/to/journal/parent/directory/
|
|
||||||
```
|
|
||||||
|
|
||||||
This will generate a file called `_______`.
|
|
||||||
|
|
||||||
### Supported image/audio formats
|
|
||||||
These depend on the SDL auxiliary libraries. *OneShot* only makes use of bmp/png for images and oggvorbis/wav for audio.
|
|
||||||
|
|
||||||
To run *OneShot*, you should have a graphics card capable of at least **OpenGL (ES) 2.0** with an up-to-date driver installed.
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
*OneShot* reads configuration data from the file "oneshot.conf". The format is ini-style. Do *not* use quotes around file paths (spaces won't break). Lines starting with '#' are comments. See 'oneshot.conf.sample' for a list of accepted entries.
|
|
||||||
|
|
||||||
All option entries can alternatively be specified as command line options. Any options that are not arrays (eg. preloaded scripts) specified as command line options will override entries in oneshot.conf. Note that you will have to wrap values containing spaces in quotes (unlike in oneshot.conf).
|
|
||||||
|
|
||||||
The syntax is: `--<option>=<value>`
|
|
||||||
|
|
||||||
Example: `./oneshot --gameFolder="oneshot" --vsync=true`
|
|
||||||
|
|
|
||||||
|
|
@ -153,9 +153,16 @@ class Journal(QWidget):
|
||||||
self.close_label.hide()
|
self.close_label.hide()
|
||||||
self.close_button = False
|
self.close_button = False
|
||||||
|
|
||||||
if lang == 'en': img = os.path.join(base_path, 'images', '{}.png'.format(name))
|
img = img_en = os.path.join(base_path, 'images', '{}.png'.format(name))
|
||||||
else: img = os.path.join(base_path, 'images', lang.upper(), '{}.png'.format(name))
|
if lang != 'en':
|
||||||
if not os.path.exists(img): return
|
img = os.path.join(base_path, 'images', lang.upper(), '{}.png'.format(name))
|
||||||
|
if not os.path.exists(img):
|
||||||
|
print("No image {!r} for locale {!r}".format(name, lang), file=sys.stderr)
|
||||||
|
img = img_en
|
||||||
|
|
||||||
|
if not os.path.exists(img):
|
||||||
|
print("Image not found: {!r}".format(img), file=sys.stderr)
|
||||||
|
return
|
||||||
|
|
||||||
self.pixmap = QPixmap(img)
|
self.pixmap = QPixmap(img)
|
||||||
self.label.setPixmap(self.pixmap)
|
self.label.setPixmap(self.pixmap)
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ class FastTravel
|
||||||
end
|
end
|
||||||
zone = ZONES[$game_fasttravel.zone]
|
zone = ZONES[$game_fasttravel.zone]
|
||||||
|
|
||||||
|
|
||||||
# Create title
|
# Create title
|
||||||
@title.bitmap.clear
|
@title.bitmap.clear
|
||||||
@title.bitmap.draw_text(0, 0, @title.bitmap.width, @title.bitmap.height, zone.name)
|
@title.bitmap.draw_text(0, 0, @title.bitmap.width, @title.bitmap.height, zone.name)
|
||||||
|
|
|
||||||
|
|
@ -55,26 +55,26 @@ class Game_Map
|
||||||
'codebg'
|
'codebg'
|
||||||
]
|
]
|
||||||
CLAMPED_X = [
|
CLAMPED_X = [
|
||||||
]
|
]
|
||||||
CLAMPED_Y = [
|
CLAMPED_Y = [
|
||||||
'red_obsdesk',
|
'red_obsdesk',
|
||||||
]
|
]
|
||||||
ANIMATED = [
|
ANIMATED = [
|
||||||
'blue_water',
|
'blue_water',
|
||||||
]
|
]
|
||||||
FADE_ANIMATION_PANORAMA = [
|
FADE_ANIMATION_PANORAMA = [
|
||||||
'dark_water',
|
'dark_water',
|
||||||
'green_water',
|
'green_water',
|
||||||
]
|
]
|
||||||
ONETOONE = [
|
ONETOONE = [
|
||||||
'blue_water',
|
'blue_water',
|
||||||
'green_water',
|
'green_water',
|
||||||
'dark_water',
|
'dark_water',
|
||||||
]
|
]
|
||||||
NOZOOM = [
|
NOZOOM = [
|
||||||
'dark_water',
|
'dark_water',
|
||||||
#'green_water',
|
#'green_water',
|
||||||
]
|
]
|
||||||
|
|
||||||
ALWAYS_MOVING = [
|
ALWAYS_MOVING = [
|
||||||
'codebg'
|
'codebg'
|
||||||
|
|
@ -166,8 +166,8 @@ class Game_Map
|
||||||
@clamped_y = false
|
@clamped_y = false
|
||||||
end
|
end
|
||||||
|
|
||||||
@always_moving = ALWAYS_MOVING.include? @panorama_name
|
@always_moving = ALWAYS_MOVING.include? @panorama_name
|
||||||
@pan_move_offset = 0
|
@pan_move_offset = 0
|
||||||
|
|
||||||
# Animated/One-to-one/zoom
|
# Animated/One-to-one/zoom
|
||||||
@pan_animate = ANIMATED.include? @panorama_name
|
@pan_animate = ANIMATED.include? @panorama_name
|
||||||
|
|
@ -267,44 +267,44 @@ class Game_Map
|
||||||
# distance : scroll distance
|
# distance : scroll distance
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
def scroll_down(distance)
|
def scroll_down(distance)
|
||||||
if $game_switches[98] == true
|
if $game_switches[98] == true
|
||||||
@display_y = [@display_y + distance, (self.height - 15) * 128].min
|
@display_y = [@display_y + distance, (self.height - 15) * 128].min
|
||||||
else
|
else
|
||||||
@display_y += distance
|
@display_y += distance
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# * Scroll Left
|
# * Scroll Left
|
||||||
# distance : scroll distance
|
# distance : scroll distance
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
def scroll_left(distance)
|
def scroll_left(distance)
|
||||||
if $game_switches[98] == true
|
if $game_switches[98] == true
|
||||||
@display_x = [@display_x - distance, 0].max
|
@display_x = [@display_x - distance, 0].max
|
||||||
else
|
else
|
||||||
@display_x -= distance
|
@display_x -= distance
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# * Scroll Right
|
# * Scroll Right
|
||||||
# distance : scroll distance
|
# distance : scroll distance
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
def scroll_right(distance)
|
def scroll_right(distance)
|
||||||
if $game_switches[98] == true
|
if $game_switches[98] == true
|
||||||
@display_x = [@display_x + distance, (self.width - 20) * 128].min
|
@display_x = [@display_x + distance, (self.width - 20) * 128].min
|
||||||
else
|
else
|
||||||
@display_x += distance
|
@display_x += distance
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# * Scroll Up
|
# * Scroll Up
|
||||||
# distance : scroll distance
|
# distance : scroll distance
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
def scroll_up(distance)
|
def scroll_up(distance)
|
||||||
if $game_switches[98] == true
|
if $game_switches[98] == true
|
||||||
@display_y = [@display_y - distance, 0].max
|
@display_y = [@display_y - distance, 0].max
|
||||||
else
|
else
|
||||||
@display_y -= distance
|
@display_y -= distance
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# * Determine Valid Coordinates
|
# * Determine Valid Coordinates
|
||||||
|
|
@ -341,15 +341,15 @@ class Game_Map
|
||||||
# If blank tile
|
# If blank tile
|
||||||
if event.tile_id == 0 && event.character_name.empty?
|
if event.tile_id == 0 && event.character_name.empty?
|
||||||
return false
|
return false
|
||||||
# If obstacle bit is set
|
# If obstacle bit is set
|
||||||
elsif @passages[event.tile_id] & bit != 0
|
elsif @passages[event.tile_id] & bit != 0
|
||||||
# impassable
|
# impassable
|
||||||
return false
|
return false
|
||||||
# If obstacle bit is set in all directions
|
# If obstacle bit is set in all directions
|
||||||
elsif @passages[event.tile_id] & 0x0f == 0x0f
|
elsif @passages[event.tile_id] & 0x0f == 0x0f
|
||||||
# impassable
|
# impassable
|
||||||
return false
|
return false
|
||||||
# If priorities other than that are 0
|
# If priorities other than that are 0
|
||||||
elsif @priorities[event.tile_id] == 0
|
elsif @priorities[event.tile_id] == 0
|
||||||
# passable
|
# passable
|
||||||
return true
|
return true
|
||||||
|
|
@ -374,11 +374,11 @@ class Game_Map
|
||||||
if @passages[tile_id] & bit != 0
|
if @passages[tile_id] & bit != 0
|
||||||
# impassable
|
# impassable
|
||||||
return false
|
return false
|
||||||
# If obstacle bit is set in all directions
|
# If obstacle bit is set in all directions
|
||||||
elsif @passages[tile_id] & 0x0f == 0x0f
|
elsif @passages[tile_id] & 0x0f == 0x0f
|
||||||
# impassable
|
# impassable
|
||||||
return false
|
return false
|
||||||
# If priorities other than that are 0
|
# If priorities other than that are 0
|
||||||
elsif @priorities[tile_id] == 0
|
elsif @priorities[tile_id] == 0
|
||||||
# passable
|
# passable
|
||||||
return true
|
return true
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ class Scene_Load < Scene_File
|
||||||
|
|
||||||
|
|
||||||
# check for debug file to add debug items
|
# check for debug file to add debug items
|
||||||
if File.exists?("debug_tester.dat")
|
if Window_Settings.DebugIsEnabled = true
|
||||||
# debug save
|
# debug save
|
||||||
$game_party.gain_item(54, 1)
|
$game_party.gain_item(54, 1)
|
||||||
# plight skip
|
# plight skip
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|
||||||
class Scene_Map
|
class Scene_Map
|
||||||
|
attr_accessor :in_game_timer
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# * Main Processing
|
# * Main Processing
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
|
|
@ -103,12 +104,12 @@ class Scene_Map
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
def update
|
def update
|
||||||
if $game_temp.igt_timer_visible && (Graphics.frame_count != nil)
|
if $game_temp.igt_timer_visible && (Graphics.frame_count != nil)
|
||||||
total_sec = Graphics.frame_count / Graphics.frame_rate
|
total_sec = Graphics.frame_count.to_f / Graphics.frame_rate
|
||||||
hour = total_sec / 60 / 60
|
time_string = sprintf("%02d:%02d:%02d.%03d",
|
||||||
min = total_sec / 60 % 60
|
total_sec / 3600,
|
||||||
sec = total_sec % 60
|
total_sec / 60 % 60,
|
||||||
millisec = ((Graphics.frame_count * 1000) / Graphics.frame_rate) % 1000
|
total_sec % 60,
|
||||||
time_string = sprintf("%02d:%02d:%02d.%03d", hour, min, sec, millisec)
|
total_sec * 1000 % 1000)
|
||||||
|
|
||||||
@in_game_timer.bitmap.fill_rect(0, 0, 140, 30, Color.new(0, 0, 0, 128))
|
@in_game_timer.bitmap.fill_rect(0, 0, 140, 30, Color.new(0, 0, 0, 128))
|
||||||
@in_game_timer.bitmap.draw_text(8, 0, 132, 30, time_string)
|
@in_game_timer.bitmap.draw_text(8, 0, 132, 30, time_string)
|
||||||
|
|
@ -320,7 +321,7 @@ class Scene_Map
|
||||||
# Chroma.playAnim("chroma/Random_Keyboard.chroma", false);
|
# Chroma.playAnim("chroma/Random_Keyboard.chroma", false);
|
||||||
#end
|
#end
|
||||||
# If debug mode is ON and F9 key was pressed
|
# If debug mode is ON and F9 key was pressed
|
||||||
if Input.press?(Input::F9) && File.exists?("debug_tester.dat")
|
if Input.press?(Input::F9) && Window_Settings.DebugIsEnabled = true
|
||||||
# Set debug calling flag
|
# Set debug calling flag
|
||||||
$game_temp.debug_calling = true
|
$game_temp.debug_calling = true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,6 @@ class Scene_Title
|
||||||
# Make system object
|
# Make system object
|
||||||
$game_system = Game_System.new
|
$game_system = Game_System.new
|
||||||
|
|
||||||
if File.exists?("igt.ini")
|
|
||||||
$game_temp.igt_timer_visible = true
|
|
||||||
end
|
|
||||||
|
|
||||||
# Skip title screen if debug mode (or demo, but not GDC)
|
# Skip title screen if debug mode (or demo, but not GDC)
|
||||||
if $debug || ($demo && !$GDC) || save_exists
|
if $debug || ($demo && !$GDC) || save_exists
|
||||||
$game_map.update
|
$game_map.update
|
||||||
|
|
@ -61,7 +57,7 @@ class Scene_Title
|
||||||
end
|
end
|
||||||
|
|
||||||
# check for debug file to add debug items
|
# check for debug file to add debug items
|
||||||
if File.exists?("debug_tester.dat")
|
if Window_Settings.DebugIsEnabled = true
|
||||||
# debug save
|
# debug save
|
||||||
$game_party.gain_item(54, 1)
|
$game_party.gain_item(54, 1)
|
||||||
# plight skip
|
# plight skip
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@ PROTO_TEXT = "put me in the big portal"
|
||||||
CEDRIC_TEXT = "put me in the big portal"
|
CEDRIC_TEXT = "put me in the big portal"
|
||||||
RUE_TEXT = "put me in the big portal"
|
RUE_TEXT = "put me in the big portal"
|
||||||
|
|
||||||
# Gnome 3 does not show desktop entries in Nautilus.
|
SUPPORTED_DE = ["cinnamon", "mate", "kde", "xfce", "gnome", "lxde", "lxqt"]
|
||||||
SUPPORTED_DE = ["cinnamon", "mate", "kde", "xfce"]
|
|
||||||
|
|
||||||
module Script
|
module Script
|
||||||
def self.px
|
def self.px
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,10 @@ class Window_Settings
|
||||||
VALUE_MARGIN = 270
|
VALUE_MARGIN = 270
|
||||||
ACTIVE_MARGIN = MARGIN * 2 + 20
|
ACTIVE_MARGIN = MARGIN * 2 + 20
|
||||||
SETTINGS_FILE_NAME = Oneshot::SAVE_PATH + '/settings.conf'
|
SETTINGS_FILE_NAME = Oneshot::SAVE_PATH + '/settings.conf'
|
||||||
|
class << self
|
||||||
|
attr_accessor :DebugIsEnabled
|
||||||
|
end
|
||||||
|
@DebugIsEnabled = false
|
||||||
def save_settings
|
def save_settings
|
||||||
$persistent.save
|
$persistent.save
|
||||||
File.open(SETTINGS_FILE_NAME, 'w') do |file|
|
File.open(SETTINGS_FILE_NAME, 'w') do |file|
|
||||||
|
|
@ -17,6 +20,8 @@ class Window_Settings
|
||||||
file.puts('colorblind_mode=' + $game_switches[252].to_s)
|
file.puts('colorblind_mode=' + $game_switches[252].to_s)
|
||||||
file.puts('automash_enabled=' + $game_switches[253].to_s)
|
file.puts('automash_enabled=' + $game_switches[253].to_s)
|
||||||
file.puts('frameskip=' + Graphics.frameskip.to_s)
|
file.puts('frameskip=' + Graphics.frameskip.to_s)
|
||||||
|
file.puts('in_game_timer=' + $game_temp.igt_timer_visible.to_s)
|
||||||
|
file.puts('debug=' + Window_Settings.DebugIsEnabled.to_s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -64,16 +69,25 @@ class Window_Settings
|
||||||
elsif vals[1] == "false"
|
elsif vals[1] == "false"
|
||||||
$game_switches[253] = false
|
$game_switches[253] = false
|
||||||
end
|
end
|
||||||
|
when "in_game_timer"
|
||||||
|
timer_enabled = vals[1] == "true"
|
||||||
|
$game_temp.igt_timer_visible = timer_enabled
|
||||||
|
$scene.in_game_timer.visible = timer_enabled if $scene.is_a?(Scene_Map)
|
||||||
when "frameskip"
|
when "frameskip"
|
||||||
if vals[1] == "true"
|
if vals[1] == "true"
|
||||||
Graphics.frameskip = true
|
Graphics.frameskip = true
|
||||||
elsif vals[1] == "false"
|
elsif vals[1] == "false"
|
||||||
Graphics.frameskip = false
|
Graphics.frameskip = false
|
||||||
end
|
end
|
||||||
|
when "debug"
|
||||||
|
if vals[1] == "true"
|
||||||
|
Window_Settings.DebugIsEnabled = true
|
||||||
|
elsif vals[1] == "false"
|
||||||
|
Window_Settings.DebugIsEnabled = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
def initialize
|
def initialize
|
||||||
@viewport = Viewport.new(0, 0, 640, 480)
|
@viewport = Viewport.new(0, 0, 640, 480)
|
||||||
@bg = Sprite.new(@viewport)
|
@bg = Sprite.new(@viewport)
|
||||||
|
|
@ -128,7 +142,9 @@ class Window_Settings
|
||||||
tr('Colorblind mode'),
|
tr('Colorblind mode'),
|
||||||
tr('Skip Text (R)'),
|
tr('Skip Text (R)'),
|
||||||
tr('Frameskip'),
|
tr('Frameskip'),
|
||||||
|
tr('In-Game Timer'),
|
||||||
tr('Language'),
|
tr('Language'),
|
||||||
|
tr('Debug mode(DEVELOPERS ONLY!)'),
|
||||||
tr('Configure Controls (Press F1)'),
|
tr('Configure Controls (Press F1)'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -203,9 +219,18 @@ class Window_Settings
|
||||||
else
|
else
|
||||||
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("OFF"))
|
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("OFF"))
|
||||||
end
|
end
|
||||||
when 7 # Language
|
when 7 # In-game timer
|
||||||
|
text = tr($game_temp.igt_timer_visible ? "ON" : "OFF")
|
||||||
|
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, text)
|
||||||
|
when 8 # Language
|
||||||
l = Language::LANGUAGES[@lang_index] rescue Language::LANGUAGES[0]
|
l = Language::LANGUAGES[@lang_index] rescue Language::LANGUAGES[0]
|
||||||
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr(l))
|
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr(l))
|
||||||
|
when 9
|
||||||
|
if(Window_Settings.DebugIsEnabled == true)
|
||||||
|
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("ON"))
|
||||||
|
else
|
||||||
|
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("OFF"))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -423,8 +448,13 @@ class Window_Settings
|
||||||
end
|
end
|
||||||
redraw_setting_index(6)
|
redraw_setting_index(6)
|
||||||
end
|
end
|
||||||
|
when 7 # In-game timer
|
||||||
when 7 #language
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::LEFT) || Input.trigger?(Input::RIGHT)
|
||||||
|
$game_temp.igt_timer_visible = !$game_temp.igt_timer_visible
|
||||||
|
$scene.in_game_timer.visible = $game_temp.igt_timer_visible if $scene.is_a?(Scene_Map)
|
||||||
|
redraw_setting_index(7)
|
||||||
|
end
|
||||||
|
when 8 #language
|
||||||
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::RIGHT)
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::RIGHT)
|
||||||
@lang_index += 1
|
@lang_index += 1
|
||||||
if @lang_index >= Language::LANGUAGES.length
|
if @lang_index >= Language::LANGUAGES.length
|
||||||
|
|
@ -441,6 +471,11 @@ class Window_Settings
|
||||||
$persistent.lang = Language::LANGUAGES[@lang_index]
|
$persistent.lang = Language::LANGUAGES[@lang_index]
|
||||||
redraw_all_settings()
|
redraw_all_settings()
|
||||||
end
|
end
|
||||||
|
when 9
|
||||||
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::LEFT) || Input.trigger?(Input::RIGHT)
|
||||||
|
Window_Settings.DebugIsEnabled = !Window_Settings.DebugIsEnabled
|
||||||
|
redraw_setting_index(9)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if Input.trigger?(Input::CANCEL)
|
if Input.trigger?(Input::CANCEL)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue