2016-03-27 11:49:47 +02:00
|
|
|
/*
|
|
|
|
===========================================================================
|
2023-12-29 14:25:35 +01:00
|
|
|
Copyright (C) 2023 the OpenMoHAA team
|
2016-03-27 11:49:47 +02:00
|
|
|
|
|
|
|
This file is part of OpenMoHAA source code.
|
|
|
|
|
|
|
|
OpenMoHAA source code is free software; you can redistribute it
|
|
|
|
and/or modify it under the terms of the GNU General Public License as
|
|
|
|
published by the Free Software Foundation; either version 2 of the License,
|
|
|
|
or (at your option) any later version.
|
|
|
|
|
|
|
|
OpenMoHAA source code is distributed in the hope that it will be
|
|
|
|
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with OpenMoHAA source code; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
===========================================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "cl_ui.h"
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
class FilePickerItem : public UIListCtrlItem
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
str strings[3];
|
|
|
|
|
|
|
|
public:
|
|
|
|
int getListItemValue(int which) const override;
|
|
|
|
griditemtype_t getListItemType(int which) const override;
|
|
|
|
str getListItemString(int which) const override;
|
|
|
|
void DrawListItem(int iColumn, const UIRect2D& drawRect, bool bSelected, UIFont *pFont) override;
|
|
|
|
qboolean IsHeaderEntry() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
CLASS_DECLARATION(USignal, FilePickerClass, NULL) {
|
|
|
|
{&EV_UIListBase_ItemSelected, &FilePickerClass::FileSelected },
|
|
|
|
{&EV_UIListBase_ItemDoubleClicked, &FilePickerClass::FileChosen },
|
|
|
|
{&W_Deactivated, &FilePickerClass::OnDeactivated},
|
|
|
|
{NULL, NULL }
|
2016-03-27 11:49:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
FilePickerClass::FilePickerClass()
|
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
FilePickerClass::~FilePickerClass()
|
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
|
|
|
}
|
|
|
|
|
|
|
|
void FilePickerClass::Setup(const char *root_directory, const char *current_directory, const char *ext)
|
|
|
|
{
|
|
|
|
// FIXME: stub
|
|
|
|
}
|
|
|
|
|
|
|
|
void FilePickerClass::Initialize(const char *root_directory, const char *current_directory, const char *ext)
|
|
|
|
{
|
|
|
|
// FIXME: stub
|
|
|
|
}
|
|
|
|
|
|
|
|
void FilePickerClass::GotoParentDirectory(void)
|
|
|
|
{
|
|
|
|
// FIXME: stub
|
|
|
|
}
|
|
|
|
|
|
|
|
void FilePickerClass::GotoSubDirectory(str subdir)
|
|
|
|
{
|
|
|
|
// FIXME: stub
|
|
|
|
}
|
|
|
|
|
|
|
|
void FilePickerClass::SetupFiles(void)
|
|
|
|
{
|
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
void FilePickerClass::FileSelected(str& currentDirectory, str& partialName, str& fullname)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
void FilePickerClass::FileChosen(str& currentDirectory, str& partialName, str& fullname)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
void FilePickerClass::FileSelected(Event *ev)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
void FilePickerClass::FileChosen(Event *ev)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
void FilePickerClass::CloseWindow(void)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
void FilePickerClass::OnDeactivated(Event *ev)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
int FilePickerItem::getListItemValue(int which) const
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
|
|
|
return 0;
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
griditemtype_t FilePickerItem::getListItemType(int which) const
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
|
|
|
return griditemtype_t::TYPE_STRING;
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
str FilePickerItem::getListItemString(int which) const
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
|
|
|
return str();
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
void FilePickerItem::DrawListItem(int iColumn, const UIRect2D& drawRect, bool bSelected, UIFont *pFont)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-12-29 14:25:35 +01:00
|
|
|
qboolean FilePickerItem::IsHeaderEntry() const
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2023-12-29 14:25:35 +01:00
|
|
|
// FIXME: stub
|
|
|
|
return qfalse;
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|