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:
coppro
2007-02-02 04:23:35 +00:00
parent ed5ac758f9
commit 3c4790cac9
16 changed files with 105 additions and 103 deletions
+6 -6
View File
@@ -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);
}
}
+3 -3
View File
@@ -161,12 +161,12 @@ void BarGraph::draw(RotatedDC& dc, int current) const {
}
// How many labels and lines to draw?
dc.SetFont(*wxNORMAL_FONT);
UInt label_step = max(1.0, dc.GetCharHeight() / step_height);
UInt label_step = UInt(max(1.0, dc.GetCharHeight() / step_height));
// Draw backlines (horizontal) and value labels
dc.SetPen(lerp(bg, fg, 0.5));
for (UInt i = 0 ; i <= axis.max ; ++i) {
if (i % label_step == 0) {
int y = rect.bottom() - i * step_height;
int y = int(rect.bottom() - i * step_height);
dc.DrawLine(RealPoint(rect.left() - 2, y), RealPoint(rect.right(), y));
// draw label, aligned middle right
String label; label << i;
@@ -202,7 +202,7 @@ int BarGraph::findItem(const RealPoint& pos, const RealRect& rect1) const {
double width_space = rect.width / count; // including spacing
double space = width_space / 5;
// Find column in which this point could be located
int col = (pos.x - rect.x) / width_space;
int col = int((pos.x - rect.x) / width_space);
double in_col = (pos.x - rect.x) - col * width_space;
if (in_col < space / 2 || // left
in_col > width_space - space / 2 || // right
+1 -1
View File
@@ -29,7 +29,7 @@ void PackageList::drawItem(DC& dc, int x, int y, size_t item, bool selected) {
int w, h;
// draw image
if (d.image.Ok()) {
dc.DrawBitmap(d.image, x + align_delta_x(ALIGN_CENTER, item_size.width, d.image.GetWidth()), y + 3);
dc.DrawBitmap(d.image, x + int(align_delta_x(ALIGN_CENTER, item_size.width, d.image.GetWidth())), y + 3);
}
// draw short name
dc.SetFont(wxFont(12,wxSWISS,wxNORMAL,wxBOLD,false,_("Arial")));