How to add buttons on sublime text 2?

button, sublimetext2, uibutton

Solution

You can add menu entries, but it is not possible to add UI buttons. That being said, you may be able to mimic the behavior you want by creating Menu entries with a command at the top level, rather than having nested entries. To do this, create a `Main.sublime-menu` file in your `Packages/User` Folder. Insert the following into the file.

[
    {
        "caption": "Save",
        "command": "save"
    },
    {
        "caption": "Save As",
        "command": "prompt_save_as"
    },
    {
        "caption": "Open File",
        "command": "prompt_open_file"
    }
]

Problem

I want to add many function buttons to the top bar menu in the Sublime Text 2. How do I do this? Buttons that I need to add: - Save - Save as - Open - Open as

Original source