[pyddr-discuss] Query setup
Frank Foeth
foeth01 at orange.nl
Fri Mar 2 05:32:37 EST 2007
On Sun, 2007-02-18 at 14:51 -0800, Pavel N. Krivitsky wrote:
> Hi, Frank,
For now I'm going to concentrate on the one player case. My preferred
two player case would mean changing SongDisplayItem and
DanceDisplayItem, and its too early for that.
> > To abreviate your menu idea's:
> > First menu: Show + song parameters,
> > 2nd: math functions for chosen song parameter
> > 3rd: function parameters to go with 2nd
> > 4th: loop to 1, but delete configured song parameter.
> > Show starts the current song select screen.
> > There should also be some way to save a query.
song_parameters = [SHOW,BPM,ARTIST,MIX,TITLE,LEVEL,DIFFICULTY]
> Saving a query should probably be done through a menu.
> > Apart from deleting the configured parameters (people make mistakes and
> > there is no way to undo them) I understand.
>
> Just as you hit CANCEL to back out of a folder, you hit CANCEL to undo a
> choice.
See later remarks.
...
> Good points. First of all, let's replace "GREATER THAN" with "AT LEAST"
> and "LESS THAN" with "AT MOST". Second of all, allow the user to filter
> on the same criterion on several levels. That is, instead of entering
> "LEVEL -> WITHIN 1 OF -> 5", the user could enter "LEVEL -> AT LEAST ->
> 4 -> LEVEL -> AT MOST -> 6".
Why not: main menu(Level) -> At most -> At least -> main menu ?
Also, I'd like a composite for difficulty-level and perhaps for
artist-title. The first would allow beginner-3 through basic-2, but I'm
not sure would be a great help at high levels.
Title is a nasty matter. I'd like a user to be able to forbid songs he
doesn't like or artists he doesn't like. This can be accomplished by
defining a query for say an artist and adding this with NOT to the final
query. Unfortunately, there are too many titles to make this work for
title (for artist it's already a dawnting task). Possibilities: Strike
Title off the list; allow users to choose an artist title combo. Artist
will have to stay on the menu separately though.
> I think we should leave gameselect alone, and just abstract the query
> mechanism and have SongSelect and Endless invoke it. We could probably
> rewrite the current folders backend in terms of queries as well. E.g.
>
> class SongFilter:
> def get_option_list(self):
> ...
> return abstractitemdisplay_list
> def choose_option(self,ind):
> ...
> def unchoose_option(self):
> ...
> def load(self):
> ...
> def save(self,fn):
> ...
> def copy(self):
> ...
> return songfilter
> def get_matching_songs(self):
> ...
> return songitemdisplay_list
> def get_matching_dances(self):
> ...
> return DanceItemDisplay_list
>
> And so on. Then, SongSelect and Endless could each have their own
> interface.
The problem with the above is history. If you want cancel to work the
way you sketched above, we need history data. One way to do this would
be the following set-up
Songfilter: responsibilities: general management like calling ui,
displaying everything on screen except perhaps the menu.
Menu: a tree of classes, so each menutype should handle its own tasks.
Each menu has a parent or None. Only one menu is active in songfilter.
The active menu can change certain data in songfilter, or songfilter can
request the data from the menu (or has access to, or...):
- current song list, current dance list, perhaps query (is troublesome).
Menu can change the current menu (replace itself) in songfilter with
either its parent or the next menu.
Menu types:
Functionally driven: Level gives access to the level menu's
Choose from a set: not necessary if we strike title of the list
Choose many from a set: mix, artist,
Choose range (at most, at least): BPM, Difficulty, Level or Diff-Level
combo
I would prefer all of them to act similarly. The many from set makes
this slightly nasty. One possibility is use left/right to change the
state of the menu item under the cursor. But if left/right is used here,
why not use it in the functional menu's too. If so, why not use CONFIRM
to leave the current menu, accepting the input. As a result SHOW in the
main menu would no longer be necessary. A displayed help text would be
handy though.
I made a first stab at the implementation of the above yesterday. It is
very unfinished, but it might give you some ideas, which is the only
reason I include it. If you don't like what I wrote above don't spend
time on it. Do feel free to reject it anyway.
Yours,
Frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: songfilter.py
Type: text/x-python
Size: 10685 bytes
Desc: not available
URL: <http://icculus.org/pipermail/pyddr-discuss/attachments/20070302/89b02c60/attachment.py>
More information about the pyddr-discuss
mailing list