Home / Topic / [NOT A BUG] Missing button

[NOT A BUG] Missing button

Home Kwiksher Forums Kwik 2 Bugs [NOT A BUG] Missing button

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous

    I have two buttons on my first page but when I publish only one shows up. They both show up in the resources of the project and are both part of the psd file but upon further looking that the lua code the second button is not being added. Is there something I am missing or maybe a setting that is on that is causing this?


    Do you have a group that could hide the second button? Or do your layer in photoshop start with a – ?That is very strange...I dont think it is a bug from kwik cause button are a very common feature and I never heard this kind of issue before.


    None of the layers start with – or are grouped to block the other. In Photoshop there are two buttons and each has their own layer and Kwik is showing two buttons under page 1 but when I publish they are gone. Here's the code from the main.lua to show that the three layers are separate but for some reason it doesn't create code for the second button position.module(..., package.seeall) local widget = require("widget") function new()     local numPages = 2     local menuGroup = display.newGroup()     local dispose     local _W = display.contentWidth;     local _H = display.contentHeight;     local drawScreen = function()       local curPage = 1       if (tonumber(kBookmark) == 1) then           local path = system.pathForFile( "book.txt", system.DocumentsDirectory )           local file = io.open( path, "w+" )           file:write ( curPage.."n1" )           io.close( file )       end       math.randomseed(os.time())       if (tonumber(_G.kAutoPlay) > 0) then           local function act_autoPlay(event)             if(curPage < numPages) then                 if(kBidi == false) then                    dispose(); director:changeScene( "page_"..curPage+1, "moveFromRight" )                 else                    dispose(); director:changeScene( "page_"..curPage-1, "moveFromLeft" )                 end              end           end           timerStash.timer_AP = timer.performWithDelay( _G.kAutoPlay*1000, act_autoPlay, 1 )       end       -- Button names       local rtm      local nortm      -- Layer names       local bg        local rmbtn        local rtmbtn        -- (TOP) External code will render here       -- bg positioning       bg = display.newImageRect( imgDir.. "p1_bg.png", 2048, 1536 );       bg.x = 1024; bg.y = 768; bg.alpha = 1; bg.oldAlpha = 1       bg.oriX = bg.x; bg.oriY = bg.y       bg.name = "bg"       menuGroup:insert(1,bg); menuGroup.bg = bg       -- rmbtn positioning       local function onrmbtnEvent()           rtm()       end       rmbtn = widget.newButton {           id = "rmbtn",           defaultFile = imgDir.."p1_rmbtn.png",           overFile = imgDir.."p1_rtmbtn.png",           width = 500, height = 200,           onRelease = onrmbtnEvent       }       rmbtn.x = 1765; rmbtn.y = 1146       rmbtn.oriX = 1765; rmbtn.oriY = 1146       rmbtn.alpha = 0.81960784313725; rmbtn.oldAlpha = 0.81960784313725       rmbtn.name = "rmbtn"       menuGroup:insert(rmbtn); menuGroup.rmbtn = rmbtn       -- Group(s) creation       -- (MIDDLE) External code will render here       -- Button event listeners       local function onrmbtnEvent(event)           nortm(rmbtn)           return true       end       rmbtn:addEventListener("tap", onrmbtnEvent )       -- Button functions       function rtm(self)             _G.kwk_readMe = 1             dispose(); director:changeScene( "page_"..curPage+1 )       end       function nortm(self)             _G.kwk_readMe = 0             dispose(); director:changeScene( "page_"..curPage+1 )       end       -- swipe this page with spacer of 120 in normal direction       Gesture.activate( bg, {swipeLength=120} )       local function pageSwap(event )         if event.phase == "ended" and event.direction ~= nil then              local wPage = curPage              local direction              if event.direction == "left" and kBidi == false then                wPage = curPage + 1                if wPage > numPages then wPage = curPage end                direction = "moveFromRight"              elseif event.direction == "left" and kBidi == true then                wPage = curPage - 1                if wPage < tonumber(initPage) then wPage = initPage end                direction = "moveFromLeft"              elseif event.direction == "right" and kBidi == true then                wPage = curPage + 1                if wPage > numPages then wPage = curPage end                direction = "moveFromRight"              elseif event.direction == "right" and kBidi == false then                wPage = curPage - 1                if wPage < tonumber(initPage) then wPage = initPage end                direction = "moveFromLeft"              end              if tonumber(wPage) ~= tonumber(curPage) then dispose();               dispose(); director:changeScene("page_"..wPage, direction)             end         end        end       bg:addEventListener( Gesture.SWIPE_EVENT, pageSwap )       dispose = function(event)           cancelAllTimers(); cancelAllTransitions()           bg:removeEventListener( Gesture.SWIPE_EVENT, pageSwap ); Gesture.deactivate(bg)       end       -- (BOTTOM) External code will render here     end     drawScreen()     return menuGroup end


    You are using a layer (rtmbtn ) as a rollover and as a button. The User Guide is clear that layers used as Rollover cannot be used any place else as they DO NOT render outside the button they are set as rollover.


    Okay thanks I fixed it.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Privacy Preference Center

Strictly Necessary

these coolies are for WP-SpamShield, gdpr-wp, woocommerce, paypal

PHPSESSID, SJECT16, JCS_INENREF, JCS_INENTIM, gdpr, woocommerce_cart_hash, woocommerce_items_in_cart, woocommerce_recently_viewed, wordpress_, wordpress_logged_in_, wordpress_sec_, wordpress_test_cookie, wp_woocommerce_session_, AKDC, akavpau_ppsd


WordPress cookie created when auto-saving a post in the editor.

wp-saving-post, wp-settings-, wp-settings-time-


google analytic