0

当我点击屏幕 1 中的蓝色收藏夹按钮时,我想调出收藏夹列表(屏幕 2),然后点击绿色收藏夹按钮进入屏幕 3。但是,当我点击屏幕中的收藏夹按钮时1,我立即进入屏幕 3. 我该如何解决这个问题?

||------------屏幕 1 ------------||------------ 屏幕 2 --------- ||-----------画面3------------||

在此处输入图像描述 在此处输入图像描述 在此处输入图像描述

代码

#Show favorites page (Click blue favorites button)
$.favoritesButton.on Events.Click, ->
    #Show list of names
    $.otherCellsClickFavPage.states.switch("on")
    $.nameClickFavPage.states.switch("on")
    $.checkClickFavPage.states.switch("on")

    #Hide blue favorites button & show green favorites button 2
    $.favoritesButton.states.switchInstant("default")
    $.favoritesButton2.states.switch("on")

#Send to all favorites (Click on the green favorites button 2)
$.favoritesButton2.on Events.Click, ->
    #Show Send to All Favorites Page
    $.favoritesButtonSentToAllFav.states.switch("on")
    $.sentMessageSentToAllFav.states.switch("on")
    $.cellsSentToAllFav.states.switch("on")

    #Hide green favorites button 2 & blue favorites button, so can show pink + white favorites button
    $.favoritesButton2.states.switch("default")
    $.favoritesButton.states.switch("default")

状态“on”表示将不透明度设置为 1,状态“default”表示将不透明度设置为 0。绿色的收藏夹按钮 2 位于蓝色收藏夹按钮的顶部。

4

1 回答 1

0

解决了!我意识到我只需要将蓝色收藏夹按钮移到绿色收藏夹按钮的顶部。

#Place Favorites button on top of favorites button 2
$.favoritesButton.placeBefore($.favoritesButton2)

#Show favorites page (Click favorites button)
$.favoritesButton.on Events.Click, ->
    #Show list of names
    $.otherCellsClickFavPage.states.switch("on")
    $.nameClickFavPage.states.switch("on")
    $.checkClickFavPage.states.switch("on")

    #Hide blue favorites button & show green favorites button 2
    $.favoritesButton.states.switchInstant("default")
    $.favoritesButton2.states.switch("on")

    #Place Favorites button 2 on top of favorites button
    $.favoritesButton2.placeBefore($.favoritesButton)

#Send to ALL favorites (Click on the green favorites button 2)
$.favoritesButton2.on Events.Click, ->
    #Show Send to All Favorites Page
    $.favoritesButtonSentToAllFav.states.switch("on")
    $.sentMessageSentToAllFav.states.switch("on")
    $.cellsSentToAllFav.states.switch("on")

    #Hide green favorites button 2 & blue favorites button, so can show     pink + white favorites button
    $.favoritesButton2.states.switch("off")
    $.favoritesButton.states.switch("off")

状态“关闭”意味着将不透明度设置为 0。

于 2017-05-15T05:46:32.310 回答