Search found 160 matches
- Sat Apr 02, 2011 2:56 pm
- Forum: Programming Discussion
- Topic: C code to strip a file's extension from a filename
- Replies: 13
- Views: 1862
C code to strip a file's extension from a filename
char* stripFileExtension(char* fileNameToStrip) { int sizeOfStrippedFileName = 0; int i; for (i = 0; i <= (int)strlen(fileNameToStrip); i++) { if (fileNameToStrip[i] != '.') { ++sizeOfStrippedFileName; } else { break; } } char* strippedFileName = malloc(sizeOfStrippedFileName * sizeof(char)); strnc...
- Thu Mar 10, 2011 5:48 pm
- Forum: General Gaming
- Topic: Rift gold! lolwut?
- Replies: 7
- Views: 1904
- Tue Mar 01, 2011 10:13 am
- Forum: Programming Discussion
- Topic: RSS type thing?
- Replies: 21
- Views: 2130
Re: RSS type thing?
How about an SQL database that your application can connect to. That way the website can display the data however it wants and the game can display it however it wants.
- Mon Feb 28, 2011 6:16 am
- Forum: Game Development
- Topic: Anybody have experience with Chipmunk Physics?
- Replies: 5
- Views: 1884
Re: Anybody have experience with Chipmunk Physics?
The official docs are here.
- Wed Feb 23, 2011 6:01 pm
- Forum: Programming Discussion
- Topic: [Qt]setWindowTitle() only displaying part of word
- Replies: 23
- Views: 4017
Re: [Qt]setWindowTitle() only displaying part of word
Anybody have any idea what's going on?
- Sun Feb 20, 2011 3:40 pm
- Forum: Programming Discussion
- Topic: [Qt]setWindowTitle() only displaying part of word
- Replies: 23
- Views: 4017
Re: [Qt]setWindowTitle() only displaying part of word
It's Ubuntu 10.10.
- Sat Feb 19, 2011 5:56 pm
- Forum: Programming Discussion
- Topic: [Qt]setWindowTitle() only displaying part of word
- Replies: 23
- Views: 4017
Re: [Qt]setWindowTitle() only displaying part of word
This is when I first start the editor:
And this is after I load the map:
- Sat Feb 19, 2011 1:58 pm
- Forum: Programming Discussion
- Topic: [Qt]setWindowTitle() only displaying part of word
- Replies: 23
- Views: 4017
Re: [Qt]setWindowTitle() only displaying part of word
Well, that's what I thought, but I still have no idea what's going on here...
- Fri Feb 18, 2011 11:50 am
- Forum: Programming Discussion
- Topic: [Qt]setWindowTitle() only displaying part of word
- Replies: 23
- Views: 4017
Re: [Qt]setWindowTitle() only displaying part of word
Go ahead and add this and tell me what it says: qDebug() << QString::fromStdString(levelName); Does it display "He..." or "Hello" to the console? It displays "Hello". Also, is there a particular reason you're using std::String instead of QString? I know this is a prefe...
- Fri Feb 18, 2011 6:09 am
- Forum: Programming Discussion
- Topic: [Qt]setWindowTitle() only displaying part of word
- Replies: 23
- Views: 4017
Re: [Qt]setWindowTitle() only displaying part of word
This is how I change the title the first time: setWindowTitle("Dream Team Editor"); This is how I change the title the second time: fileName = QFileDialog::getOpenFileName(); std::fstream level(fileName.toStdString().c_str()); std::string levelName; std::getline(level, levelName); std::cou...
- Thu Feb 17, 2011 5:56 pm
- Forum: Programming Discussion
- Topic: [Qt]setWindowTitle() only displaying part of word
- Replies: 23
- Views: 4017
Re: [Qt]setWindowTitle() only displaying part of word
I still need help with this.
- Thu Feb 17, 2011 5:15 am
- Forum: General/Off-Topic
- Topic: When did your journey with programming start and why?
- Replies: 38
- Views: 9123
Re: When did your journey with programming start and why?
I used to play a game called Roblox, which is basically a 3d game engine/editor that lets you place blocks in your game and script them with what they call "RobloxLua," which is basically a Lua binding of some of the engine with some of the features of Lua disabled. I got interested in scr...
- Tue Feb 15, 2011 5:37 pm
- Forum: Programming Discussion
- Topic: [Qt]setWindowTitle() only displaying part of word
- Replies: 23
- Views: 4017
Re: [Qt]setWindowTitle() only displaying part of word
After the level has been loaded, or after I set it to "Dream Team Editor"? After the level has been loaded, windowTitle() returns "Hello" and after I set it to "Dream Team Editor" it returns "Dream Team Editor." Edit: Well, this is weird... I call setWindowTit...
- Tue Feb 15, 2011 3:49 pm
- Forum: Programming Discussion
- Topic: [Qt]setWindowTitle() only displaying part of word
- Replies: 23
- Views: 4017
Re: [Qt]setWindowTitle() only displaying part of word
It can't be because it's too long, because I set the window title to "Dream Team Editor" in the constructor of my custom QMainWindow class and the level's name is only "Hello."
- Mon Feb 14, 2011 6:37 pm
- Forum: Programming Discussion
- Topic: [Qt]setWindowTitle() only displaying part of word
- Replies: 23
- Views: 4017
[Qt]setWindowTitle() only displaying part of word
I'm trying to write a level editor in Qt, and have come across a little issue. When I read in my level, the name of it is an std::string. I call setWindowTitle(QString::fromStdString(levelName) and it does set the title, but it only displays part of the level's name followed by ellipsis. For example...