KButtonsManager XP

KButtonsManager

XP + VX + ACE


by Kyonides Arkanthes
​


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.)

Ruby:
  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, Z)
    @manager.set_xyz(80, 260, 100)
    # 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:

Ruby:
@manager.dispose


Screenshot

kbuttonsmanagerxp01.jpg


Downlod DEMO​

Terms & Conditions

Free for use in non commercial games. 😀
Contact me if you are going commercial. 😉
Mention my nickname in your game credits.

Original thread: https://forums.rpgmakerweb.com/threads/kbuttonsmanager-xp.152825/