Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 HiddenChest RGSS Player Executable
Toggling a Bump for Fun!

[Image: hiddenchest10.jpg]

In version 1.1.56 of your favorite local engine, you are now able to make custom toggle buttons or radio buttons or the like. Laughing + Tongue sticking out

By creating a custom sprite class object you can assign it its active and inactive states and the selected button and it will automatically pick either the active or inactive state bitmap. Of course, you still need to setup the button state yoursefl. Laughing

You got to admit it is a highly convenient feature for it lets you forget about creating several sprites and then group them in a set only to get a single button sprite work as expected. Grinning

Don't worry, guys! Happy You can change the graphics at any time! Two Thumbs Up!
Just make sure the button is slightly smaller than the button backdrop sprite. Laughing

Sad Sadly, there are only *Ubuntu binary executables available right now. Laughing + Tongue sticking out 

Here you can take a look at the test script I have been using while playing with HiddenChest.


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

class MenuScene
 def main
   @timer = 0
   @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)
   @buttons = []
   @labels = []
   @states = [true, false, true, false, true]
   total = ButtonData::LABELS.size
   total.times do |n|
     cy = 44 + n * 32
     sprite = ToggleButtonSprite.new
     sprite.set_xy(8, cy)
     sprite.bitmap_on = RPG::Cache.icon(ButtonData::ICONS[0])
     sprite.bitmap_off = RPG::Cache.icon(ButtonData::ICONS[1])
     sprite.button = RPG::Cache.icon(ButtonData::ICONS[2])
     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, bit.height, ButtonData::LABELS[n])
     @labels << sprite
   end
   Graphics.transition
   main_loop while $scene == self
   Graphics.freeze
   (@buttons + @labels).each{|b| b.dispose }
   @title.dispose
   @bg.dispose
   @states.clear
 end

 def main_loop
   Graphics.update
   Input.update
   update
 end

 def update
   return @timer -= 1 if @timer > 0
   if Input.trigger?(Input::B)
     Audio.play_cancel
     $scene = Scene_Title.new
     return
   elsif Input.trigger?(Input::C)
     Audio.play_ok
     @buttons[0].state = !@buttons[0].state
   elsif @buttons[0].mouse_above? and Input.left_click?
     Audio.play_ok
     @buttons[0].state = !@buttons[0].state
     @timer = Graphics.frame_rate / 3
   elsif Input.trigger?(Input::KeyP)
     Audio.play_ok
     Graphics.save_screenshot
   end
 end
end


Those Ubuntu or Kubuntu users or similar Linuxers break a leg! Laughing 
Perhaps I should say break a finger instead!? Confused
"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 Melana - 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 Melana - 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 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 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 kyonides - 05-06-2020, 09:41 AM

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



Users browsing this thread: