- 664
- Posts
- 16
- Years
- Age 33
- England
- Seen May 16, 2024
Great script CNG, this is what I have so far. Took forever getting X and Y coordinates...then I finally thought "Hey, Paint tracks XY coordinates...why not make the mock up then record the XY of the top left pixel of each icon". That's when I went "...OMG" xD.
![]()
Just need to make menus pop-up and everything when I click on each icon with the mouse...when I PM you of course, helps if I get the script beforehand >.>
Btw, how do I fix the resolution issue? I mean when I switch resolutions in the Options the Dual Screen disappears even if I change back to 480x320.
Add this is a new script section above main
Code:
class PokemonOptionScene
def pbStartScene
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@sprites["title"]=Window_UnformattedTextPokemon.newWithSize(
_INTL("OPTION"),0,0,Graphics.width,64,@viewport)
# These are the different options in the game. To add an option, define a setter and
# a getter for that option. To delete an option, comment it out or delete it.
# The game's options may be placed in any order.
@PokemonOptions=[
EnumOption.new(_INTL("TEXT SPEED"),[_INTL("SLOW"),_INTL("MID"),_INTL("FAST")],
proc { $PokemonSystem.textspeed }, # Getter
proc {|value|
$PokemonSystem.textspeed=value
MessageConfig.pbSetTextSpeed(pbSettingToTextSpeed(value))
} # Setter
),
EnumOption.new(_INTL("BATTLE SCENE"),[_INTL("ON"),_INTL("OFF")],
proc { $PokemonSystem.battlescene },
proc {|value| $PokemonSystem.battlescene=value }
),
EnumOption.new(_INTL("BATTLE STYLE"),[_INTL("SHIFT"),_INTL("SET")],
proc { $PokemonSystem.battlestyle },
proc {|value| $PokemonSystem.battlestyle=value }
),
EnumOption.new(_INTL("FONT STYLE"),[_INTL("Em"),_INTL("R/S"),_INTL("FRLG"),_INTL("DP")],
proc { $PokemonSystem.font },
proc {|value|
$PokemonSystem.font=value
MessageConfig.pbSetSystemFontName($VersionStyles[value])
}
),
NumberOption.new(_INTL("FRAME"),_INTL("TYPE%d"),1,$TextFrames.length,
proc { $PokemonSystem.frame },
proc {|value|
$PokemonSystem.frame=value
MessageConfig.pbSetSystemFrame($TextFrames[value])
}
),
EnumOption2.new(_INTL("MAP VIEW"),[_INTL("ORIGINAL"),_INTL("CUSTOM"),_INTL("PERSPECTIVE")],
proc { $PokemonSystem.tilemap ? $PokemonSystem.tilemap : 0 },
proc {|value|
oldvalue=$PokemonSystem.tilemap
$PokemonSystem.tilemap=value
if value!=oldvalue
ObjectSpace.each_object(TilemapLoader){|o| next if o.disposed?; o.updateClass }
end
}
),
NumberOption.new(_INTL("SPEECH FRAME"),_INTL("TYPE%d"),1,$SpeechFrames.length,
proc { $PokemonSystem.textskin },
proc {|value| $PokemonSystem.textskin=value;
MessageConfig.pbSetSpeechFrame(
"Graphics/Windowskins/"+$SpeechFrames[value]) }
)
]
@sprites["option"]=Window_PokemonOption.new(@PokemonOptions,0,
@sprites["title"].height,Graphics.width,
Graphics.height-@sprites["title"].height)
@sprites["option"].viewport=@viewport
@sprites["option"].visible=true
# Get the values of each option
for i in [email protected]
@sprites["option"][i]=(@PokemonOptions[i].get || 0)
end
pbDeactivateWindows(@sprites)
pbFadeInAndShow(@sprites) { pbUpdate }
end
end
I managed to combine this script with the mouse script of Cybersam, but as Soul.//Silver i can´t do pop-up menus or interactive icons and functional.
Please anyone can share their knowledge about this.
thanks in advance
Well it's quite simple really, take the PokemonMenu Script.
And this is how you would set it out so if an icon is clicked, something happens.
Code:
if Mouse.mouse_in_area?(x, y, width, height)
if Mouse.click?(1)
pbFadeOutIn(99999) {
scene=PokemonPokedexScene.new
screen=PokemonPokedex.new(scene)
screen.pbStartScreen
@scene.pbRefresh
}
end
end
That would take you to the Pokedex Screen.
Hope that helped :)