mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
MapRender: First release (FormEditorCommon, FormEditorProperties, Map, MapBG, MapCommon, MapEditor, MapRenderTest.
git-svn-id: svn://ultimatepp.org/upp/trunk@4180 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5531a704ba
commit
9959d8888c
92 changed files with 7485 additions and 0 deletions
27
bazaar/Map/MapViewSearch.cpp
Normal file
27
bazaar/Map/MapViewSearch.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include "MapView.h"
|
||||
|
||||
void MapView::DoSearch(const String& data)
|
||||
{
|
||||
if (GetCurrentLevel())
|
||||
GetCurrentLevel()->PerformStates(PERFORM_SEARCH, data);
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void MapView::OnSearch()
|
||||
{
|
||||
if (GetCurrentLevel())
|
||||
GetCurrentLevel()->StatesOff(STATE_SELECTED);
|
||||
DoSearch((~Search).ToString());
|
||||
}
|
||||
|
||||
void MapView::OnSearchClear()
|
||||
{
|
||||
MapLevel* level = GetCurrentLevel();
|
||||
if (!level) return;
|
||||
|
||||
level->StatesOff(STATE_SELECTED);
|
||||
level->StatesOff(STATE_FOUND);
|
||||
Search.Clear();
|
||||
|
||||
Refresh();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue