Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Menu Structure
Started by chandler767 Jan 29 2012 03:11 AM

- - - - -
36 replies to this topic
[TOPIC CONTROLS]
Page 2 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

sharp1959

[GLOBAL: userInfoPane.html]
sharp1959
  • Enthusiast

  • 81 posts
  • Corona SDK

Hello Mila,

Here is a couple of links to help ya...they
should help a lot...

Good tutorial on Director...


A lot of Corona here..
http://learningcorona.com/
Good Luck :)
Larry

uid: 107633 topic_id: 21095 reply_id: 84781


[TOPIC: post.html]
#27

KenRogoway

[GLOBAL: userInfoPane.html]
KenRogoway
  • Contributor

  • 272 posts
  • Corona SDK

@mila,

No problem. I enjoy helping other people. Just want to make sure that you are also trying to learn the API.

Glad to see Larry posted the links for Director.

In the past month or so there has been a switch from Director to Storyboards. I have stayed with Director for most of my samples because a lot of people have been using that for a long time.

All of my new apps use Storyboards. It's the API that will be supported by Ansca moving forward so that is the main reason why I've switched.

Ken
uid: 16734 topic_id: 21095 reply_id: 84785


[TOPIC: post.html]
#28

se460

[GLOBAL: userInfoPane.html]
se460
  • Contributor

  • 104 posts
  • Corona SDK

Hi Ken, I have one last question, is it possible to reset the levels, with some code in any way? :)

Thank you very much in advance
uid: 122802 topic_id: 21095 reply_id: 84801


[TOPIC: post.html]
#29

KenRogoway

[GLOBAL: userInfoPane.html]
KenRogoway
  • Contributor

  • 272 posts
  • Corona SDK

@se460,

Reset them? Meaning what? Reset the completed flags and locked flags?

Something simple like this should work:

-- Reset our completed and unlocked flags
function resetLevels()
    for i=1,MAX_LEVELS do
        gWS.bLevelComplete[i] = false
        gWS.bLevelLocked[i] = true
    end
    -- Unlock the first level
    gWS.bLevelLocked[1] = false
end


You can download the complete Example here which now includes the resetLevels() function:

www.homebrewsoftware.com/Download/CoronaSDK/HomebrewLevelSelect_v1_12.zip
uid: 16734 topic_id: 21095 reply_id: 84812


[TOPIC: post.html]
#30

se460

[GLOBAL: userInfoPane.html]
se460
  • Contributor

  • 104 posts
  • Corona SDK

Hi Ken, I am sorry to bother you again. With reset I mean, when you reload the Simulator or Phone the completed levels is reset, all the levels is locked except level 1. :) The code and example you posted above is certainly right, but the code dosen't seem to work (for me) :)

Thank you in advance and thank you very much for your help, I really appreciate it!
uid: 122802 topic_id: 21095 reply_id: 84938


[TOPIC: post.html]
#31

KenRogoway

[GLOBAL: userInfoPane.html]
KenRogoway
  • Contributor

  • 272 posts
  • Corona SDK

@se460,

I have no idea why you would want to do that, but if that is the case you can just remove the calls to saveSettings() and loadSettings().
uid: 16734 topic_id: 21095 reply_id: 84940


[TOPIC: post.html]
#32

se460

[GLOBAL: userInfoPane.html]
se460
  • Contributor

  • 104 posts
  • Corona SDK

@KenRogoway

Thank you very very much, for your help and kindness. The reason for this (reseting the levels) is I want the users (of my game) to have the ability to reset the levels if they want to :)
uid: 122802 topic_id: 21095 reply_id: 84968


[TOPIC: post.html]
#33

KenRogoway

[GLOBAL: userInfoPane.html]
KenRogoway
  • Contributor

  • 272 posts
  • Corona SDK

@se460,

That's what I thought. If that is what you want to do then leave in the loadSettings() and saveSettings() calls.

Then on the button action to "reset" you just call resetLevels().

Typically this would be in your Options screen. You'd have a button to let them reset the data. Hook the button press to the resetLevels() call.
uid: 16734 topic_id: 21095 reply_id: 84971


[TOPIC: post.html]
#34

@RSCdev

[GLOBAL: userInfoPane.html]
@RSCdev
  • Corona Geek

  • 1,489 posts
  • Corona SDK

--Out of Scope--
--Deleted--

uid: 89165 topic_id: 21095 reply_id: 84690


[TOPIC: post.html]
#35

mila.habaer

[GLOBAL: userInfoPane.html]
mila.habaer
  • Enthusiast

  • 84 posts
  • Corona SDK

KenRogoway ,

Do you have the level selection sample code implemented with storyboard and willing to share?

I can change the code from Direct class to Storyboard, but it may bring in errors, like memory leak etc.

Thanks

Mila
uid: 83418 topic_id: 21095 reply_id: 85293


[TOPIC: post.html]
#36

diginutscorp

[GLOBAL: userInfoPane.html]
diginutscorp
  • Enthusiast

  • 56 posts
  • Guests

ken, first thanks for making this avaliable. can you implement level one and two

using level1.lua and level2.lua file so that we can pick it from there. I have been trying to us this menu on my game with no luck

thanks
uid: 40990 topic_id: 21095 reply_id: 88743


[TOPIC: post.html]
#37

KenRogoway

[GLOBAL: userInfoPane.html]
KenRogoway
  • Contributor

  • 272 posts
  • Corona SDK

@diginutscorp,

Do you want an example using Director or Storyboards?

To change the example code just edit cLevelSelect.lua and change this:

director:changeScene( "cSceneGame", "crossFade" )


to this:

director:changeScene( "level"..gWS.nLevel, "crossFade" )


Ken
uid: 16734 topic_id: 21095 reply_id: 88751



[topic_controls]
Page 2 of 2 1 2
 
[/topic_controls]