PHCA Pages


Menus in PHCA are grouped together in pages. A page can either be a graphic image, such as a floor plan or a dashboard with individual buttons, or classic scrollable menus. Image pages are a little harder to set up, but do make for a very professional appearance. Regular menu pages are a little easier to set up.

Image pages. First you need the images that will be displayed. For each image, you will actually need to upload TWO images. The first one is the image that you will see when you navigate to the page. That would be the floor plan or dashboard that you have designed. The second image is what is known as a colormap. The image is exactly the same size (in pixels, x and y dimensions), and is mostly white except for any areas where you want to register as a target point. Each target point will need to be a different color.

Try to stick with the primary colors, such as red, green, blue, yellow, etc. Both images will need to be the same resolution as your phone screen. If you don’t know your resolution, you can click on the “About” button at the bottom of the configuration screen. The dialog that appears will tell you what your screen resolution is. When you are done creating your files, save them as .png and upload them to your /sdcard/phca folder on your phone. That folder will be created for you the first time your run phca. When you set up your pages in phca, you will tell it the filenames of the visible image and the colormap. The colormap will not be visible when running the program, but phca will know where the color targets are located and will be able to tell where you tap on the screen based on those colors.

After tapping on the Edit Pages button, you will be presented with a page that lists all of your current pages. If you don’t have any pages, you will see a dialog pop up to help you get your first page created. From there you can add, delete, and make copies of existing pages. Add ane delete pages by long pressing on a page in the list. As mentioned before, you must have a “mainmenu” page, so let’s begin by creating one. Click on the menu button and choose “Add new page”.

Add a new page. The configurable settings for a page are as follows:
Page Name: The page name is the internal name for identifying this page. A page name must be unique and cannot be the same as any other existing page. Name this page precisely “mainmenu”.

Page Title: The page title is user-friendly title that is displayed on list-type pages. There is no need for a page title on image-type pages so this field is not enabled for image-type pages. You could title this page “Main menu” or “Bob’s house” or anything that suits you.

Page type: The page type can be either “image” or “list”. It cannot be changed on an existing page. Image-type pages must also declare the image and overlay filenames.

Visible Image Filename: The visible image is the one that you will see when your page is drawn. It should be sized the same dimensions as your screen and should be saved as a PNG. It will need to be stored in the /sdcard/phca folder:

Transparent Color Overlay Filename: This is the colormap file for identifying targets on your visible image. Test your image files to make sure they can be found and that they are the correct size with the “Check image files” button.

Save your page by clicking the save button at the bottom. If there are any errors found, you will be prompted for a correction.

There, you have created your first page. Although there aren’t any actions on the page, so it won’t be of much use yet. But before we get going with the actions, take a minute to create at least one more page. We will need other pages so we can create pagelinks between them.

Once you are done creating an extra page or two, let’s put an action on the mainmenu.

Edit actions

Return to the top level PHCA help page

 Posted by at 10:25 pm

Leave a Reply