Author Topic: Updating a Menu  (Read 2125 times)

0 Members and 1 Guest are viewing this topic.

Offline NoobieTopic starter

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
Updating a Menu
« on: July 01, 2011, 10:05:02 AM »
0
What is the best way to update a menu? For instance during skill gain if I want to show my current skill after a gain? Do I need to delete the Label and re-add it to the menu or is there a better way?

Here is the menu I was messing with.

Code: [Select]
chooseskill peac
set %currentskill #SKILL
set %startskill #SKILL
set %skillcap #SKILLCAP
set %numberofgains  0

gosub Menu1
repeat
{
set %numberofgains %numberofgains + 1
wait 1
}
until %numberofgains = 10
halt

sub Menu1
menu Clear
menu Window Title
menu Window Color Blue
menu Window Size 199 179
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 -49 0 297 197 5 7 1 Black 7 White
menu Font Name MS Sans Serif
menu Font Size 12
menu Font Style
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Center
menu Font BGColor White
menu Text EUOLabel3 52 8 Peacemaking
menu Text EUOLabel1 5 36 Current Skill
menu Text EUOLabel2 5 72 Skill Cap
  menu Text EUOLabel4 5 108 Gains
menu Font Align Center
menu Text EUOLabel7 112 36 %currentskill
  menu Text EUOLabel5 112 72 %skillcap
menu Text EUOLabel6 112 108 %numberofgains
  menu Font Size 8
menu Font BGColor BtnFace
menu Button Start 59 140 75 25 Start
menu Show 421 270
Return
« Last Edit: July 01, 2011, 10:07:25 AM by Noobie »

Offline OMGBurgers

  • Hero Member
  • *
  • Posts: 800
  • Activity:
    0%
  • Reputation Power: 7
  • OMGBurgers has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: Updating a Menu
« Reply #1 on: July 01, 2011, 05:07:28 PM »
0
for a label all you would do is:

menu set MENUITEMNAME NEWDISPLAYTEXT/VARIABLE

Offline NoobieTopic starter

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
Re: Updating a Menu
« Reply #2 on: July 01, 2011, 10:14:27 PM »
0
Thanks for answering my noob question I guess I did not look hard enough for the answer in the WIKI, but I knew it had to be easier then the way I was doing it.

Thanks again!

Tags: menu