Posts: 4,713
Threads: 561
Joined: Dec 2009
11-22-2022, 09:25 AM
(This post was last modified: 09-27-2024, 07:17 AM by kyonides.)
KButtonsManager XP
by Kyonides
Introduction
Are you  bored of using the same boring menu window in your game projects?
Do you want your  game to look way different than those thousands of Steam games floating around?
Now you have got a chance to be original!
A Brief Explanation
Let's take a look  at the custom Scene_Title script included in the demo as an example of how to use it effectively.
Here we got the make_buttons method I defined there. It pretty much contains all you need to know about the script calls needed to make it work properly. (By the way, it is called from the scene's main method.)
Code: def make_buttons
# Did the Game find Any Saved Games there?
@continue = Dir['Save*.rxdata'].any?
# Create Button Manager - Pass (Total Options, Cursor Filename)
@manager = KButtons::Manager.new(OPTIONS.size, CURSOR_FILE)
# Set the Buttons' Direction - Pass = :horizontal or :vertical
@manager.direction = :horizontal
# Set the Offsets - Pass (X, Y)
@manager.set_offsets(0, 4)
# Set the Coordinates - Pass (X, Y)
@manager.set_xy(80, 260)
# Draw Name and Picture
# - Pass (Name's Height, Font Size, Names Array, Symbols Array)
@manager.draw_text_picture(26, 24, OPTIONS, SYMBOLS)
# Define List of States
# - [Booleans like true or false, Add, As, Many, As, Necessary]
@manager.enabled = [true, @continue, true, true]
# Set the Initial Position of the Cursor - Usually Number 0
@manager.index = (@continue and @index == 0)? 1 : @index
end
Later on you would only need to dispose the Button Manager like this:
Screenshot
Terms & Conditions
Free for use in non commercial games. 
Contact me if you are going commercial. 
Mention my nickname in your game credits.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Posts: 4,713
Threads: 561
Joined: Dec 2009
11-24-2022, 02:22 AM
(This post was last modified: 11-24-2022, 02:22 AM by kyonides.)
VX or VX ACE? 
Why not both of them? 
As you might have noticed already, my dear fellow forumers, I have updated this thread and its demos over and over again for a very important reason. I have included new demos for XP, VX and VX ACE!
Here is the proof!
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Posts: 4,713
Threads: 561
Joined: Dec 2009
11-26-2022, 08:02 PM
(This post was last modified: 11-26-2022, 08:04 PM by kyonides.)
Black Friday's Bug Fixes
Well, I gotta admit  that I had to correct the vertical scroll feature of my scripts because they were scrolling horizontally until last night.
I had also made other small changes to the code, but they are not visible at all.
OK, I really hope that you will find them useful for making interesting menus.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Posts: 4,713
Threads: 561
Joined: Dec 2009
Maintenance Updates
I had to update all of the demos because I noticed that the scripts didn't offer all of the features already available in the RMXP version or they didn't keep track of the button's height, which is important for its location in the invisible grid.
Besides, all of them needed to be able to change the  gray out feature at will. I realized that I had to change it after I was working on Kuests Dynamis and badly needed to update the Side Quests and Active Quests lists simultaneously.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
|