KToggleButtons XP
by Kyonides Arkanthes
Introduction
Are you bored of using the same old text buttons?
Now you can replace them with some good looking Toggle Buttons!
Version 1.1.1
It's also available for VX & VX ACE!
Instructions
Define a New Style
Ruby: - 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.
Ruby: - $game_system.toggle_button_style = :basic
复制代码
How to Define a Toggle Button Manager
Ruby: - @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!
Ruby: - @manager.set_state(index, some_variable)
复制代码
How to Get a State - Here 1 stands for the first position in the Array.
Ruby:
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.
Terms & Conditions
Free for non commercial games.
Contact me if you needed for commercial games.
Mention me in your game credits.
本贴来自国际rpgmaker官方论坛作者:kyonides处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址: https://forums.rpgmakerweb.com/threads/ktogglebuttons-xp.152433/ |