mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-19 04:09:41 +00:00
Integrate CMI
This commit is contained in:
parent
aa6ec0ea60
commit
a1289dec3d
13 changed files with 118 additions and 278 deletions
|
@ -115,52 +115,7 @@ void EditorCanvas::DrawElement(const cgeditor::Element &e) {
|
|||
dc->DrawRectangle(recToDraw);
|
||||
}
|
||||
if(e.prop & cgeditor::Property::Nag){
|
||||
if(text=="$0")
|
||||
text="";
|
||||
else if(text=="$1")
|
||||
text="!";
|
||||
else if(text=="$2")
|
||||
text="?";
|
||||
else if(text=="$3")
|
||||
text="!!";
|
||||
else if(text=="$4")
|
||||
text="??";
|
||||
else if(text=="$5")
|
||||
text="!?";
|
||||
else if(text=="$6")
|
||||
text="?!";
|
||||
else if(text=="$10")
|
||||
text="=";
|
||||
else if(text=="$13")
|
||||
text="∞";
|
||||
else if(text=="$14")
|
||||
text="⩲";
|
||||
else if(text=="$15")
|
||||
text="⩱";
|
||||
else if(text=="$16")
|
||||
text="±";
|
||||
else if(text=="$17")
|
||||
text="∓";
|
||||
else if(text=="$18")
|
||||
text="+-";
|
||||
else if(text=="$19")
|
||||
text="-+";
|
||||
else if(text=="$22"||text=="$23")
|
||||
text="⨀";
|
||||
else if(text=="$26"||text=="$27")
|
||||
text="○";
|
||||
else if(text=="$32"||text=="$33")
|
||||
text="⟳";
|
||||
else if(text=="$36"||text=="$37")
|
||||
text="↑";
|
||||
else if(text=="$40"||text=="$41")
|
||||
text="→";
|
||||
else if(text=="$44" || text=="$45")
|
||||
text="⯹";
|
||||
else if(text=="$138" || text=="$139")
|
||||
text="⨁";
|
||||
else
|
||||
text="NA";
|
||||
text=e.text;
|
||||
}
|
||||
// Draw move text
|
||||
if (CGEditor::status.UseMoveIcons) {
|
||||
|
@ -177,12 +132,16 @@ void EditorCanvas::DrawElement(const cgeditor::Element &e) {
|
|||
void EditorCanvas::HandleEvent(const cgeditor::Event &e) {
|
||||
if (e.type == cgeditor::Event::Goto) {
|
||||
game->SetCurrent((HalfMove *)e.move);
|
||||
SyncCache();
|
||||
} else if (e.type == cgeditor::Event::Delete) {
|
||||
game->DeleteMove((HalfMove *)e.move);
|
||||
game->DeleteMove((HalfMove *)e.move);
|
||||
SyncCache();
|
||||
} else if (e.type == cgeditor::Event::Promote) {
|
||||
game->PromoteMove((HalfMove *)e.move);
|
||||
SyncCache();
|
||||
} else if (e.type == cgeditor::Event::SetAsMainline) {
|
||||
game->SetMoveAsMainline((HalfMove *)e.move);
|
||||
game->SetMoveAsMainline((HalfMove *)e.move);
|
||||
SyncCache();
|
||||
}
|
||||
wxCommandEvent event(GAME_CHANGE, GetId());
|
||||
event.SetEventObject(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue