HiddenChest RGSS Player Executable
The Spy Was Dismissed Officially! Shocked

Laughing Well, you got to agree that it was not a good name for such a module. It is now known as the ToggleGroup class! Grinning 
Happy with a sweat Why did I change its name and structure!?

If I Recall Correctly You see, I wanted to let you manage several groups of buttons you could toggle at any time so disposable classes were a good choice. A module is a single Module class instance so you could not make several copies of it. Classes can be multiplied as many times as you ever need to. Two Thumbs Up!
Visually there is no change at all Laughing + Tongue sticking out  except that the Mouse interface now works smoothly. The buttons and the menu containing the group will always know where did you click last time. Even if you suddenly start using the keyboard or the gamepad, it will update the focus just as expected. Grinning

You got to admit that your menus will surely look a lot better than before. Laughing 
Really? Or do you plan to keep using those ugly menus where you need to use the window's default squarish cursor that everybody hates?
Huh? You don't believe me!? Then go ask Steam users and they will tell you how much they dislike games with some default RTP interface. Laughing + Tongue sticking out

Here is the latest version of my Toggle Button "Test" Menu.

Code:
# * Toggle Button Menu for HiddenChest
#   Scripter : Kyonides Arkanthes
#   2020-05-09

module ButtonData
  TITLE = "Scene Settings"
  BACKDROP = 'recycle texture'
  ICONS = %w{toggle1 toggle2 toggle3 toggle4}
  LABELS = ['Find Treasures', 'Kick Asses', 'Play Minigames',
            'Contract Covid-19', 'Hug Corona-chan', 'Escape']
end

class ToggleButtons
  def initialize(states)
    Settings.click_timer = 10 #Graphics.frame_rate / 3
    @manager = ToggleGroup.new
    @timer = 0
    @buttons = []
    @labels = []
    @total = ButtonData::LABELS.size
    @total.times do |n|
      cy = 44 + n * 32
      sprite = ToggleButton.new
      sprite.manager = @manager
      sprite.set_xy(8, cy)
      sprite.frame = RPG::Cache.icon(ButtonData::ICONS[0])
      sprite.bitmap_on = RPG::Cache.icon(ButtonData::ICONS[1])
      sprite.bitmap_off = RPG::Cache.icon(ButtonData::ICONS[2])
      sprite.button = RPG::Cache.icon(ButtonData::ICONS[3])
      sprite.state = states[n]
      @buttons << sprite
      sprite = Sprite.new
      sprite.set_xy(36, cy)
      sprite.bitmap = bit = Bitmap.new(160, 28)
      bit.draw_text(0, 0, bit.width, 28, ButtonData::LABELS[n])
      @labels << sprite
    end
    @manager.buttons = @buttons
    @buttons[5].block = true
  end

  def update
    @buttons.each{|button| button.update }
    if Input.trigger?(Input::UP)
      Audio.play_cursor
      @manager.index = (@manager.index - 1) % @total
      return
    elsif Input.trigger?(Input::DOWN)
      Audio.play_cursor
      @manager.index = (@manager.index + 1) % @total
    end
  end

  def dispose
    @labels.each{|b| b.dispose }
    @labels.clear
    @manager.dispose
  end
  def states() @buttons.map(&:state) end
end

class MenuScene
  def main
    @bg = Sprite.new
    @bg.bitmap = RPG::Cache.title(ButtonData::BACKDROP)
    @title = Sprite.new
    @title.set_xy(Graphics.width / 2 - 120, 8)
    @title.bitmap = bit = Bitmap.new(240, 32)
    bit.draw_text(0, 0, 240, 32, ButtonData::TITLE, 1)
    states = [true, false, true, false, true, false]
    @buttonset = ToggleButtons.new(states)
    states.clear
    Graphics.transition
    main_loop while $scene == self
    Graphics.freeze
    @buttonset.dispose
    @title.dispose
    @bg.dispose
  end

  def main_loop
    Graphics.update
    Input.update
    update
  end

  def update
    @buttonset.update
    if Input.trigger?(Input::B)
      Audio.play_cancel
      @buttonset.states
      $scene = Scene_Title.new
      return
    elsif Input.trigger?(Input::KeyP)
      Audio.play_ok
      Graphics.save_screenshot
      return
    end
  end
