Fandom

Petit Computer Wiki

Kirby GUI

916pages on
this wiki
Add New Page
Comments89 Share

Kirby GUI
General Info
Contributor(s): TriforceOfKirby
Release Date: August 6, 2013
Development Status: Planning
Version: 1.0.0
Mode(s): Single-Player
Language(s): English, Japanese


This is a touch-controlled graphical user interface that can be used in a program for extra controls.

InstructionsEdit

Version 1.1.0Edit

To add this to your program, start by using the APPEND command. Now you will have to add a few lines of code to your program:

GOSUB@INI

Add this near the top of your program, this will initialize the GUI and load the configuration file.

IF BUTTON()THEN GOSUB@BTN ELSE BTN=0

Add this to your main loop, this detects button presses, you may also add your own button press statements in this sub-routine. In your program, use BTN for detecting button presses rather than BUTTON().

IF TCHST THEN GOSUB@TCH

Add this right after the previous statement, this will check if the user is pressing any of the controls.

Upon running the program, if no configuration file is found, it will prompt you to create a new one. It will first prompt you to select a language, at the moment there is English and Japanese, your language is saved in the configuration file so this will only show up the first time you use it.

After selecting a language, it will bring you to the configuration menu, from which you can create a new config, edit an existing config, or load a config. You may have up to 100 different configs, numbered from 1 to 99, plus the auto-loaded config. There are also presets available to choose from, which are stored directly in the GUI as DATA.

In the configuration editor, there are tabs that you can tap for various options. The first tab is the controls tab, which let's you add control elements such as analog pads, directional pads, and buttons. To add a control, simply tap on the icon from the tab, then tap on the screen, you can re-position and re-size the control by dragging, or by tapping on the size and position tab, which will let you enter more precise values for positioning and re-sizing the control.

ChangelogEdit

Version 1.0.0Edit

  • Initial Release

Future PlansEdit

  • I will add any user requested features.

Version 1.1.0Edit

  • Added configurable number of controls (up to 31).
  • Controls can be Buttons, D-Pads, or Circle Pads.
  • Buttons can be circular or rectangular.
  • Controls can have a character displayed over the center, or can optionally have an 8-character string displayed (uses up another control slot).
  • All controls can be positioned and re-sized.
  • All controls can be enabled/disabled.

Videos and ScreenshotsEdit

GUI
Version 1.1.0 Teaser

DownloadEdit

Version 1.0.0Edit

CIRCLPAD

Version 1.1.0a DEMOEdit

CIRCLPADv1.1.0a

LicenseEdit

No license applied as of now.

NotesEdit

There are a few sub-routines that are included that you may use for your own purposes.

  • @PAUSE - Waits for the user to press a button before returning
  • @TXT - Draws text on the graphic layer allowing text to be positioned anywhere on the screen rather then being fixed to a grid. It takes 3 parameters: SCALE - The size of the text, possible values are 1, 2, 4, and 8, 1 is normal sized text, 2 is double sized and so on. POS - The position of the text in pixels, the format is POS=X+Y*256. TXT$ - The text to display. After setting the 3 parameters, just use GOSUB@TXT(you may also need to set the GPAGE to the screen you want the text on).

Config file formatEdit

Header - 8 Bytes
B0: Language
B1: Number of controls
B2: Color 1
B3:
B4: Color 2
B5:
B6: Color 3
B7:
Controls - 8 Bytes/Control
B0: isEnabled
    0: No
    1: Yes
B1: controlType
    0: Button (Circular)
    1: Button (Rectangular)
    2: D-Pad
    3: Circle Pad
B2: xCoordinate
    0-255
B3: yCoordinate
    0-191
B4: radius/width
B5: radius2/height
B6: displayedCharacter
    0: None
    32: Use next 8 Bytes for string
B7: buttonMapping
    0: None
    1: Up
    2: Down
    3: Left
    4: Right
    5: A
    6: B
    7: X
    8: Y
    9: L
    10: R
    11: START
    12: SELECT (Can't normally be used)
    13: HOME (Can't normally be used)

CreditsEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.