Hacking iMenu for DSTwo...

dhjohn

Well-Known Member
Member
Joined
Jul 9, 2009
Messages
124
Trophies
0
Age
37
Website
Visit site
XP
90
Country
United States
spinal_cord said:
Terminator02 said:
4. will it be possible to move icons? (like on an iPhone when you hold down on one of them)
I'm not sure how I would implement that in code. Once you do things like that, you need to make backup file lists and start worrying about missing files etc.

If your looking for suggestions, here's mine:
The first time the program is ran, it generates a list of files
The program loads in the icons in the order given by the list file
If it runs across a missing file, it removes the file from the list, and resaves the list.
If an icon is moved, it reorders the list, and saves the new copy.
If the program is started, and a file is found that is not on the list, it adds it to the list (or there could be an add icon option in the menu)

That would be my implementation.
 

spinal_cord

Knows his stuff
OP
Member
Joined
Jul 21, 2007
Messages
3,225
Trophies
1
Age
43
Location
somewhere
Website
spinalcode.co.uk
XP
3,383
Country
dhjohn said:
spinal_cord said:
Terminator02 said:
4. will it be possible to move icons? (like on an iPhone when you hold down on one of them)
I'm not sure how I would implement that in code. Once you do things like that, you need to make backup file lists and start worrying about missing files etc.

If your looking for suggestions, here's mine:
The first time the program is ran, it generates a list of files
The program loads in the icons in the order given by the list file
If it runs across a missing file, it removes the file from the list, and resaves the list.
If an icon is moved, it reorders the list, and saves the new copy.
If the program is started, and a file is found that is not on the list, it adds it to the list (or there could be an add icon option in the menu)

That would be my implementation.

I was thinking something similar, but it would mean cheacking every file against the whole list, which might start to get a bit slow if there are lots of files.
 

CannonFoddr

Regular GBATemp Lurker
Member
Joined
Sep 23, 2006
Messages
4,134
Trophies
1
Age
56
Location
Sitting by computer
Website
www.youtube.com
XP
1,287
Country
how about a combo of the last two suggestions

Have an ini file with an extra 'flag ' called 'changed='

> iMenu runs & check flag.
>> If '0' read/display icons 'as is' in the ini
>> If someone deletes icons/change order then change the flag to '1'.

