Moved resources to better filenames;

Updated HoverButton, now an actual custom control, added focused and down states;
Added Help->Website

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@196 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-02-06 21:48:49 +00:00
parent c6cefaec27
commit 504269e903
36 changed files with 203 additions and 88 deletions
+13 -2
View File
@@ -31,23 +31,34 @@ class AboutWindow : public wxDialog {
// ----------------------------------------------------------------------------- : Button with image and hover effect
// A button that changes images on mouseenter/leave
class HoverButton : public wxBitmapButton {
class HoverButton : public wxControl {
public:
HoverButton(Window* parent, int id, const String& name);
private:
DECLARE_EVENT_TABLE();
Bitmap normal, hover; /// Bitmaps for the states of the button
Bitmap bg_normal, bg_hover, bg_focus, bg_down; /// Bitmaps for the states of the button
bool hover, focus, mouse_down, key_down;
void onMouseEnter(wxMouseEvent&);
void onMouseLeave(wxMouseEvent&);
void onFocus (wxFocusEvent& ev);
void onKillFocus (wxFocusEvent& ev);
void onPaint (wxPaintEvent&);
void onLeftUp (wxMouseEvent&);
void onLeftDown (wxMouseEvent&);
void onKeyDown (wxKeyEvent&);
void onKeyUp (wxKeyEvent&);
virtual wxSize DoGetBestSize() const;
const Bitmap* last_drawn;
const Bitmap* toDraw() const;
void refreshIfNeeded();
protected:
virtual void draw(DC& dc);
int drawDelta() const;
};