mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Fixed many resource file names, removed raw-char matches input-char requirement for Linux operation.
WARNING: This version is unstable. High possibility of encountering a complete processor lockup (likely an infinite loop). Known bugs on Linux: Some fields are being drawn off-target (such as text) and they need to be fixed in order to allow compatibility. Different style files on different platforms would not be a good idea. The combined-editors are not working. When a text-replacement is made via "~", the cursor is placed before it and attempting to remove or select it causes a lockup. Symbol editor seems to be working fine. The symbol selection dialog causes a crash when used. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@194 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -117,8 +117,8 @@ void GalleryList::onChar(wxKeyEvent& ev) {
|
||||
|
||||
wxSize GalleryList::DoGetBestSize() const {
|
||||
wxSize ws = GetSize(), cs = GetClientSize();
|
||||
const int w = item_size.width + 2*MARGIN + 2*BORDER;
|
||||
const int h = item_size.height + 2*MARGIN + 2*BORDER;
|
||||
const int w = int(item_size.width) + 2*MARGIN + 2*BORDER;
|
||||
const int h = int(item_size.height) + 2*MARGIN + 2*BORDER;
|
||||
return wxSize(w, h) + ws - cs;
|
||||
}
|
||||
|
||||
@@ -136,13 +136,13 @@ void GalleryList::OnDraw(DC& dc) {
|
||||
GetViewStart(&x, &y);
|
||||
GetClientSize(&cw, &ch);
|
||||
if (direction == wxHORIZONTAL) {
|
||||
dx = item_size.width + MARGIN + 2*BORDER;
|
||||
dx = int(item_size.width) + MARGIN + 2*BORDER;
|
||||
dy = 0;
|
||||
start = (size_t) x;
|
||||
end = (size_t) (start + cw / dx + 1);
|
||||
} else {
|
||||
dx = 0;
|
||||
dy = item_size.height + MARGIN + 2*BORDER;
|
||||
dy = int(item_size.height) + MARGIN + 2*BORDER;
|
||||
start = (size_t) y;
|
||||
end = (size_t) (start + ch / dy + 1);
|
||||
}
|
||||
@@ -162,9 +162,9 @@ void GalleryList::OnDraw(DC& dc) {
|
||||
dc.SetPen(c);
|
||||
dc.SetBrush(saturate(lerp(background, c, 0.3), selected ? 0.5 : 0));
|
||||
RealPoint pos = itemPos(i);
|
||||
dc.DrawRectangle(pos.x - BORDER, pos.y - BORDER, item_size.width + 2*BORDER, item_size.height + 2*BORDER);
|
||||
dc.DrawRectangle(int(pos.x) - BORDER, int(pos.y) - BORDER, int(item_size.width) + 2*BORDER, int(item_size.height) + 2*BORDER);
|
||||
// draw item
|
||||
drawItem(dc, pos.x, pos.y, i, selected);
|
||||
drawItem(dc, int(pos.x), int(pos.y), i, selected);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user