- 664
- Posts
- 16
- Years
- Age 32
- England
- Seen May 16, 2024
Well some of you know, but my computer literally exploded the other day wiping out all my work since december, regrettably, taking my dual screen with it.
So i decided just to do a small little script for you guys, seeing as that'd be such a dissapointment to leave you with nothing.
So erm yeah, some of you might not even know i was working on anything, but i was getting quite far with it, so i've done this small, user friendly script.
Ok, before i give it to you, i want you to know that i didn't put everything into this so you may find it a little buggy, (hope not >.<) but yeah.
Mmk, Instructions time.
1. Create a new script section above the script called main. You can do this
by clicking on the script called main and pressing the insert key.
2. Name it dual screen.
3. Copy all of the script in the spoiler, and paste it into the blank window. Make sure you are pasting into the Dual Screen script window.
4. Create a file in MSPaint called spacer.png
Make it 480 pixels wide by 20 pixels high.
5. Save spacer.png in Graphics/Pictures
6. Put any pictures you want to use on the bottom screen in Graphics/Pictures
7. To show a picture on the bottom screen, you use a show picture command, but remember to set the Y coordinate to 340
8. Please, please add me to your credits list if you use this. I do this purely for "Fun" you might call it, but i'd a like a little recognition for my work, even
though it isnt much :)
9. If you like this script, it'd be great if you could join my Game Developing community at https://www.planetdev.net
It'd be great to see you there :)
Anyone wishing to expand the script is allowwed to without my consent as it's not very big, or very good at the moment.
Thanks, and i hope you enjoy using it :)
So i decided just to do a small little script for you guys, seeing as that'd be such a dissapointment to leave you with nothing.
So erm yeah, some of you might not even know i was working on anything, but i was getting quite far with it, so i've done this small, user friendly script.
Ok, before i give it to you, i want you to know that i didn't put everything into this so you may find it a little buggy, (hope not >.<) but yeah.
Mmk, Instructions time.
1. Create a new script section above the script called main. You can do this
by clicking on the script called main and pressing the insert key.
2. Name it dual screen.
3. Copy all of the script in the spoiler, and paste it into the blank window. Make sure you are pasting into the Dual Screen script window.
Spoiler:
Code:
#===============================================================================
# * Dual Screen Script for Pokemon Essentials
# * By Crazyninjaguy
# * https://www.planetdev.net
#===============================================================================
# If you like this script, please register on my site :)
# https://www.planetdev.net
#===============================================================================
module Graphics
@@fadeoutvp=Viewport.new(0,0,485,685)
@@fadeoutvp.z=0x3FFFFFFF
@@fadeoutvp.color=Color.new(0,0,0,0)
end
class Sprite_Picture
def initialize(viewport, picture)
@viewport = Viewport.new(0, 0, 480, 680)
@picture = picture
@sprite = nil
update
end
end
module Resolution
GetWindowPlacement = Win32API.new('user32','GetWindowPlacement',['l','p'],'l')
GetSystemMetrics = Win32API.new('user32', 'GetSystemMetrics',['i'],'i')
MoveWindow = Win32API.new('user32','MoveWindow',['l','i','i','i','i','l'],'l')
FindWindowEx = Win32API.new('user32','FindWindowEx',['l','l','p','p'],'i')
def self.windowloc(window)
string = ' ' * 44
Resolution::GetWindowPlacement.call(window,string)
windowdetails = string.unpack('L11')
result = []
result.push((windowdetails[9] - windowdetails[7]))
result.push((windowdetails[10] - windowdetails[8]))
result.push(windowdetails[7])
result.push(windowdetails[8])
return result
end
end
class Screen
def self.center
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
width,height = Resolution.windowloc(window)[0..1]
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
Resolution::MoveWindow.call(window,(screenwidth - width) / 2,(screenheight - height) / 2,width,height,1)
end
def self.resize2(width,height,x,y)
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
Resolution::MoveWindow.call(window,x,y,width,height,1)
end
def self.move(x,y)
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
width,height = Resolution.windowloc(window)[0..1]
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
Resolution::MoveWindow.call(window,x,y,width,height,1)
end
def self.resize(width,height,center = true)
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
if center
Resolution::MoveWindow.call(window,(screenwidth - width) / 2,(screenheight - height) / 2,width,height,1)
else
x,y = Resolution.windowloc(window)[2..3]
Resolution::MoveWindow.call(window,x,y,width,height,1)
end
end
def self.half(center = true)
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
if center
Resolution::MoveWindow.call(window,(screenwidth - 326) / 2,(screenheight - 272) / 2,326,272,1)
else
x,y = Resolution.windowloc(window)[2..3]
Resolution::MoveWindow.call(window,x,y,326,272,1)
end
end
def self.default
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
Resolution::MoveWindow.call(window,(screenwidth - 646) / 2,(screenheight / 2) - 273,646,512,1)
end
end
Screen.resize(485,685)
#----------------------------------------------
@spacer=IconSprite.new(0, 320)
@spacer.setBitmap("Graphics/Pictures/spacer")
@spacer.z = 99999999
#-----------------------------------------------
4. Create a file in MSPaint called spacer.png
Make it 480 pixels wide by 20 pixels high.
5. Save spacer.png in Graphics/Pictures
6. Put any pictures you want to use on the bottom screen in Graphics/Pictures
7. To show a picture on the bottom screen, you use a show picture command, but remember to set the Y coordinate to 340
8. Please, please add me to your credits list if you use this. I do this purely for "Fun" you might call it, but i'd a like a little recognition for my work, even
though it isnt much :)
9. If you like this script, it'd be great if you could join my Game Developing community at https://www.planetdev.net
It'd be great to see you there :)
Anyone wishing to expand the script is allowwed to without my consent as it's not very big, or very good at the moment.
Thanks, and i hope you enjoy using it :)
Last edited: