Have a sliding tab bar custom control

Here is a control that can make displaying items in a game/app easier, totally configurable and easy to use.

Introducing the Slider Tab control

Righto, I have a quick sliding bar that can have three sliders and each slider can have 6 buttons each. The slider is totally customizable and the events are passed back to your code and there are two types of events that are returned,
1. Tab Change
2. Button Pressed

The tab change also tells you from which tab are you moving to the selected tab.
The button pressed tells you the button number and the tab number on which it was displayed.

This control is available for sale for $15 only, I wanted to mention a small thing here, some developers go, Oh, that's way too expensive for me.

Let's look at this in developer economic terms. Writing the code and then isolating it to be a control and then further improvements take time, let's say on an average about 3 hours, including the time taken for the graphics, etc. If you were to hire a developer, even if they were let's say slightly better than a Jr. developer, you would end up paying about $50/hr. so that is $150 on very low estimates. Now getting some work at 1/10th the price is definitely a deal. Plus let's say you were to attempt creating this yourself, it is not difficult, it is easy, depending on how you attempt it, but because you are starting out, you are unable to code it in 3 hours, you spend hours googling things, asking people on the forums, etc and end up with something similar after 20/25 hours, Let's say we look at a student working at McDonalds, about $8/hour, (BTW, here in QLD the minimum wage is about $13-$15/Hr) that is about $160-$200 and it might still have bugs or issues. So when you look at it in this light, it is definitely a win-win deal. However that is if you really need the control for your app.

Here's how to use it in your app, really simple, CoronaSDK style...

display.setStatusBar(display.HiddenStatusBar)    -- Hide the StatusBar
local slider = require("slider")                 -- add the custom control
local currentTab = 1                             -- set the default tab

local function callback(event)                   -- a handler for the slider
    local name   = event.name                    -- the event name
    local tab    = event.tab                     -- the current tab
    local button = event.button                  -- the button pressed (for event name button)
    local last   = event.lastTab                 -- the lastTab
	if "tab" == name then 		
		print("Tab " .. tab)
		native.showAlert("Pressed", "Changing to Tab " .. tab .. " from " .. last, {"OK"}) 
	elseif "button" == name then
		print("Tab " .. tab, "Button " .. button)
		native.showAlert("Pressed", "Tab " .. tab .. " and Button " .. button, {"OK"})

-- Create three sliders and add 6 buttons in each of the slider
local i
for i=1,3 do
 	local aSlide = slider.createSlider()

slider.setCallback(callback)                      -- set the callback handler 
slider.showTab(currentTab)                        -- show the default tab

Here is a You Tube video for the same.

This is available for $15, which is a steal... so get your control today before they run out. If you wonder how software can run out, well, things happen and software stops being offered. So get it while it lasts.




Popular Posts