damian666 Posted June 11, 2009 Share Posted June 11, 2009 lolol, here we go again >.<Damian666 Link to comment Share on other sites More sharing options...
dao Posted June 11, 2009 Author Share Posted June 11, 2009 yeah i shud lock this xD this questions too confusing for alot of people Link to comment Share on other sites More sharing options...
Devogen Posted June 11, 2009 Share Posted June 11, 2009 No, I know what you want Zultar.Create a new Label on your frmMirage. Call it lblZonethen in ModGameLogic.bas, in Sub GameLoop put this code anywhere:``` frmMirage.lblZone.Caption = Trim(Map(GetPlayerMap(MyIndex)).Name) frmMirage.lblZone.ForeColor = QBColor(BrightRed)``` Link to comment Share on other sites More sharing options...
Robin Posted June 11, 2009 Share Posted June 11, 2009 I don't see why everyone's having such a problem with this. It's common knowledge that the map name is rendered on screen. Moving this to be drawn to a label is simple. Perhaps you should look at your sources before posting.One of the main problems I've found people have with adding this, is that they don't understand the differences between drawing text to a label and rendering it on screen. I've seen a lot of sources which re-set the caption of a label every loop. Terrible.Anyway, here we go.Find this in the gameloop:```' Draw map name```Remove all of this:```' Draw map nameIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NONE Then Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim$(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim$(Map(GetPlayerMap(MyIndex)).Name), QBColor(BRIGHTRED))ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_HOUSE Then Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim$(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim$(Map(GetPlayerMap(MyIndex)).Name), QBColor(YELLOW))ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_SAFE Then Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim$(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim$(Map(GetPlayerMap(MyIndex)).Name), QBColor(WHITE))ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NO_PENALTY Then Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim$(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim$(Map(GetPlayerMap(MyIndex)).Name), QBColor(BLACK))End If```That was the code which rendered the map name on-screen.Now, we need to draw it to a label. So, make a label in frmMirage, call it "lblMapName" or something appropriate, and then find this code in modHandleData:```If GameWeather = WEATHER_RAINING Then Call PlayBGS("rain.wav")End IfIf GameWeather = WEATHER_THUNDER Then Call PlayBGS("thunder.wav")End If```And underneath it, add this:```' Draw map nameWith frmMirage.lblMapName Select Case Map(GetPlayerMap(MyIndex)).Moral Case MAP_MORAL_NONE .Caption = Trim$(Map(GetPlayerMap(MyIndex)).Name) .ForeColor = QBColor(BRIGHTRED) Case MAP_MORAL_HOUSE .Caption = Trim$(Map(GetPlayerMap(MyIndex)).Name) .ForeColor = QBColor(YELLOW) Case MAP_MORAL_SAFE .Caption = Trim$(Map(GetPlayerMap(MyIndex)).Name) .ForeColor = QBColor(WHITE) Case MAP_MORAL_NO_PENALTY .Caption = Trim$(Map(GetPlayerMap(MyIndex)).Name) .ForeColor = QBColor(BLACK) End SelectEnd With```Enjoy. Link to comment Share on other sites More sharing options...
Timmah Posted June 11, 2009 Share Posted June 11, 2009 @Zultar:> o.o wow lol no one gets it?> ok id like to make a label and remove it from the game screen and have the map name on the label.Open the source and just move it to where you want it?Lol. Link to comment Share on other sites More sharing options...
Robin Posted June 11, 2009 Share Posted June 11, 2009 @Timmah:> Open the source and just move it to where you want it?> > Lol.Read what I just posted. Link to comment Share on other sites More sharing options...
Timmah Posted June 11, 2009 Share Posted June 11, 2009 @Robin:> Read what I just posted.I just did after the post. :embarrassed: Link to comment Share on other sites More sharing options...
dao Posted June 12, 2009 Author Share Posted June 12, 2009 god thanks lol finally someone gets it >.> Link to comment Share on other sites More sharing options...
Devogen Posted June 12, 2009 Share Posted June 12, 2009 Wow… and I achieved the same result in just 1 lines of code... i must be a genius. Link to comment Share on other sites More sharing options...
Robin Posted June 12, 2009 Share Posted June 12, 2009 @[G2D:> ãV☼ link=topic=46192.msg469858#msg469858 date=1244789668]> Wow… and I achieved the same result in just 1 lines of code... i must be a genius.Nope. Read my post. Re-writing to a label every loop is _not_ something a genius would do. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now