KToggleButtons XP
#1
KToggleButtons XP

by Kyonides


Introduction

Are you Boring bored of using the same old text buttons?
Now you can replace them with some good looking Toggle Buttons! Shocked

"Old Screenshots"

"New Screenshots"

Instructions

Define a New Style

STYLES[:style_name] = { :name => "Basica", :cursor => "cursor1",
  :cursor_off => "cursor2", :on => "toggle1", :off => "toggle2", :button => "toggle3" }

Change Current Toggle Button Style - Use any of the keys you enter in the STYLES Hash.
$game_system.toggle_button_style = :basic

How to Define a Toggle Button Manager
Code:
@manager = KToggle::Manager.new(FontSize, LineHeight, "Name", LabelsArray)
@manager.setup_buttons(X, Y, LabelWidth, LabelHeight)
@manager.setup_cursor(true) # Create an Active Cursor

How to Set a State - Repeat as many times as deemed necessary!
@manager.set_state(1, some_variable)
@manager.set_state(2, some_variable)

How to Get a State - Here 1 stands for the first position in the Array.
@manager.state?(1)

Since the demos include a TestScene script, you can take a Detective look at it to learn a bit more on how to create your custom scene script. Winking


Terms & Conditions

Free for non commercial games.
Contact me if you needed for commercial games.
Mention me 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.

[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 }
#2
Maintenance update

Not long ago I had to upload new versions of both demos to correct some visual glitches that I had found there. They weren't really important but you could find yourself being unable to read the nun's comments on the ACE version because I picked a terrible font color. Plus, I had to move up the buttons' texts a little bit in the XP version. I even updated the screenshot to reflect the changes.

As a bonus(?) I have also modified the start menu and uploaded a VX demo minutes ago.

Anyway, these new demos will be the only ones I will be supporting from now on. Feel free to redownload them at any time. Winking
"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 }
#3
Interesting Update

My script has now reached the 1.0.0 milestone!

The full version brings you the possibility to setup two different kinds of toggle buttons: the multiple choices set (by default) and the single choice set (by adding a single line of code).

It also allows you to easily setup what I called subheadings to identify your button sets.

[Image: ktogglebuttonsxp02.jpg]
"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 }
#4
I figured I'd drop in and contribute some graphics (and ideas) for this cool script!  Ruby

You can crop these images and save them as individual icons (XP) or copy/paste them individually into your local icon sheets (VX and beyond).

These icons are from my personal collection; just stick to the original terms and conditions of kyonide's script and all is good in the world.

Also, I like credit too if the icons are used. Otherwise, I'll pop out of the bowl of rice with a poisoned blow dart and nobody will be the wiser... Winking 

Radio Buttons

[Image: GUI-Radio-Button.png]

Radio buttons represent your standard binary True / False settings. 

Check Buttons

[Image: GUI-Check-Button.png]

Check Buttons can be used to represent standard True / False, as well as Nil and Maybe.

I don't know how well these ambiguous Maybe and Nil states are represented in kyonide's current script, but feel free to use them as you wish.

Also, I tried to design these to be high contrast so they can still be visible even on a menu surface of any matching color (results may vary.)

More Context (Use Cases of Maybe and Nil)

I think as software users we take for granted the humble checkboxes and radio buttons but they really can be quite expressive (and super easy to use.) Definitely a great tool for menu designers, thank you for publishing. Congrats on the 1.0.0 milesetone!
[Image: Button-BOTB.png]
[Image: Save-Point.gif][Image: Button-You-Tube2.png][Image: Button-Sound-Cloud2.png][Image: Button-Audio-Mack2.png]
[Image: LS-Banner.gif]
NEW ALBUM OUT NOW!

Reply }
#5
(11-11-2022, 01:38 PM)Kain Nobel Wrote: Check Buttons

[Image: GUI-Check-Button.png]

Check Buttons can be used to represent standard True / False, as well as Nil and Maybe.

I don't know how well these ambiguous Maybe and Nil states are represented in kyonide's current script, but feel free to use them as you wish.
...
Nil : Nothing has been selected. (Sometimes represented as a False or a Maybe.)
True : The box has been checked as a "Yes" state.
False : The box has been checked as a "No" state. (Sometimes represented as a Nil.)
Maybe : The box has not been physically checked and represents an unchanged state. (Sometimes represented as a Nil.)
...
Here is how I use Maybe and Nil values in the context of my Missions system.

Well, you could call the nil or maybe buttons tri-state buttons. I know they do exist for even PC Linux distros with KDE GUI sometimes have them. Yet, I didn't want to include them in my scripts for a simple reason: most people don't need them under normal circumstances. Laughing

Besides, my "radio buttons" are meant for use in menus, not missions and the like. Happy with a sweat
"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 }
#6
Less is more, I agree. With you always looking for ideas, I figured I'd give ya one and contribute some free icons that could be useful with this system.

Either way, these are great menu design elements. Take care and happy scripting!
[Image: Button-BOTB.png]
[Image: Save-Point.gif][Image: Button-You-Tube2.png][Image: Button-Sound-Cloud2.png][Image: Button-Audio-Mack2.png]
[Image: LS-Banner.gif]
NEW ALBUM OUT NOW!

Reply }
#7
Maintenance Update!

All RGSS-based versions have been upgraded recently! Grinning

To be honest with you, this version doesn't include any eye-catching feature at all. Happy with a sweat

It just allows you to call a couple of new methods for the KToggle::Manager and the KToggle::Cursor classes.
One of them is the new @manager.reset_cursor call, and yes, you can also manually set a specific position for the cursor to start at while launching or at any other moment.

I felt like it was a must to change the @manager.set_state method by adding an additional parameter so it should be called now just like this:

Code:
@manager.set_state(1, your_variable_here)
@manager.set_state(2, your_variable_here)

As you could see above, it begins with position 1 for convenience sake. Winking
This also lets you alter that value via a script call at any given time. 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 }




Users browsing this thread: 1 Guest(s)