void emMinesFileModel::InvertMark(int x, int y, int z, bool saveFile)
{
	int f;

	f=GetField(x,y,z);
	if ((f&4)==0) SetMark(x,y,z,saveFile);
	else RemoveMark(x,y,z,saveFile);
}
Beispiel #2
0
void cMenuFileBrowserBase::ClearAllFileMarks(bool onlyXinePlayable)
{
    for (int i = 0; i < Count(); i++)
    {
        cMenuBrowserItem *item = GetItem(i);
        if(item->IsFile() && IsMarked(item) &&
	(!onlyXinePlayable || static_cast<cMenuFileItem *>(item)->IsXinePlayable()))
        {
            RemoveMark(item, false);
        }
    }
    Display();
}
Beispiel #3
0
void cMenuFileBrowserBase::ClearMarks(bool next)
{
    while(!markedEntries_.empty())
    {
        cMenuBrowserItem *item = GetItem(*markedEntries_.begin());
        /* TB: after renaming the item has changed and is NULL */
        if(item)
        {
            SetCurrent(Get(GetItemPos(*markedEntries_.begin())));
            RemoveMark(item, next);
        }
	else
	    break;
    }
    markedEntries_.clear();
}
Beispiel #4
0
void cMenuFileBrowserBase::MarkUnmarkCurrentItem()
{
    cMenuBrowserItem *item = GetCurrentItem();
    if (item && (item->IsFile() || item->IsDir()))
    {
        if(!IsMarked(GetCurrentItem()))
        {
            //select line
            MarkItem(GetCurrentItem());
        }
        else
        {
            //deselect line
            RemoveMark(GetCurrentItem());
        }
        Display();
     }
}