KButtonsManager XP
#1
KButtonsManager XP

by Kyonides


Introduction

Are you Boring bored of using the same boring menu window in your game projects?
Do you want your Gamer game to look way different than those thousands of Steam games floating around?
Now you have got a chance to be original! Grinning

A Brief Explanation

Let's take a look Detective 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:

Code:
@manager.dispose

Screenshot

[Image: kbuttonsmanagerxp01.jpg]


Terms & Conditions

Free for use in non commercial games. Grinning
Contact me if you are going commercial. Winking
Mention my nickname in your game credits. Two Thumbs Up!
"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.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

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! Laughing + Tongue sticking out

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
Reply }


Messages In This Thread
KButtonsManager XP - by kyonides - 11-22-2022, 09:25 AM
RE: KButtonsManager - by kyonides - 11-24-2022, 02:22 AM
RE: KButtonsManager - by kyonides - 11-26-2022, 08:02 PM
RE: KButtonsManager - by kyonides - 12-15-2022, 12:23 AM



Users browsing this thread: 2 Guest(s)