Search found 102 matches

by forrestcupp
Thu Jul 23, 2009 2:12 pm
Forum: General Development
Topic: wxWidgets vs SDL help
Replies: 6
Views: 1910

wxWidgets vs SDL help

First off, let me say that I know wxWidgets isn't made for game creation. But I've created a flash card game using only wxWidgets. It's a full screen game with a background image, animations, and lots of sound effects and music. Basically, in each level when you get an answer right, a frog jumps one...
by forrestcupp
Thu Jul 23, 2009 1:58 pm
Forum: C++ Development
Topic: bitmap animation how to ?
Replies: 9
Views: 695

To get rid of flickering, if you're animating on a panel, do this in your constructor after creating the panel:

Code: Select all

panel->SetDoubleBuffered(true);
If you're not using a panel, do this:

Code: Select all

this->SetDoubleBuffered(true);
That's how you get rid of the flickering.
by forrestcupp
Wed Jul 22, 2009 1:50 pm
Forum: C++ Development
Topic: Embed Game Window?
Replies: 4
Views: 526

If you're just wanting to find a way to force a full screen game to be windowed, take a look at these programs: http://www.tommti-systems.de/go.html?http://www.tommti-systems.com/main-Dateien/files.html http://www.agerage.net/forums/general-coding-forum/2629-release-dx-windowed-mode-non-windowable-g...
by forrestcupp
Tue Jul 21, 2009 3:09 pm
Forum: C++ Development
Topic: Icons on Buttons !
Replies: 3
Views: 544

If you have a pointer to a wxBitmapButton called 'button', you just create your wxBitmap (maybe named 'picture') from your image and assign it to button. You can either assign the bitmap to it when you initialize it, like this: button = new wxBitmapButton(parent, ID, picture, wxDefaultPosition, wxDe...
by forrestcupp
Sat Jul 18, 2009 1:43 pm
Forum: C++ Development
Topic: wxRichTextCtrl only loads txt files
Replies: 13
Views: 1837

Wow! That worked. Thank you.
by forrestcupp
Fri Jul 17, 2009 1:24 pm
Forum: C++ Development
Topic: Get access to frame functions from within another class
Replies: 18
Views: 1231

I guess I init it nowhere %) I didn't now I had to init it and don't know (yet) how. Tried several things, but the info I read tries to create a new instance of the class. How do you point to an already existing frame? I will read about pointers in more detail, of course. In case you got time, can ...
by forrestcupp
Tue Jul 14, 2009 8:36 pm
Forum: C++ Development
Topic: wxRichTextCtrl only loads txt files
Replies: 13
Views: 1837

Thanks for the code, but it didn't work for me either. Here's my code, which is mostly copy/paste of your code with the necessary changes: panel = new wxPanel(this); rt = new wxRichTextCtrl(panel, -1, wxEmptyString, wxPoint(20,20), wxSize(200,200), wxRE_MULTILINE | wxWANTS_CHARS); wxFileInputStream ...
by forrestcupp
Tue Jul 14, 2009 6:24 pm
Forum: C++ Development
Topic: wxRichTextCtrl only loads txt files
Replies: 13
Views: 1837

The buffer thing was a good idea, but it didn't work either. It didn't give me an error, but it also didn't load any text into the rich text control.

Can you give me a small code example of how you save and load files from a rich text control using string output streams?
by forrestcupp
Sun Jul 12, 2009 4:56 pm
Forum: C++ Development
Topic: Trouble with panels that overlap
Replies: 11
Views: 1014

Is this meant to be a card game, like solitaire? In this case I would very strongly recommend drawing, it will be easier for you in the end this way. If not, then I didn't get it, sorry :lol: Well, it didn't really solve my problem, but it's what I ended up having to do. I wanted to quickly throw t...
by forrestcupp
Sun Jul 12, 2009 4:47 pm
Forum: C++ Development
Topic: wxRichTextCtrl only loads txt files
Replies: 13
Views: 1837

Are you sure you're passing the correct file name and path when trying to load the file in your program? Is the location where the file is saved accessible from the location where your executable is? Yes. Normally, my programs will just load files that are in the current working directory without i...
by forrestcupp
Fri Jul 10, 2009 4:36 pm
Forum: C++ Development
Topic: Convert a MouseClick event to a CommandEvent
Replies: 3
Views: 470

Yeah. I know I'm probably abnormal, but I don't even use event tables at all. I only use connect. I just got used to it that way from GTK+ and it works well for me.
by forrestcupp
Fri Jul 10, 2009 1:26 pm
Forum: C++ Development
Topic: Disabled wxButton still catches clicks and saves them
Replies: 9
Views: 991

Hey, I figured out the solution! If you'll notice my code in my original post, you'll see the BeginPlay function called. This function plays another sound in sync mode, then finally enables my buttons. It looked like this: void LetterGameFrame::BeginPlay() { EnableButtons(false); sndThe[shMode]->Pla...
by forrestcupp
Fri Jul 10, 2009 2:17 am
Forum: C++ Development
Topic: Disabled wxButton still catches clicks and saves them
Replies: 9
Views: 991

Man! I thought that was going to do it for me. I changed it to wxEVT_COMMAND_BUTTON_CLICKED, but I'm still having the same problem.

It still catches clicks when it's disabled.

Thanks for the advice, everyone. There's got to be a way around this.
by forrestcupp
Fri Jul 10, 2009 2:07 am
Forum: C++ Development
Topic: wxAnimationCtrl and wxMouseEvent
Replies: 6
Views: 625

Maybe you need to use a Command Event instead of a Mouse Event. This works for me. In my declaration of my main wxFrame, I put this: void OnClick(wxCommandEvent& event); wxAnimationCtrl* anim; wxPanel* panel; Then in my wxFrame's constructor, I added this: CreateStatusBar(); SetStatusText(wxT("Welco...
by forrestcupp
Fri Jul 10, 2009 1:30 am
Forum: C++ Development
Topic: Disabled wxButton still catches clicks and saves them
Replies: 9
Views: 991

Do you mean wxButton events or mouse button events?

I connected this handler to the applicable wxButtons catching the wxEVT_LEFT_UP event, like this:

Code: Select all

btnChoice[t]->Connect(-1, wxEVT_LEFT_UP,
      (wxObjectEventFunction)&LetterGameFrame::OnChoice, NULL, this);