Peeky Chew
Master of Palettes
- 829
- Posts
- 15
- Years
- Age 31
- Great Britain
- Seen Aug 18, 2016
Still haven't had a solution to my problem...
Crazyninjaguy said:Try using the Show Picture event command, setting the Y value to 340.
That didn't work. In my other copy of essentials (the one that actually has main) I did exactly the same things and it worked.There ^
Or is the spacer graphic causing you problems?
If it is then just wait till the next version, because it's got a lot of scripts that i'm just gonna release the Scripts.rxdata
Just a small hint on what is included in the next version.
I'm going to implementing 4 different menus that you'll be able to choose from.
In the next release, because i want it out pretty quickly to show that progress is coming along, only one menu will be available to be used.
Well hopefully in the next release i'll make a script version of what you want, but for now, i'll just tell you how.
First of all, create the background with Show.picture("filename")
Then, do a show picture event command with a picture, and set the X and Y coordinates.
Remember, the Y coordinate MUST be more than 340 for it to appear on the bottom screen.
And just set the picture number to 2.
Any pictures with a higher number than that will appear on top of it, so it's ideal for buttons etc.
Nope, the one it works on is the older one...Your other copy of essentials must be a newer one right?
That'd be why, i'm using the newest version :)
As for V2 of the script, it's coming along, but i'm pushing the release of it over to tommorow unless i get this menu script finished tonight.
#===============================================================================
# * 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
#-----------------------------------------------
Ok peoples, quick fix time!
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/" + Dual::SPACER) @spacer.z = 99999999 #-----------------------------------------------
Basically, this'll fix the errors that some of you were getting.
Also i've done away with the Show.Picture thingy as it wasnt really needed.
Just replace your old script with this one.
To display pictures, just use the show picture event command.
As this was only meant to be a simple release of my script as i lost the main one, there won't be any major updates for a while.
So for the moment, you'll have to use this.
If anyone wants a mouse input module i've edited, just PM me :)
#----------------------------------------------
@spacer=IconSprite.new(0, 320)
@spacer.setBitmap("Graphics/Pictures/spacer")
@spacer.z = 99999999
#-----------------------------------------------
module Show
def self.picture(filename)
@sprite=IconSprite.new(0, 325)
@sprite.setBitmap("Graphics/Pictures/Oak")
end
end