BrowserTree

by Polaris8920
A system to aid in the creation of Help Systems and other branching things. [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Polaris8920.BrowserTree##version=9

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Polaris8920.BrowserTree##version=9

1098 downloads
Version 9
Date added: Mar 22 2005
Last updated: Jul 29 2009
0 fans
Note: This library uses .Txt Parser. If you don't have it downloaded this library will not run correctly. Please download it first.

A system to aid in the creation of Help Systems and other branching things. You can even have custom style sheets using CSS, load from .txt files, use button presses to navigate through the tree, have paramiters for windows, use custom datums that process the users choices, and even use BrowserTree as a selection processor.

Included in DM.Libraries.

Version 8:
  • Added the ability to load from .txt files. See file Demo.txt.
  • Added <var> tags which allow developers to add variable replacements during run time. See Documentation.dm for more.
Version 7:
  • Added CSS support. This is the variable /BrowserTree/bt_style_sheet. This must be text. The custom classes are:
    .Link
    .Back
    .Close
    .Info
    .Full
  • Added text variable support. This is /BrowserTree/bt_text_variables. You can modify fours variables with one. See Demo.dm for an example or Documentation.dm for full details.
  • Added a small bit of JavaScript that makes it so when a player clicks on an open BrowserTree window, it focus reverts off of it.
  • Made it so players cannot have two BrowserTree windows open at once.
  • Added /BrowserTree_Selector. This allows for:
  • Quick access and displaying of /BrowserTree datums.
  • Player selection through a navigation tree with selection data being pased through a procedure to be parsed.
Version 4:
  • Added Key Code Abilities
  • Added paramiters


To use simply put something along the lines of this in your game to create a datum based navigation tree which a user can browse through;

BrowserTree
HelpMain
bt_name = "Main Help File"
bt_info = "This is the main help file."
bt_full = "This is the main help file."
More
bt_name = "More..."
bt_info = "More help on playing."
bt_full = "Blah, blah, balh."
NewbieHelp
bt_name = "Newbie Stuff"
bt_info = "New Player Help."
bt_full = "...press F to..."

mob/verb/Help()
var/BrowserTree/H = bt_FindDatum("/BrowserTree/HelpMain")
H.bt_Display(src)