end

Now I am lazy Laughing and prefer to fetch some Beer
So I am leaving now! Laughing + Tongue sticking out 

By the way, Windows users, you are out of luck! Indifferent
"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
HiddenChest RGSS Player Executable - by kyonides - 11-21-2018, 10:44 PM
RE: MKXPPLUS RGSS Player Executable - by kyonides - 11-22-2018, 06:33 AM
RE: MKXPPLUS RGSS Player Executable - by kyonides - 11-25-2018, 12:17 AM
RE: MKXPPLUS RGSS Player Executable - by kyonides - 11-25-2018, 05:48 AM
RE: MKXPPLUS RGSS Player Executable - by kyonides - 11-26-2018, 12:55 AM
RE: MKXPPLUS RGSS Player Executable - by kyonides - 11-26-2018, 04:42 AM
RE: MKXPPLUS RGSS Player Executable - by kyonides - 11-27-2018, 08:56 AM
RE: MKXPPLUS RGSS Player Executable - by kyonides - 11-28-2018, 11:31 AM
RE: MKXPPLUS RGSS Player Executable - by kyonides - 11-29-2018, 05:10 AM
RE: MKXPPLUS RGSS Player Executable - by kyonides - 12-01-2018, 07:15 AM
RE: MKXPPLUS RGSS Player Executable - by Mel - 12-01-2018, 11:11 AM
RE: MKXPPLUS RGSS Player Executable - by kyonides - 12-06-2018, 05:25 AM
RE: MKXPPLUS RGSS Player Executable - by Mel - 12-07-2018, 12:17 AM
RE: MKXPPLUS RGSS Player Executable - by kyonides - 12-07-2018, 06:20 AM
RE: HiddenChest RGSS Player Executable - by Mel - 12-08-2018, 09:55 AM
RE: HiddenChest RGSS Player Executable - by KDC - 03-23-2019, 02:47 AM
RE: HiddenChest RGSS Player Executable - by KDC - 03-26-2019, 12:16 AM
RE: HiddenChest RGSS Player Executable - by KDC - 03-26-2019, 05:23 AM
RE: HiddenChest RGSS Player Executable - by KDC - 03-26-2019, 05:39 AM
RE: HiddenChest RGSS Player Executable - by KDC - 03-26-2019, 06:24 AM
RE: HiddenChest RGSS Player Executable - by KDC - 03-26-2019, 06:59 AM
RE: HiddenChest RGSS Player Executable - by KDC - 03-26-2019, 09:00 PM
RE: HiddenChest RGSS Player Executable - by Mel - 06-26-2019, 06:12 PM
RE: HiddenChest RGSS Player Executable - by Mel - 06-26-2019, 10:57 PM
RE: HiddenChest RGSS Player Executable - by Mel - 06-27-2019, 08:49 AM
RE: HiddenChest RGSS Player Executable - by KDC - 07-02-2019, 10:09 PM
RE: HiddenChest RGSS Player Executable - by KDC - 07-03-2019, 03:55 PM
RE: HiddenChest RGSS Player Executable - by Mel - 12-11-2019, 11:38 PM
RE: HiddenChest RGSS Player Executable - by kyonides - 05-09-2020, 09:31 AM
RE: HiddenChest RGSS Player Executable - by Mel - 03-07-2023, 01:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Neko RMXP Player for Android JayRay 2 8,199 10-05-2014, 03:46 AM
Last Post: DerVVulfman
   ARGSS - Remaking RGSS/2 Player vgvgf 13 22,562 04-21-2010, 04:34 AM
Last Post: vgvgf



Users browsing this thread: 30 Guest(s)