Next time iMenu runs and checks, it see '1' and so does a scan & updates the ini (a small popup like 'Changes detected - Rescan in progress. Please wait' would'nt go amiss)
You could also add a 'manual update' option that the user can use at the time they do any alterations (another pop-up like 'Must do 'Manual Rescan' after all alterations are done otherwise iMenu will do one on next startup' - this only pops up on only the first alteration done, any further alterations & the message doesn't pop up)

Only thing I can see is if new programs are added. How will iMenu know to scan?
- Unless it's mentioned in a readme that IF new apps are added, you MUST do a manual scan to update the layout

This way iMenu will only 'slow down' reading the ini if changes are made
--------
As for 'reading the ini' - Perhaps you could also have iMenu read only a portion of the ini (yet another option like 'Precache=')
Let it remember what page it was on (another ini option like 'Page=') and only read the ini for the previous 'Precache=' pages,current page & next 'Precache=' pages

User can alter 'Precache=' themselves & see the tradeoff:
  • Either a 'slow' iMenu startup (where it reads the whole ini file), yet fast 'page flipping'
    OR
    Fast start up (where it only 'reads' so many pages) and slow page flipping (where it read the ini each time there's a pageflip)
[Not sure how you would make iMenu ignore reading ini if you precache all pages on loading up though]

Code:
[Options]
Changed=0;Has the list been changed 0=No,1=Yes (Rescan required)
Page=1; Last page veiwed
Precache=1; Read the previous/nest number of 'pages', If '0' then read the whole lot but don't read ini again on 'page flipping'

[Bottom]; these are the 4 icons that always show along the bottom
Shortcut01=DS_game.nds
Shortcut02=NDSGBA.plg
Shortcut03=iReader.plg
Shortcut04=Moonshl2.nds

[Page01]
Icon01=lmp-ng.nds
Icon02=Stillalive.nds
:
Icon08=DSVideo.nds

[Page02]
Icon01=/HBApps/Colors.nds
Icon02=/HBGame/vgh.nds
Icon03=
:
Icon08=
(note: since Page02/Icon03 is empty it is ignored by iMenu, & everything after this is also ignored, since Page02/Icon02 must be the last icon in the list)

If you don't like the [pagexx] sectioned areas you could have just one single list (so above would be Icon01-Icon10; since Icon11 onwards are empty) - the only problem there is that you'll need to read the list in multiples of '8' on each page flip.

Ooopps & while typing this just seen a small problem.....How do you know where the end of the list is so that you can 'precache' the 8 icons BEFORE 'page1', in case you're already on page1 & want to go 'left'
 

Berthenk

Epitome of Awesomeness
Member
Joined
May 16, 2008
Messages
1,308
Trophies
0
Website
Visit site
XP
170
Country
Netherlands
One thing I'm interested in is the source. Will you release it? I just recently started to get into coding (only HTML yet, to become familiar with programming), and I'd love to see it.
 

Demonbart

GBATemp's guitar hero
Member
Joined
Mar 14, 2009
Messages
1,619
Trophies
0
Age
30
Location
Lazytown, yarr
Website
Visit site
XP
271
Country
Netherlands
I don't really have problems with the current DSTWO menu, but I have to agree with the rest: this does at least look better.
I'll prolly compare it with the official firmware when you release this and stick with whatever is more intuitive to me.
But nice work so far
smile.gif
 

CannonFoddr

Regular GBATemp Lurker
Member
Joined
Sep 23, 2006
Messages
4,134
Trophies
1
Age
56
Location
Sitting by computer
Website
www.youtube.com
XP
1,287
Country
riverchen said:
*facedesk* WHY NOT USE THE _DSTWOPLUG FOLDER AND A LINKER?
Come on now.... both Stormwave's 'linker' and this came out virtually a day apart. They had no communication between each other, so never knew who was doing what

This is a DS_game 'replacement', while the Linker is just a work-around for those who'd like to have their Homebrew elsewhere than the '/_dstwoplug/' folder

If Spinal does include the ability to run HB from elsewhere (save the hassle of using the PC program to hack the linker for each program) all fine and dandy. But if not - at least there's something else to use for those who'd want/need it - it's all about choice

Personnally, I couldn't care less - yes it would be nice to have HB in a folder other than the plugin one (I usually have this folder attributes set to 'hidden', just to keep things looking 'neat') but if it doesn't appear in iMenu, I won't complain
 

Kentoss

Well-Known Member
Member
Joined
May 29, 2008
Messages
137
Trophies
0
Age
33
Location
Ontario, Canada
XP
247
Country
Canada
Personally I'd much rather prefer a DSi menu clone, but I definitely like the direction DSTWO homebrew is heading. I just wish the sections of the DSTWO weren't so bloody separated. It's strange to have this menu that leads into another menu type-thing. I'd rather have my DSTWO load, then have my NDS files, GBA files and other Homebrew files displayed right where I can get to them without having to go through menu after menu.

That's just me, though. Personal preferences, heh. I definitely love the work you put into your menus though, I've been following your codes for a while. Great work on this one so far!
 

YayMii

hi
Member
Joined
Jun 24, 2009
Messages
4,916
Trophies
0
Age
28
Location
that place
XP
758
Country
Canada
Just wondering, are you going to implement the icon moving system that the iPod/iPhone/iPad has? I'm talking about when you hold an app for 2-3 seconds, all the icons start shaking (you can change the effect) and you can drag around the icons.
Also, what about custom backgrounds? Are you allowing those too?
 

spinal_cord

Knows his stuff
OP
Member
Joined
Jul 21, 2007
Messages
3,225
Trophies
1
Age
43
Location
somewhere
Website
spinalcode.co.uk
XP
3,383
Country
YayMii said:
Just wondering, are you going to implement the icon moving system that the iPod/iPhone/iPad has? I'm talking about when you hold an app for 2-3 seconds, all the icons start shaking (you can change the effect) and you can drag around the icons.
Also, what about custom backgrounds? Are you allowing those too?

Custom backgrounds - yes 100%
Arranging icons - currently no, potentially yes, depending on how much work is required to keep track of the moved icons when reading the plugins folder.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=8ptLqnNMcQk