Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: data/gui/windowsnames.xml
- ===================================================================
- --- data/gui/windowsnames.xml (revision 0)
- +++ data/gui/windowsnames.xml (working copy)
- @@ -0,0 +1,119 @@
- +<!-- data/gui/windowsnames.xml
- + Definition file for windows controlled by pawsControlWindow
- + Author: Fabian Stock (AiwendilH@googlemail.com)
- + License: GPL
- +
- + This program is free software; you can redistribute it and/or
- + modify it under the terms of the GNU General Public License
- + as published by the Free Software Foundation; either version 2
- + of the License, or (at your option) any later version.
- +
- + This program is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- + GNU General Public License for more details.
- +
- + You should have received a copy of the GNU General Public License
- + along with this program; if not, write to the Free Software
- + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- +-->
- +<windows>
- + <window name="ConfigWindow">
- + <alternativeName name="options"/>
- + </window>
- + <window name="SkillWindow">
- + <alternativeName name="stats"/>
- + <alternativeName name="skills"/>
- + </window>
- + <window name="SpellBookWindow">
- + <alternativeName name="spell book"/>
- + <alternativeName name="spells"/>
- + </window>
- + <window name="InventoryWindow">
- + <alternativeName name="inventory"/>
- + <alternativeName name="inv"/>
- + </window>
- + <window name="HelpWindow">
- + <alternativeName name="help"/>
- + </window>
- + <window name="BuddyWindow">
- + <alternativeName name="buddy"/>
- + </window>
- + <window name="InfoWindow">
- + <alternativeName name="info"/>
- + </window>
- + <window name="PetitionWindow">
- + <alternativeName name="petition"/>
- + <alternativeName name="petitions"/>
- + </window>
- + <window name="QuestNotebook">
- + <alternativeName name="quest"/>
- + </window>
- + <window name="GmGUI">
- + <alternativeName name="gm"/>
- + </window>
- + <window name="ShortcutWindow">
- + <alternativeName name="shortcut"/>
- + <alternativeName name="shortcuts"/>
- + </window>
- + <window name="GroupWindow">
- + <alternativeName name="group"/>
- + </window>
- + <window name="GuildWindow">
- + <alternativeName name="guild"/>
- + </window>
- + <window name="GlyphWindow">
- + <alternativeName name="glyph"/>
- + </window>
- + <window name="SketchWindow">
- + <alternativeName name="sketch"/>
- + </window>
- + <window name="MerchantWindow">
- + <alternativeName name="merchant"/>
- + </window>
- + <window name="LootWindow">
- + <alternativeName name="loot"/>
- + </window>
- + <window name="DetailWindow">
- + <alternativeName name="detail"/>
- + </window>
- + <window name="ExchangeWindow">
- + <alternativeName name="exchange"/>
- + </window>
- + <window name="WritingWindow">
- + <alternativeName name="write"/>
- + </window>
- + <window name="BookReadingWindow">
- + <alternativeName name="read"/>
- + </window>
- + <window name="QuestRewardWindow">
- + <alternativeName name="questreward"/>
- + </window>
- + <window name="CraftWindow">
- + <alternativeName name="craft"/>
- + </window>
- + <window name="IgnoreWindow">
- + <alternativeName name="ignore"/>
- + </window>
- + <window name="SmallInventoryWindow">
- + <alternativeName name="bag"/>
- + <alternativeName name="smallinventory"/>
- + </window>
- + <window name="ChatWindow">
- + <alternativeName name="talk"/>
- + <alternativeName name="chat"/>
- + <alternativeName name="communications"/>
- + </window>
- + <window name="ActiveMagicWindow">
- + <alternativeName name="activemagic"/>
- + </window>
- + <window name="PetitionGMWindow">
- + <alternativeName name="managepetitions"/>
- + </window>
- + <window name="HotBar">
- + <alternativeName name="quickspell"/>
- + </window>
- + <window name="MusicWindow">
- + <alternativeName name="music"/>
- + </window>
- +</windows>
- Index: data/help.xml
- ===================================================================
- --- data/help.xml (revision 8473)
- +++ data/help.xml (working copy)
- @@ -176,7 +176,7 @@
- </Contents>
- <branch name="Chat Window">
- <Contents>
- - <content type="text">The chat windows is probably the most important windows of PlaneShift. Good part of the interaction between players is done with this window. Commands can be executed by typing them in this window. You can configure which which tabs are shown in the in-game options: Options->Interface->Chat Tabs. You can also configure which messages are sent in the main tab. The currently selected chat tab is highlighted, and the tab will "flash" in case of a new, unread message arrives.</content>
- + <content type="text">The chat windows is probably the most important windows of PlaneShift. Good part of the interaction between players is done with this window. Commands can be executed by typing them in this window. You can configure which which tabs are shown in the in-game options: Options->Interface->Chat Tabs. You can also configure which messages are sent in the main tab. The currently selected chat tab is highlighted, and the tab will "flash" in case of a new, unread message arrives.</content>
- </Contents>
- <topic name="Tab Completion">
- <Contents>
- @@ -194,7 +194,7 @@
- </Contents>
- <topic name="Main">
- <Contents>
- - <content type="text">As the name already says this is the main chat tab. It's intended for interaction between characters. Everything typed here has a limited saying-range and only people within that range can see what you typed. This tab is In-Character (IC), meaning this is the voice of your character, not you. Your character has no clue about what music you listen to at the moment or even that PlaneShift is just a game. For short Out-of-character (OOC) announcements like "afk" please use brackets: "[afk]" or "[brb, phone]". You can filter the information displayed in this tab by going to Options->Interface->Chat Tabs and check/uncheck the "Main Tab" options.</content>
- + <content type="text">As the name already says this is the main chat tab. It's intended for interaction between characters. Everything typed here has a limited saying-range and only people within that range can see what you typed. This tab is In-Character (IC), meaning this is the voice of your character, not you. Your character has no clue about what music you listen to at the moment or even that PlaneShift is just a game. For short Out-of-character (OOC) announcements like "afk" please use brackets: "[afk]" or "[brb, phone]". You can filter the information displayed in this tab by going to Options->Interface->Chat Tabs and check/uncheck the "Main Tab" options.</content>
- </Contents>
- </topic>
- <topic name="Chat">
- @@ -214,7 +214,7 @@
- </topic>
- <topic name="Guild">
- <Contents>
- - <content type="text">If you are in a guild you can use this chat tab to communicate with your guild mates. In-Character chat is preferred but not enforced. There is no range limit and all people in your guild can read your messages. If you don't see this tab, enable it from Options->Interface->Chat Tabs</content>
- + <content type="text">If you are in a guild you can use this chat tab to communicate with your guild mates. In-Character chat is preferred but not enforced. There is no range limit and all people in your guild can read your messages. If you don't see this tab, enable it from Options->Interface->Chat Tabs</content>
- </Contents>
- </topic>
- <topic name="Group">
- @@ -914,9 +914,9 @@
- <Contents>
- <content type="text">With this command you can send messages to the alliance chat channel. Your current guild must be member of an alliance to use this command.
- - Usage;
- - /alliance [message]
- - (Sends {message] to the alliance chat channel. Can be combined with /me or /my.)</content>
- +Usage;
- +/alliance [message]
- +(Sends {message] to the alliance chat channel. Can be combined with /me or /my.)</content>
- </Contents>
- </topic>
- <topic name="/away">
- @@ -943,7 +943,7 @@
- <Contents>
- <content type="text">Command to clear the history of the chat window. This will clear the history of all chat tabs.
- - Usage: /clear</content>
- +Usage: /clear</content>
- </Contents>
- </topic>
- <branch name="/emote">
- @@ -1503,9 +1503,9 @@
- <Contents>
- <content type="text">With this command you can send messages to your guild mates in the guild chat.
- - Usage:
- - /guild [message]
- - (Writes [message] to the guild chat tab. Can be combined with /me or /my.)</content>
- +Usage:
- +/guild [message]
- +(Writes [message] to the guild chat tab. Can be combined with /me or /my.)</content>
- </Contents>
- </topic>
- <topic name="/ignore">
- @@ -1549,9 +1549,9 @@
- <Contents>
- <content type="text">With this command you can leave chat-channels again.
- - Usage:
- - /leave [channel-number]
- - (Leaves the channel specified by the number [channel-number].)</content>
- +Usage:
- +/leave [channel-number]
- +(Leaves the channel specified by the number [channel-number].)</content>
- </Contents>
- </topic>
- <topic name="/me">
- @@ -1576,8 +1576,8 @@
- <Contents>
- <content type="text">With this command you can describe actions of your pet. The /mypet is replaced with the name of your pet.
- - Usage:/mypet [message]
- - (Sends a message to the main chat tab starting with the name of your pet.)</content>
- +Usage:/mypet [message]
- +(Sends a message to the main chat tab starting with the name of your pet.)</content>
- </Contents>
- </topic>
- <topic name="/say">
- @@ -1600,18 +1600,18 @@
- <Contents>
- <content type="text">This command allows you to send tells to another player in the whisper chat tab.
- - Usage:
- - /tell [char-name] [message]
- - (Sends [char-name] the text [message]. Can be combines with /me or /my.)</content>
- +Usage:
- +/tell [char-name] [message]
- +(Sends [char-name] the text [message]. Can be combines with /me or /my.)</content>
- </Contents>
- </topic>
- <topic name="/tellnpc">
- <Contents>
- <content type="text">With this command you can communicate with NPCs in the NPC chat tab.
- - Usage:
- - /tellnpc [message]
- - (Sends the currently selected NPC the text [message] in the NPC chat tab.)</content>
- +Usage:
- +/tellnpc [message]
- +(Sends the currently selected NPC the text [message] in the NPC chat tab.)</content>
- </Contents>
- </topic>
- </branch>
- @@ -1653,9 +1653,9 @@
- <Contents>
- <content type="text">With this command you can loot corpses of NPCs. You can't loot other players after a duel.
- - Usage:
- - /loot
- - (Opens the loot window of the current target. You can only loot NPCs slayed by you or one of your current group) </content>
- +Usage:
- +/loot
- +(Opens the loot window of the current target. You can only loot NPCs slayed by you or one of your current group) </content>
- </Contents>
- </topic>
- <topic name="/stopattack">
- @@ -1700,7 +1700,7 @@
- <Contents>
- <content type="text">This command allows you to combine items in an container. The items must be already places in the container and the container must be targeted. Depending on what you want to combine it might be necessary to have an appropriate tool equipped.
- - Usage: /combine</content>
- +Usage: /combine</content>
- </Contents>
- </topic>
- <topic name="/construct">
- @@ -1722,9 +1722,9 @@
- <Contents>
- <content type="text">With this command you can fish in rivers and lakes.
- - Usage:
- - /fish
- - (This fishes at your current position. After a successful try you have to move a bit to be able to use the command again.)</content>
- +Usage:
- +/fish
- +(This fishes at your current position. After a successful try you have to move a bit to be able to use the command again.)</content>
- </Contents>
- </topic>
- <topic name="/harvest">
- @@ -1876,41 +1876,41 @@
- <Contents>
- <content type="text">This command shows the karma points of your guild. Guild karma increases if an enemy guild surrenders to your guild (Though it's not clear if this already works properly in game)
- - Usage:
- - /guildkarma
- - (Prints your guild's karma points to the system chat tab.)</content>
- +Usage:
- +/guildkarma
- +(Prints your guild's karma points to the system chat tab.)</content>
- </Contents>
- </topic>
- <topic name="/guildpromote">
- <Contents>
- <content type="text">With this command you can promote guiild members. Your guild rank must allows you to promote others for this to work and you can only promote others to a rank lower than yours.
- - Usage:
- - /guildpromote [char-name] [rank]
- - (Promotes the character [char-name] to the rank [rank]. [rank] is a number from 1 to 9.)</content>
- +Usage:
- +/guildpromote [char-name] [rank]
- +(Promotes the character [char-name] to the rank [rank]. [rank] is a number from 1 to 9.)</content>
- </Contents>
- </topic>
- <topic name="/guildremove">
- <Contents>
- <content type="text">This command allows you to remove characters from the guild. Your guild rank must allow you to remove members for this to work.
- - Usage:
- - /guildremove [char-name]
- - (Removes the character with the name [char-name] from the guild.)</content>
- +Usage:
- +/guildremove [char-name]
- +(Removes the character with the name [char-name] from the guild.)</content>
- </Contents>
- </topic>
- <topic name="/guildsecret">
- <Contents><content type="text">With this command you can toggle set your guild is secret or not. Your rank must allow you to edit the guild for this to work.
- - Usage:
- - /guildsecret
- - (Without any arguments the current status is printed to the system chat tab.)</content>
- -
- - /guildsecret on
- - (Makes your guild a secret guild.)
- -
- - /guildsecret off
- - (Makes your guild a public guild.)
- +Usage:
- +/guildsecret
- +(Without any arguments the current status is printed to the system chat tab.)</content>
- +
- +/guildsecret on
- +(Makes your guild a secret guild.)
- +
- +/guildsecret off
- +(Makes your guild a public guild.)
- </Contents>
- </topic>
- <topic name="/guildwar">
- @@ -1966,12 +1966,12 @@
- <Contents>
- <content type="text">This command allows you to check the current status of the help channel as well as to change your own advisor settings.
- - Usage: /advisor list
- - (Lists the amount of current advisors in the help channel. You don't have to be an advisor yourself to see how many there are)
- +Usage: /advisor list
- +(Lists the amount of current advisors in the help channel. You don't have to be an advisor yourself to see how many there are)
- +
- +/advisor requests
- +(Repeats the last question in the help channel. This can be useful to not miss any help request or right after becoming an advisor to see if there was a help request before. Only usable if you are an advisor.)
- - /advisor requests
- - (Repeats the last question in the help channel. This can be useful to not miss any help request or right after becoming an advisor to see if there was a help request before. Only usable if you are an advisor.)
- -
- /advisor sessions
- (Lists all help-sessions currently assigned to you. You need to be an advisor to be able to use this.)
- @@ -1987,9 +1987,9 @@
- <Contents>
- <content type="text">With this command you can ask questions in the help channel.
- - Usage:
- - /help [question]
- - (Asks [question] in the help channel. In case no advisor is currently available you are notified in the system chat tab.)</content>
- +Usage:
- +/help [question]
- +(Asks [question] in the help channel. In case no advisor is currently available you are notified in the system chat tab.)</content>
- </Contents>
- </topic>
- </branch>
- @@ -2018,9 +2018,9 @@
- <Contents>
- <content type="text">With this command you can give items to other players or NPCs. Containers (like sacks) cannot be traded at the moment.
- - Usage:
- - /give
- - (Opens the trading window for the selected player or NPC.)
- +Usage:
- +/give
- +(Opens the trading window for the selected player or NPC.)
- </content>
- </Contents>
- @@ -2029,12 +2029,12 @@
- <Contents>
- <content type="text">This command allows your character to marry or divorce other characters. It's only possible to marry someone with a different gender than the on of your character.
- - Usage:
- - /marriage propose
- - (Proposes your currently selected target.)
- -
- - /marrriage divorce
- - (Divorces from your currently selected target. Of course you must be married to the target for this to work.)</content>
- +Usage:
- +/marriage propose
- +(Proposes your currently selected target.)
- +
- +/marrriage divorce
- +(Divorces from your currently selected target. Of course you must be married to the target for this to work.)</content>
- </Contents>
- </topic>
- <topic name="/npcmenu">
- @@ -2058,27 +2058,27 @@
- <Contents>
- <content type="text">Opens the storage window for the currently targetted NPC. Works only with NPCs that act as storage managers.
- - Usage:
- - /storage
- - (Opens the storage window for the selected NPC)</content>
- +Usage:
- +/storage
- +(Opens the storage window for the selected NPC)</content>
- </Contents>
- </topic>
- <topic name="/trade">
- <Contents>
- <content type="text">This command allows you to start a trade with another player.
- - Usage:
- - /trade
- - (Asks the currently selected players for a trade and opens the trading window if the other player accepts.)</content>
- +Usage:
- +/trade
- +(Asks the currently selected players for a trade and opens the trading window if the other player accepts.)</content>
- </Contents>
- </topic>
- <topic name="/train">
- <Contents>
- <content type="text">With this command you can open the training window with a trainer.
- - Usage:
- - /train
- - (Opens the training window for the currently selected NPC. Only works if the NPC offers some training.)</content>
- +Usage:
- +/train
- +(Opens the training window for the currently selected NPC. Only works if the NPC offers some training.)</content>
- </Contents>
- </topic>
- </branch>
- @@ -2087,28 +2087,28 @@
- <Contents>
- <content type="text">This command allows you to unequip items.
- - Usage:/dequip [item-name]
- - (Unequips the specified item. The item will be places back in your inventory. I there are more than one item with this name equipped the first found will be unequiped.)
- -
- - /dequip [slot]
- - (Unequips and items for the specified slot. Possible values for [slot] are: righthand, lefthand, helm, legs, boots, bracers, torso, gloves, neck, rightfinger, leftfinger, belt, arms, back. The items will be places back in your inventory.</content>
- +Usage:/dequip [item-name]
- +(Unequips the specified item. The item will be places back in your inventory. I there are more than one item with this name equipped the first found will be unequiped.)
- +
- +/dequip [slot]
- +(Unequips and items for the specified slot. Possible values for [slot] are: righthand, lefthand, helm, legs, boots, bracers, torso, gloves, neck, rightfinger, leftfinger, belt, arms, back. The items will be places back in your inventory.</content>
- </Contents>
- </topic>
- <topic name="/drop">
- <Contents>
- <content type="text">This command allows you to drop an item (or a stack of items of the same kind)
- - Usage: /drop [quantity] any noguard inplace [item-name]
- - (This drops [quantity] amounts of the specified item. If no [quantity] is gives one item will be dropped. If [quantity] is "any" as many items as possible, up to a max of 65, are dropped. If "any" is added after the [quantity] items from containers like sacks are dropped also. By adding "noguard" everyone around can pickup the item again (otherwise only you are able to take them again). With "inplace" the items are dropped at your character position. Without "inplace" you must specify the position with the mouse.</content>
- +Usage: /drop [quantity] any noguard inplace [item-name]
- +(This drops [quantity] amounts of the specified item. If no [quantity] is gives one item will be dropped. If [quantity] is "any" as many items as possible, up to a max of 65, are dropped. If "any" is added after the [quantity] items from containers like sacks are dropped also. By adding "noguard" everyone around can pickup the item again (otherwise only you are able to take them again). With "inplace" the items are dropped at your character position. Without "inplace" you must specify the position with the mouse.</content>
- </Contents>
- </topic>
- <topic name="/equip">
- <Contents>
- <content type="text">This command allows you to equip items from your inventory.
- - Usage:
- - /equip [quantity] [item-name]
- - (Equips [quantity] amounts of an item with the name [item-name]. If no [quantity] is given one item will be equipped. If you have several items with the name [item-name] in your inventory the first found will be equipped. Items that can be eqiped in the hand-slots will be first equipped to the right hand and only to the left hand if the right hand is already full.)
- +Usage:
- +/equip [quantity] [item-name]
- +(Equips [quantity] amounts of an item with the name [item-name]. If no [quantity] is given one item will be equipped. If you have several items with the name [item-name] in your inventory the first found will be equipped. Items that can be eqiped in the hand-slots will be first equipped to the right hand and only to the left hand if the right hand is already full.)
- </content>
- </Contents>
- </topic>
- @@ -2116,12 +2116,12 @@
- <Contents>
- <content type="text">With this command you can unguard items dropped by you. Once an item is unguarded it's not possible anymore to guard it without taking the item again so be careful with this command.
- - Usage:
- - /guard
- - (Unguards the selected item)
- -
- - Additional info:
- - Even if the name of the command implies it's possible to guard items with it this it's not possible for ordinary players to do this. The GM/dev version of this command has some extended functionality with which the name of the command actually makes sense.</content>
- +Usage:
- +/guard
- +(Unguards the selected item)
- +
- +Additional info:
- +Even if the name of the command implies it's possible to guard items with it this it's not possible for ordinary players to do this. The GM/dev version of this command has some extended functionality with which the name of the command actually makes sense.</content>
- </Contents>
- </topic>
- <topic name="/pickup">
- @@ -2207,9 +2207,9 @@
- <Contents>
- <content type="text">This command allows you to play on the gameboards in PS. You need to have the gameboard selected you want to play on.
- - Usage:
- - /game
- - (Starts a game session on the selected gameboard. Two players can use one board at the same time.)</content>
- +Usage:
- +/game
- +(Starts a game session on the selected gameboard. Two players can use one board at the same time.)</content>
- </Contents>
- </topic>
- <topic name="/graphicbug">
- @@ -2221,6 +2221,24 @@
- (Writes a bug report to your harddisk.)</content>
- </Contents>
- </topic>
- + <topic name="/getwindowpos">
- + <Contents>
- + <content type="text">With this commandyou can get the current position and size of a window.
- +
- +Usage:
- +/getwindowpos [windowname]
- +(Prints the current position and size of the window with the name [windowname] to the system chat tab. To get a list of possible window names use /listWindows. The position of the window includes two numbers, a positive and a negative one. The positive numbers are relative to the upper left corner of the screen while the neagtive ones are relative to the lower right corner.)</content>
- + </Contents>
- + </topic>
- + <topic name="/listwindows">
- + <Contents>
- + <content type="text">With this command you can get the names of all windows that can be modified with chat commands.
- +
- +Usage:
- +/listwindows
- +(Prints a list of names of windows to the system chat tab. If there is more than one name in a line all these names can be used synonymously for the same window.)</content>
- + </Contents>
- + </topic>
- <topic name="/loadDesc">
- <Contents>
- <content type="text">With this command you can load a new description for your character from a file. The text files for the descriptions must be in the [config-directory]/descriptions folder but don't have to follow the [char-name]_description.txt format. Any filename will do here.
- @@ -2248,16 +2266,25 @@
- (This will request the server's MOTD and write it to the system chat tab.)</content>
- </Contents>
- </topic>
- + <topic name="/petition">
- + <Contents>
- + <content type="text">This command creates a petition.
- +
- +Usage;
- +/petition [message]
- +(submits a petition with the text [message].)</content>
- + </Contents>
- + </topic>
- <topic name="/picklock">
- <Contents>
- <content type="text">This command allows you to pick locks of doors and chests. At the moment there are no pickable locks in PS at all so this command is pretty useless for now.
- - Usage:
- - /picklock
- - (Picks the lock of your current target.)
- -
- - Additional Info:
- - Okay, it's not true that there are no pickable locks in PS. There is one in the NPCroom map which is only available to GMs and devs. So for players this command is in fact pretty useless.</content>
- +Usage:
- +/picklock
- +(Picks the lock of your current target.)
- +
- +Additional Info:
- +Okay, it's not true that there are no pickable locks in PS. There is one in the NPCroom map which is only available to GMs and devs. So for players this command is in fact pretty useless.</content>
- </Contents>
- </topic>
- <topic name="/ping">
- @@ -2332,31 +2359,55 @@
- (Overwrites your old OOC description and sets it to [new-desc]. Every "\n" in [new-desc] is replaced with a newline.)</content>
- </Contents>
- </topic>
- + <topic name="/setWindowPos">
- + <Contents>
- + <content type="text">With this command you can adjust the positions of windows.
- +
- +Usage:
- +/setWindowPos [windowname] [x] [y]
- +(Set the window with the name [windowname] to the positions [x]/[y]. Positive values of [x] and [y] are relative to the upper left corner of the screen while negative values are relative to the lower right corner. To get a list of possible window names use /listWindows. Be careful, it is possible to move windows outside the visible screen area with this (what can be used to disable unwanted pop-up windows like the group window for example. Just move it off the screen). To get the current positions of windows use /getWindowPos). It is not necessary that the window is currently visible you can move it around while it's invisible as well with this command.</content>
- + </Contents>
- + </topic>
- + <topic name="/setWindowSize">
- + <Contents>
- + <content type="text">With this command you can adjust the size of windows.
- +
- +Usage:
- +/setWindowSize [windowname] [width] [height]
- +(Set the size of the window with the name [windowname]. To get a list of possible window names use /listWindows. To get the current size of windows use /getWindowPos). It is not necessary that the window is currently visible. You can resize it while it's invisible as well with this command. You can only resize windows that allow resizing in general with this command for other windows this command does nothing. You also can't make windows smaller than the minimum size allowed for them. If you try to make them smaller they will only resize to the minimum size.</content>
- + </Contents>
- + </topic>
- <topic name="/show">
- <Contents>
- <content type="text">With this command you can open and close specific windows.
- - Usage:
- - /show [windowname]
- - (Opens the window with the name [windowname]. If the window was already openend it is closed again. Possible names are: activemagic, bag, buddy, chat, glyph, group, guild, help, info, inv, petition, quest, shortcut, skills, spells</content>
- +Usage:
- +/show [windowname]
- +(Shows the window with the name [windowname]. If the window was already openend it is closed again. To get a list of possible window names use /listWindows
- +
- +/show [windowname] show
- +(Always shows the window with the name [windowname]. If the window was already visible nothing happens.
- +
- +/show [windowname] hide
- +(Always hides the window with the name [windowname]. If the window was already hidden nothing happens.</content>
- </Contents>
- </topic>
- <topic name="/sit">
- <Contents>
- <content type="text">This command allows your character to sit down.
- - Usage:
- - /sit
- - (Your character sits at his current position.)</content>
- +Usage:
- +/sit
- +(Your character sits at his current position.)</content>
- </Contents>
- </topic>
- <topic name="/stand">
- <Contents>
- <content type="text">This command allows your character to stand up again. (Not possible if your character if overloaded)
- - Usage:
- - /stand
- - (Your character stands up again.)</content>
- +Usage:
- +/stand
- +(Your character stands up again.)</content>
- </Contents>
- </topic>
- <topic name="/starttrading">
- @@ -2381,18 +2432,18 @@
- <Contents>
- <content type="text">This command opens the context-menu for the selected target.
- - Usage:
- - /targetcontext
- - (Opens the context menu for the selected target. This is the same menu you would get if your right-click the target)</content>
- +Usage:
- +/targetcontext
- +(Opens the context menu for the selected target. This is the same menu you would get if your right-click the target)</content>
- </Contents>
- </topic>
- <topic name="/targetinfo">
- <Contents>
- <content type="text">This command opens the details-window for the selected target.
- - Usage:
- - /targetinfo
- - (Opens the details-window with information about the selected player or NPC.)</content>
- +Usage:
- +/targetinfo
- +(Opens the details-window with information about the selected player or NPC.)</content>
- </Contents>
- </topic>
- <topic name="/testanim">
- @@ -2411,15 +2462,30 @@
- Usage:
- /tip
- (Gets a tip from the server and writes it to the system chat tab.)</content>
- + </Contents>
- + </topic>
- + <topic name="/togglerun">
- + <Contents>
- + <content type="text">With this command you can change the current movement state of your character.
- +
- +Usage:
- +/togglerun
- +(Toggles your current movement state. If you were running you are now walking and the other way around.)
- +
- +/togglerun run
- +(Puts you in the run state. If your character was already running nothing happens.
- +
- +/togglerun walk
- +(Puts you in the walk state. If your character was already walking nothing happens.</content>
- </Contents>
- </topic>
- <topic name="/unstick">
- <Contents>
- <content type="text">This command might help you in case your character is stuck in the 3d environment. In some cases it can move your character back to a valid location.
- - Usage:
- - /unstick
- - (If possible moves your character back to a valid location. To use this command your character must be really stuck and not able to move anymore. Also this command needs you to not move at all for some seconds before you can use it.)</content>
- +Usage:
- +/unstick
- +(If possible moves your character back to a valid location. To use this command your character must be really stuck and not able to move anymore. Also this command needs you to not move at all for some seconds before you can use it.)</content>
- </Contents>
- </topic>
- <topic name="/version">
- @@ -2435,9 +2501,9 @@
- <Contents>
- <content type="text">This command allows you to list characters that are currently online.
- - Usage:
- - /who [filter]
- - (Lists characters whose name or whose guild contain the expression specified by [filter]. If no [filter] is given all online characters are listed up to a limit of 40 names.</content>
- +Usage:
- +/who [filter]
- +(Lists characters whose name or whose guild contain the expression specified by [filter]. If no [filter] is given all online characters are listed up to a limit of 40 names.</content>
- </Contents>
- </topic>
- </branch>
- @@ -2452,12 +2518,13 @@
- </Contents>
- </topic>
- <topic name="/pet">
- - <Contents><content type="text">This is the main command to interact with your pets.
- + <Contents>
- + <content type="text">This is the main command to interact with your pets.
- - For all the following commands [pet-name,] is either the name of your pet or it's number. If no [petname,] is given the first found pet of the ones you have currently summoned is used. Do not forget to add the "," after the name or number of your pet.
- +For all the following commands [pet-name,] is either the name of your pet or it's number. If no [petname,] is given the first found pet of the ones you have currently summoned is used. Do not forget to add the "," after the name or number of your pet.
- Usage:
- -/pet [pet-name,] assist</content>
- +/pet [pet-name,] assist
- (This makes your pet assist you in combat by attacking your current target.)
- /pet [pet-name,] attack
- @@ -2482,18 +2549,9 @@
- (Summons your pet. You need to have the necessary item equipped for this to work.)
- /pet [pet-name,] target [target]
- -(Sets the target of your pet. If no target is given the target of your character will be uses. If [target] is "me" you pet wil target your character. Otherwise [target] is interpreted as the name of the target you want to set.
- - </Contents>
- - </topic>
- - <topic name="/petition">
- - <Contents>
- - <content type="text">This command creates a petition.
- -
- -Usage;
- -/petition [message]
- -(submits a petition with the text [message].)</content>
- - </Contents>
- - </topic>
- +(Sets the target of your pet. If no target is given the target of your character will be uses. If [target] is "me" you pet wil target your character. Otherwise [target] is interpreted as the name of the target you want to set.</content>
- + </Contents>
- + </topic>
- </branch>
- </branch>
- @@ -3590,15 +3648,15 @@
- </Contents>
- <topic name="Context Menu Icons">
- <Contents>
- - <content type="pic" src="ButtonLook;" padding="100" width="64" height="64" />
- + <content type="pic" src="ButtonLook;" padding="100" width="64" height="64"/>
- <content type="text">Use this button to examine objects or characters more closely.</content>
- - <content type="pic" src="ButtonOpen;" padding="100" width="64" height="64" />
- + <content type="pic" src="ButtonOpen;" padding="100" width="64" height="64"/>
- <content type="text">Use this button to open chest or doors (In case of doors you also enter the buildings with it).</content>
- - <content type="pic" src="ButtonPickup;" padding="100" width="64" height="64" />
- + <content type="pic" src="ButtonPickup;" padding="100" width="64" height="64"/>
- <content type="text">Use this button to pickup objects.</content>
- - <content type="pic" src="ButtonLoot;" padding="100" width="64" height="64" />
- + <content type="pic" src="ButtonLoot;" padding="100" width="64" height="64"/>
- <content type="text">Use this button to loot items for fallen enemies.</content>
- - <content type="pic" src="ButtonAttack;" padding="100" width="64" height="64" />
- + <content type="pic" src="ButtonAttack;" padding="100" width="64" height="64"/>
- <content type="text">Use this button to attack your enemies.</content>
- </Contents>
- </topic>
- @@ -3608,5 +3666,4 @@
- study
- tellnpcinternal
- write -->
- -
- <!--- example to use for icons: <content type="pic" src="ButtonLook;ButtonOpen;ButtonPush" align="0" width="200" height="200" padding="20"/> -->
- Index: src/client/cmdusers.cpp
- ===================================================================
- --- src/client/cmdusers.cpp (revision 8473)
- +++ src/client/cmdusers.cpp (working copy)
- @@ -111,7 +111,7 @@
- cmdsource->Subscribe("/repair", this);
- cmdsource->Subscribe("/roll", this);
- cmdsource->Subscribe("/rotate", this);
- - cmdsource->Subscribe("/sell", this);
- + cmdsource->Subscribe("/sell", this);
- cmdsource->Subscribe("/show", this);
- cmdsource->Subscribe("/sit", this);
- //cmdsource->Subscribe("/spawn", this);
- @@ -138,6 +138,15 @@
- cmdsource->Subscribe("/setoocdesc", this); // set the ooc description of a char
- cmdsource->Subscribe("/loaddesc", this); // load a description for this char from a file
- cmdsource->Subscribe("/loadoocdesc", this); // load a ooc description for this char from a file
- + cmdsource->Subscribe("/togglerun", this); // changes the run status of the character
- + cmdsource->Subscribe("/setwindowpos", this); // set the position of a window
- + cmdsource->Subscribe("/setwindowsize", this); // set the size of a window
- + cmdsource->Subscribe("/listwindows", this); // gets a list of all avialable windows
- + cmdsource->Subscribe("/getwindowpos", this); // gets the current position of window(s)
- + cmdsource->Subscribe("/addhighlightname", this);
- + cmdsource->Subscribe("/delhighlightname", this);
- + cmdsource->Subscribe("/printhighlightnames", this);
- + cmdsource->Subscribe("/clearhighlightnames", this);
- }
- psUserCommands::~psUserCommands()
- @@ -189,7 +198,7 @@
- cmdsource->Unsubscribe("/repair", this);
- cmdsource->Unsubscribe("/roll", this);
- cmdsource->Unsubscribe("/rotate", this);
- - cmdsource->Unsubscribe("/sell", this);
- + cmdsource->Unsubscribe("/sell", this);
- cmdsource->Unsubscribe("/show", this);
- cmdsource->Unsubscribe("/sit", this);
- //cmdsource->Unsubscribe("/spawn", this);
- @@ -216,9 +225,16 @@
- cmdsource->Unsubscribe("/setoocdesc", this);
- cmdsource->Unsubscribe("/loaddesc", this);
- cmdsource->Unsubscribe("/loadoocdesc", this);
- + cmdsource->Unsubscribe("/togglerun", this);
- + cmdsource->Unsubscribe("/setwindowpos", this);
- + cmdsource->Unsubscribe("/setwindowsize", this);
- + cmdsource->Unsubscribe("/listwindows", this);
- + cmdsource->Unsubscribe("/getwindowpos", this);
- + cmdsource->Unsubscribe("/addhighlightname", this);
- + cmdsource->Unsubscribe("/delhighlightname", this);
- + cmdsource->Unsubscribe("/printhighlightnames", this);
- + cmdsource->Unsubscribe("/clearhighlightnames", this);
- -
- -
- // Unsubscribe emotes.
- for(unsigned int i=0; i < emoteList.GetSize(); i++)
- {
- @@ -311,7 +327,7 @@
- if ( words[0] == "/show")
- {
- - if (words.GetCount() > 1)
- + if (words.GetCount() == 2)
- {
- pawsControlWindow* ctrlWindow = dynamic_cast<pawsControlWindow*>(PawsManager::GetSingleton().FindWidget("ControlWindow"));
- if(!ctrlWindow || ctrlWindow->HandleWindowName(words[1]))
- @@ -319,8 +335,226 @@
- else return "That window cannot be found.";
- }
- - return "You need to specify a window to show";
- + else if (words.GetCount() == 3)
- + {
- + if (words[2] == "show")
- + {
- + pawsControlWindow* ctrlWindow = dynamic_cast<pawsControlWindow*>(PawsManager::GetSingleton().FindWidget("ControlWindow"));
- + if(!ctrlWindow || ctrlWindow->showWindowName(words[1]))
- + {
- + return NULL;
- + }
- + else
- + {
- + return "That window cannot be found.";
- + }
- + }
- + if (words[2] == "hide")
- + {
- + pawsControlWindow* ctrlWindow = dynamic_cast<pawsControlWindow*>(PawsManager::GetSingleton().FindWidget("ControlWindow"));
- + if(!ctrlWindow || ctrlWindow->hideWindowName(words[1]))
- + {
- + return NULL;
- + }
- + else
- + {
- + return "That window cannot be found.";
- + }
- + }
- + }
- + return "Usage: /show [windowname] [hide|show]";
- }
- + else if ( words[0] == "/setwindowpos" )
- + {
- + if (words.GetCount() == 4)
- + {
- + pawsControlWindow* ctrlWindow = dynamic_cast<pawsControlWindow*>(PawsManager::GetSingleton().FindWidget("ControlWindow"));
- + // negative coordinates are relative to the lower right corner
- + int x = atoi(words[2]);
- + int y = atoi(words[3]);
- + if (x < 0)
- + {
- + x = psengine->GetG2D()->GetWidth() + x;
- + }
- + if (y < 0)
- + {
- + y = psengine->GetG2D()->GetHeight() + y;
- + }
- + if(!ctrlWindow || ctrlWindow->setWindowPositionName(words[1], x, y))
- + {
- + return NULL;
- + }
- + else
- + {
- + return "That window cannot be found.";
- + }
- + }
- + return "Usage: /setwindowpos [windowname] [x] [y]";
- + }
- + else if ( words[0] == "/setwindowsize" )
- + {
- + if (words.GetCount() == 4)
- + {
- + pawsControlWindow* ctrlWindow = dynamic_cast<pawsControlWindow*>(PawsManager::GetSingleton().FindWidget("ControlWindow"));
- + if(!ctrlWindow || ctrlWindow->setWindowSizeName(words[1], atoi(words[2]), atoi(words[3])))
- + {
- + return NULL;
- + }
- + else
- + {
- + return "That window cannot be found.";
- + }
- + }
- + return "Usage: /setwindowpos [windowname] [x] [y]";
- + }
- + else if ( words[0] == "/listwindows" )
- + {
- + pawsControlWindow* ctrlWindow = dynamic_cast<pawsControlWindow*>(PawsManager::GetSingleton().FindWidget("ControlWindow"));
- + if (ctrlWindow)
- + {
- + pawsChatWindow* chatWindow = (pawsChatWindow*)PawsManager::GetSingleton().FindWidget("ChatWindow");
- + if(chatWindow)
- + {
- + chatWindow->ChatOutput(ctrlWindow->getWindowNames());
- + return NULL;
- + }
- + else
- + {
- + return "Could not find chat window...what brings up the question where I write this to.";
- + }
- + }
- + else
- + {
- + return "Control window could not be found.";
- + }
- + }
- + else if ( words[0] == "/getwindowpos" )
- + {
- + if (words.GetCount() == 2)
- + {
- + pawsControlWindow* ctrlWindow = dynamic_cast<pawsControlWindow*>(PawsManager::GetSingleton().FindWidget("ControlWindow"));
- + if (ctrlWindow)
- + {
- + pawsChatWindow* chatWindow = (pawsChatWindow*)PawsManager::GetSingleton().FindWidget("ChatWindow");
- + if(chatWindow)
- + {
- + chatWindow->ChatOutput(ctrlWindow->getWindowPosition(words[1]));
- + return NULL;
- + }
- + else
- + {
- + return "Could not find chat window...what brings up the question where I write this to.";
- + }
- + }
- + else
- + {
- + return "Control window could not be found.";
- + }
- + }
- + else
- + {
- + return "Usage: /getwindowpos [windowname]|all";
- + }
- + }
- + else if ( words[0] == "/addhighlightname" )
- + {
- + if (words.GetCount() == 2)
- + {
- + pawsChatWindow* chatWindow = (pawsChatWindow*)PawsManager::GetSingleton().FindWidget("ChatWindow");
- + if(chatWindow)
- + {
- + if (chatWindow->addHighlightName(words[1]))
- + {
- + return NULL;
- + }
- + else
- + {
- + return "Name already highlighted.";
- + }
- + }
- + else
- + {
- + return "Could not find chat window...what brings up the question where I write this to.";
- + }
- + }
- + else
- + {
- + return "Usage: /addhighlightname [name]";
- + }
- + }
- + else if ( words[0] == "/delhighlightname" )
- + {
- + if (words.GetCount() == 2)
- + {
- + pawsChatWindow* chatWindow = (pawsChatWindow*)PawsManager::GetSingleton().FindWidget("ChatWindow");
- + if(chatWindow)
- + {
- + if (chatWindow->delHighlightName(words[1]))
- + {
- + return NULL;
- + }
- + else
- + {
- + return "Name not found on the highlight list.";
- + }
- + }
- + else
- + {
- + return "Could not find chat window...what brings up the question where I write this to.";
- + }
- + }
- + else
- + {
- + return "Usage: /delhighlightname [name]";
- + }
- + }
- + else if ( words[0] == "/printhighlightnames" )
- + {
- + if (words.GetCount() == 1)
- + {
- + pawsChatWindow* chatWindow = (pawsChatWindow*)PawsManager::GetSingleton().FindWidget("ChatWindow");
- + if(chatWindow)
- + {
- + csString highlightedNames = chatWindow->getHighlightName();
- + if (highlightedNames == "")
- + {
- + return "Your list of highlighted names is empty.";
- + }
- + else
- + {
- + return highlightedNames;
- + }
- + }
- + else
- + {
- + return "Could not find chat window...what brings up the question where I write this to.";
- + }
- + }
- + else
- + {
- + return "Usage: /printhighlightnames";
- + }
- + }
- + else if ( words[0] == "/clearhighlightnames" )
- + {
- + if (words.GetCount() == 1)
- + {
- + pawsChatWindow* chatWindow = (pawsChatWindow*)PawsManager::GetSingleton().FindWidget("ChatWindow");
- + if(chatWindow)
- + {
- + chatWindow->clearHighlightList();
- + return "Removed all names from the highlight list.";
- + }
- + else
- + {
- + return "Could not find chat window...what brings up the question where I write this to.";
- + }
- + }
- + else
- + {
- + return "Usage: /clearhighlightnames";
- + }
- + }
- else if ( words[0] == "/study" )
- {
- pawsWidget * widget = PawsManager::GetSingleton().FindWidget("CraftWindow");
- @@ -1121,6 +1355,41 @@
- }
- }
- + else if (words[0] == "/togglerun")
- + {
- + if ((psengine) && (psengine->GetCharControl()) && (psengine->GetCharControl()->GetMovementManager()))
- + {
- + if (words.GetCount() < 2)
- + {
- + // No parameter so just toggle the current running status of the character
- + psengine->GetCharControl()->GetMovementManager()->ToggleRun();
- + return "Run mode toggled";
- + }
- + else if (words.GetCount() == 2)
- + {
- + // Oh...we have one parameter. Lets see if it's a valid one...and then act accordingly
- + if (words[1] == "run")
- + {
- + // So we should run now? Fine master...whatever you want
- + psengine->GetCharControl()->GetMovementManager()->setRun(true);
- + return "Run mode enabled";
- + }
- + else if (words[1] == "walk")
- + {
- + // time for some relaxing walking for a change
- + psengine->GetCharControl()->GetMovementManager()->setRun(false);
- + return "Run mode disabled";
- + }
- + }
- + // well...if we didn't return yet the syntax was invalid so lets give a hint about the correct usage
- + return "Usage: /togglerun [run/walk]";
- + }
- + else
- + {
- + // if this ever happens a useful error-message is the least of our worries
- + return "Something went really wrong. Couldn't find a valid movement manager...how do you play this game at the moment at all?";
- + }
- + }
- else
- {
- psUserCmdMessage cmdmsg(cmd);
- Index: src/client/gui/chatwindow.cpp
- ===================================================================
- --- src/client/gui/chatwindow.cpp (revision 8473)
- +++ src/client/gui/chatwindow.cpp (working copy)
- @@ -142,6 +142,7 @@
- settings.groupColor = white;
- settings.auctionColor = white;
- settings.helpColor = white;
- + settings.highlightColor = white;
- settings.mainBrackets = true;
- settings.yourColorMix = true;
- settings.joindefaultchannel = true;
- @@ -466,6 +467,7 @@
- if ( nodeName == "grouptext") settings.groupColor = col;
- if ( nodeName == "auctiontext") settings.auctionColor = col;
- if ( nodeName == "helptext") settings.helpColor = col;
- + if ( nodeName == "highlight") settings.highlightColor = col;
- }
- }
- @@ -1257,6 +1259,7 @@
- CreateSettingNode(colorNode,settings.playerColor,"playernametext");
- CreateSettingNode(colorNode,settings.auctionColor,"auctiontext");
- CreateSettingNode(colorNode,settings.helpColor,"helptext");
- + CreateSettingNode(colorNode,settings.highlightColor,"highlight");
- CreateSettingNode(colorNode,settings.groupColor,"grouptext");
- CreateSettingNode(colorNode,settings.yourColor,"yourtext");
- CreateSettingNode(colorNode,settings.guildColor,"guildtext");
- @@ -1834,6 +1837,22 @@
- colour = settings.playerColor;
- }
- }
- +
- + // mix with the highlight color if the messahge is from a preson on the list (only for main chat)
- + if ((msg.iChatType == CHAT_SAY) || (msg.iChatType == CHAT_SHOUT))
- + {
- + // is the sender of this message in the list?
- + for (size_t i = 0; i < highlightList.GetSize(); i++)
- + {
- + // we don't really care about upper- and lowercase for the name
- + if (highlightList[i].CompareNoCase(noCasePerson))
- + {
- + // look like it's on the list so lets mix in the highlight color
- + colour = mixColours(colour, settings.highlightColor);
- + }
- + }
- + }
- +
- if (!buff.IsEmpty())
- {
- @@ -2619,6 +2638,51 @@
- }
- }
- +bool pawsChatWindow::addHighlightName(csString newName)
- +{
- + // is the name already on the list?
- + for (size_t i = 0; i < highlightList.GetSize(); i++)
- + {
- + // we don't really care about upper- and lowercase for the name
- + if (highlightList[i].CompareNoCase(newName))
- + {
- + // look like it's already on the list..so just leave
- + return false;
- + }
- + }
- + // okay, not on the list yet...lets change that
- + highlightList.Push(newName);
- + return true;
- +}
- +
- +bool pawsChatWindow::delHighlightName(csString removeName)
- +{
- + // is the name on the list?
- + for (size_t i = 0; i < highlightList.GetSize(); i++)
- + {
- + // we don't really care about upper- and lowercase for the name
- + if (highlightList[i].CompareNoCase(removeName))
- + {
- + // Ha...found it. Too bad for it..lets remove it.
- + highlightList.DeleteIndex(i);
- + return true;
- + }
- + }
- + // not found
- + return false;
- +}
- +
- +csString pawsChatWindow::getHighlightName()
- +{
- + // pretty straight forward...interate through all names and add them to a string
- + csString returnString = "";
- + for (size_t i=0; i < highlightList.GetSize(); i++)
- + {
- + returnString.Append(highlightList[i]).Append("\n");
- + }
- + return returnString;
- +}
- +
- int pawsChatWindow::mixColours(int colour1, int colour2)
- {
- int r,g,b;
- Index: src/client/gui/chatwindow.h
- ===================================================================
- --- src/client/gui/chatwindow.h (revision 8473)
- +++ src/client/gui/chatwindow.h (working copy)
- @@ -82,6 +82,7 @@
- int groupColor;
- int auctionColor;
- int helpColor;
- + int highlightColor;
- bool joindefaultchannel;
- bool defaultlastchat;
- bool looseFocusOnSend;
- @@ -218,6 +219,26 @@
- pawsEditTextBox* getInputTextBox() {return inputText;};
- void writeChatHistory();
- +
- + /** Adds a new name to the highlight list
- + *
- + * @param newName: The name to add to the list
- + * @return "True" if the name was added, "false" if the name was already on the list
- + */
- + bool addHighlightName(csString newName);
- + /** Removes a name form the highlight list
- + *
- + * @param removeName: The name to delete from the list
- + * @return "True" if the name was removed, "false" if the name was not on the list
- + */
- + bool delHighlightName(csString removeName);
- + /** Removes all entries from the highlight list
- + */
- + void clearHighlightList() {highlightList.DeleteAll();};
- + /** returns all names on the highlight list
- + * @return A string containing all names on the highlight list separated by newlines
- + */
- + csString getHighlightName();
- /// Reload Chat Window
- void ReloadChatWindow();
- @@ -260,6 +281,9 @@
- csArray<csString> autoCompleteNames;
- ///Contains pointers to all the autocompletion lists (excluding command lists)
- csArray<csArray<csString> *> autoCompleteLists;
- +
- + /// list of names whose chat lines should be highlighted
- + csArray<csString> highlightList;
- /// list of last commands
- csRedBlackTree<psString> commandList;
- Index: src/client/gui/pawscontrolwindow.cpp
- ===================================================================
- --- src/client/gui/pawscontrolwindow.cpp (revision 8473)
- +++ src/client/gui/pawscontrolwindow.cpp (working copy)
- @@ -59,7 +59,10 @@
- #define ICONS 14
- //////////////////////////////////////////////////////////////////////
- +// consts
- +const char* WINDOWSNAMESFILE ="/planeshift/data/gui/windowsnames.xml";
- +
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- @@ -119,6 +122,94 @@
- buttonUp = FindWidget("ShowButtonUp");
- buttonDown = FindWidget("ShowButtonDown");
- +
- + //get a list of all controlled windows and their alternative names
- + // first we clean the old array, who knows what was in there before or if this is the second time PostSetup runs
- + controlledWindows.Empty();
- + // then we crate a XML document reader...
- + csRef<iDocumentSystem> xml = psengine->GetXMLParser ();
- + csRef<iDocument> doc = xml->CreateDocument();
- + csRef<iVFS> vfs = csQueryRegistry<iVFS > ( PawsManager::GetSingleton().GetObjectRegistry());
- + if (!vfs)
- + {
- + // well, if we got here the question is probably how we got this far at all.
- + Error1("interresting...couldn't load the virtual file system plugin. Something is definitively fishy");
- + return false;
- + }
- + // ...and read the file with the names and alternative names with it...
- + csRef<iDataBuffer> buf(vfs->ReadFile (WINDOWSNAMESFILE));
- + if (!buf || !buf->GetSize ())
- + {
- + Error2("Error reading windows name file %s", WINDOWSNAMESFILE);
- + return false;
- + }
- + // ..just to hand it over to the XML parser
- + const char* error = doc->Parse( buf );
- + if ( error )
- + {
- + Error2("Error loading windows names file: %s", error);
- + return false;
- + }
- + // now the real work starts...making sense out of the xml file and storing it for later use
- + csRef<iDocumentNode> rootNode = doc->GetRoot();
- + if(!rootNode)
- + {
- + Error2("No XML root in %s", WINDOWSNAMESFILE);
- + return false;
- + }
- + csRef<iDocumentNodeIterator> windowsIt = rootNode->GetNodes();
- + // iterate through all nodes
- + while(windowsIt->HasNext())
- + {
- + csRef<iDocumentNode> baseNode = windowsIt->Next();
- + csString baseNodeName (baseNode->GetValue());
- + if (baseNodeName == "windows")
- + {
- + csRef<iDocumentNodeIterator> winIt = baseNode->GetNodes();
- + while(winIt->HasNext())
- + {
- + csRef<iDocumentNode> curNode = winIt->Next();
- + // check if it's a <window> node
- + csString nodeName (curNode->GetValue());
- + if (nodeName == "window")
- + {
- + // found a <windows> node, lets store it's content
- + WindowNames windowName;
- + windowName.name = curNode->GetAttributeValue("name");
- + if(!windowName.name.Length())
- + {
- + // no name given for this window, not good
- + Error2("Missing window name in %s", WINDOWSNAMESFILE);
- + return false;
- + }
- + // now we also store the alternative names of this window
- + csRef<iDocumentNodeIterator> altNamesIt = curNode->GetNodes();
- + while (altNamesIt->HasNext())
- + {
- + csRef<iDocumentNode> altNameNode = altNamesIt->Next();
- + csString nodeAltName (altNameNode->GetValue());
- + // check if we found a <alternativeName> node
- + if (nodeAltName == "alternativeName")
- + {
- + csString altName = altNameNode->GetAttributeValue("name");
- + if(!altName.Length())
- + {
- + // we got a alternative name node but no "name" attribute...bad
- + Error2("Missing alternative window name in %s", WINDOWSNAMESFILE);
- + return false;
- + }
- + // for alt names we only want lowercase versions
- + altName.Downcase();
- + // store all found alternative names
- + windowName.alternativeNames.Push(altName);
- + }
- + }
- + // last but no least we save the struct for later use
- + controlledWindows.Push(windowName);
- + }
- + }
- + }
- + }
- return true;
- }
- @@ -295,86 +386,285 @@
- bool pawsControlWindow::HandleWindowName(csString widgetStr)
- {
- - csString widget;
- - widgetStr.Downcase();
- - if(widgetStr == "options" )
- - widget = "ConfigWindow";
- - else if(widgetStr == "stats" || widgetStr =="skills")
- - widget = "SkillWindow";
- - else if(widgetStr == "spell book" || widgetStr == "spells")
- - widget = "SpellBookWindow";
- - else if(widgetStr == "inventory" || widgetStr == "inv")
- - widget = "InventoryWindow";
- - else if(widgetStr == "help")
- - widget = "HelpWindow";
- - else if(widgetStr == "buddy")
- - widget = "BuddyWindow";
- - else if(widgetStr == "info")
- - widget = "InfoWindow";
- - else if(widgetStr == "petition" || widgetStr == "petitions")
- - widget = "PetitionWindow";
- - else if(widgetStr == "quest")
- - widget = "QuestNotebook";
- - else if(widgetStr == "gm")
- - widget = "GmGUI";
- - else if(widgetStr == "shortcut")
- - widget = "ShortcutWindow";
- - else if(widgetStr == "group")
- - widget = "GroupWindow";
- - else if(widgetStr == "guild")
- - widget = "GuildWindow";
- - else if(widgetStr == "glyph")
- - widget = "GlyphWindow";
- - else if(widgetStr == "sketch")
- - widget = "SketchWindow";
- - else if(widgetStr == "merchant")
- - widget = "MerchantWindow";
- - else if(widgetStr == "loot")
- - widget = "LootWindow";
- - else if(widgetStr == "detail")
- - widget = "DetailWindow";
- - else if(widgetStr == "exchange")
- - widget = "ExchangeWindow";
- - else if(widgetStr == "write")
- - widget = "WritingWindow";
- - else if(widgetStr == "read")
- - widget = "BookReadingWindow";
- - else if(widgetStr == "questreward")
- - widget = "QuestRewardWindow";
- - else if(widgetStr == "craft")
- - widget = "CraftWindow";
- - else if(widgetStr == "ignore")
- - widget = "IgnoreWindow";
- - else if(widgetStr == "bag" || widgetStr == "smallinventory")
- - widget = "SmallInventoryWindow";
- - else if(widgetStr == "talk" || widgetStr == "chat" || widgetStr == "communications")
- - widget = "ChatWindow";
- - else if(widgetStr == "activemagic")
- - widget = "ActiveMagicWindow";
- - else if(widgetStr == "managepetitions")
- - widget = "PetitionGMWindow";
- - else if(widgetStr == "quickspell")
- - widget = "HotBar";
- - else if(widgetStr == "music")
- - widget = "MusicWindow";
- - else if(widgetStr == "quit")
- + // first some special cases
- + csString widget = widgetStr;
- + widget.Downcase();
- + if(widget == "quit")
- {
- HandleQuit();
- return true;
- }
- - else if(widgetStr == "buy")
- + if(widget == "buy")
- {
- psengine->GetCmdHandler()->Execute("/buy");
- return true;
- }
- - if(widget)
- + // now the general window handling
- + // first we translate the given name to the real window name
- + widget = translateWidgetName(widgetStr);
- + // if the translation was successful we "handle" the window
- + if(widget != "")
- {
- HandleWindow(widget);
- return true;
- }
- + // otherwise we return with an error
- else return false;
- }
- +bool pawsControlWindow::showWindow(csString widgetStr)
- +{
- + // lets see if we can find the specified window
- + pawsWidget* widget = PawsManager::GetSingleton().FindWidget(widgetStr.GetData());
- + if (!widget)
- + {
- + // doesn't look like it, log and return with an error
- + Error2("%s isn't loaded", widgetStr.GetData());
- + return false;
- + }
- + // if the window was not visible before we show it now.
- + if ( !widget->IsVisible() )
- + {
- + widget->Show();
- + }
- + return true;
- +}
- +
- +bool pawsControlWindow::hideWindow(csString widgetStr)
- +{
- + // lets see if we can find the specified window
- + pawsWidget* widget = PawsManager::GetSingleton().FindWidget(widgetStr.GetData());
- + if (!widget)
- + {
- + // doesn't look like it, log and return with an error
- + Error2("%s isn't loaded", widgetStr.GetData());
- + return false;
- + }
- + // if the window was not visible before we show it now.
- + if ( widget->IsVisible() )
- + {
- + widget->Hide();
- + // Don't leave focus on us after hiding
- + if ( this->Includes(PawsManager::GetSingleton().GetCurrentFocusedWidget()) )
- + {
- + PawsManager::GetSingleton().SetCurrentFocusedWidget(NULL);
- + }
- + }
- + return true;
- +}
- +
- +bool pawsControlWindow::showWindowName(csString widgetStr)
- +{
- + // special window handling
- + csString widget = widgetStr;
- + widget.Downcase();
- + if(widget == "quit")
- + {
- + HandleQuit();
- + return true;
- + }
- + if(widget == "buy")
- + {
- + psengine->GetCmdHandler()->Execute("/buy");
- + return true;
- + }
- + // and the "normal" windows
- + widget = translateWidgetName(widgetStr);
- + if(widget != "")
- + {
- + // if the window was found show it
- + return showWindow(widget);
- + }
- + else return false;
- +}
- +
- +bool pawsControlWindow::hideWindowName(csString widgetStr)
- +{
- + // special window handling
- + csString widget = widgetStr;
- + widget.Downcase();
- + if(widget == "quit")
- + {
- + // well, hiding of quit is not supported (and doesn't really make sense)
- + return false;
- + }
- + if(widget == "buy")
- + {
- + // hiding of /buy isn't supported either at the moment
- + return false;
- + }
- + // translate the given name and hide the window if found
- + widget = translateWidgetName(widgetStr);
- + if(widget != "")
- + {
- + return hideWindow(widget);
- + }
- + else return false;
- +}
- +
- +bool pawsControlWindow::setWindowPositionName(csString widgetStr, int x, int y)
- +{
- + csString widget = translateWidgetName(widgetStr);
- +
- + // set the new position of the window
- + if(widget != "")
- + {
- + pawsWidget* w = PawsManager::GetSingleton().FindWidget(widget.GetData());
- + if (!w)
- + {
- + Error2("%s isn't loaded", widget.GetData());
- + return false;
- + }
- + w->SetRelativeFramePos(x,y);
- + return true;
- + }
- + return false;
- +}
- +
- +bool pawsControlWindow::setWindowSizeName(csString widgetStr, int width, int height)
- +{
- + csString widget = translateWidgetName(widgetStr);
- +
- + // set the new size of the window
- + if(widget != "")
- + {
- + pawsWidget* w = PawsManager::GetSingleton().FindWidget(widget.GetData());
- + if (!w)
- + {
- + Error2("%s isn't loaded", widget.GetData());
- + return false;
- + }
- + // first check if the window is resizeable at all, if not do nothing
- + if (w->IsResizable())
- + {
- + // then we check for the allowed minimum size
- + int minWidth, minHeight;
- + w->GetMinSize(minWidth, minHeight);
- + // if the given size is smaller than that set it to the minimum size
- + if (width < minWidth)
- + {
- + width = minWidth;
- + }
- + if (height < minHeight)
- + {
- + height = minHeight;
- + }
- + // and last but not least set the size
- + w->SetSize(width,height);
- + // needed to prevent some drawing errors...PAWS calls resize for all child widgets but not the parent itself.
- + w->Resize();
- + }
- + return true;
- + }
- + return false;
- +}
- +
- +csString pawsControlWindow::getWindowNames()
- +{
- + csString returnNames = "";
- + for (unsigned int i=0; i < controlledWindows.GetSize(); i++)
- + {
- + // add the real window name
- + returnNames.Append(controlledWindows[i].name);
- + for (unsigned int j=0; j<controlledWindows[i].alternativeNames.GetSize(); j++)
- + {
- + // add every found alternative name
- + returnNames.Append(" | ").Append(controlledWindows[i].alternativeNames[j]);
- + }
- + // add a newline after every window type
- + returnNames.Append("\n");
- + }
- + return returnNames;
- +}
- +
- +csString pawsControlWindow::getWindowPosition(csString widgetStr)
- +{
- + csString returnPositions = "";
- + // check if all positions are requested or only a specific window
- + csString window = widgetStr;
- + window.Downcase();
- + if (window == "all")
- + {
- + // so we want the positiosn of all windows
- + for (unsigned int i = 0; i < controlledWindows.GetSize(); i++)
- + {
- + pawsWidget* widget = PawsManager::GetSingleton().FindWidget(controlledWindows[i].name.GetData());
- + // error checking...this should only fail if someone messed up the definition file WINDOWSNAMESFILE
- + if (!widget)
- + {
- + // window could not be found
- + Error2("%s isn't loaded", widgetStr.GetData());
- + csString errMsg = "Could not find window ";
- + errMsg.Append(controlledWindows[i].name);
- + return errMsg;
- + }
- + else
- + {
- + // get the postion and add it to the string
- + csRect rect = widget->GetScreenFrame();
- + returnPositions.Append(controlledWindows[i].name).Append(" x:").Append(rect.xmin).Append("|").Append(rect.xmin-graphics2D->GetWidth())
- + .Append(" y:").Append(rect.ymin).Append("|").Append(rect.ymin-graphics2D->GetHeight())
- + .Append(" width:").Append(rect.Width()).Append(" height:").Append(rect.Height()).Append("\n");
- + }
- + }
- + }
- + else
- + {
- + // specific window
- + window = translateWidgetName(widgetStr);
- + pawsWidget* widget = PawsManager::GetSingleton().FindWidget(window.GetData());
- + if (!widget)
- + {
- + // window could not be found
- + Error2("%s isn't loaded", widgetStr.GetData());
- + csString errMsg = "Could not find window ";
- + errMsg.Append(window);
- + return errMsg;
- + }
- + else
- + {
- + // put the position in the string
- + csRect rect = widget->GetScreenFrame();
- + returnPositions.Append(window).Append(" x:").Append(rect.xmin).Append("|").Append(rect.xmin-graphics2D->GetWidth())
- + .Append(" y:").Append(rect.ymin).Append("|").Append(rect.ymin-graphics2D->GetHeight())
- + .Append(" width:").Append(rect.Width()).Append(" height:").Append(rect.Height());
- + }
- + }
- + return returnPositions;
- +}
- +
- +csString pawsControlWindow::translateWidgetName(csString widgetStr)
- +{
- + // first we convert to lowercase to be case-insensitive
- + widgetStr.Downcase();
- + csString compareName;
- + // lets check all names and alternative names if the requested window and be found
- + for (unsigned int i=0; i < controlledWindows.GetSize(); i++)
- + {
- + // again, convert to lowercase
- + compareName = controlledWindows[i].name;
- + compareName.Downcase();
- + if (widgetStr == compareName)
- + {
- + // that was simple, real window name was used
- + // of course we return the case sensitve version of the name
- + return controlledWindows[i].name;
- + }
- + // now we check the alternative names of this window..these should be all lowercase already from ::PostSetup()
- + for (unsigned int j=0; j<controlledWindows[i].alternativeNames.GetSize(); j++)
- + {
- + if (widgetStr == controlledWindows[i].alternativeNames[j])
- + {
- + // bingo...lets return the real window name
- + return controlledWindows[i].name;
- + }
- + }
- + }
- + // too bad, no window with that name found
- + return "";
- +}
- +
- +
- void pawsControlWindow::HandleQuit()
- {
- PawsManager::GetSingleton().CreateYesNoBox( "\nDo you really wish to leave Yliakum?", this );
- Index: src/client/gui/pawscontrolwindow.h
- ===================================================================
- --- src/client/gui/pawscontrolwindow.h (revision 8473)
- +++ src/client/gui/pawscontrolwindow.h (working copy)
- @@ -85,6 +85,58 @@
- * @return TRUE if the toggle was possible, returns FALSE if it was not found.
- */
- bool HandleWindowName(csString widgetStr);
- +
- + /** Used to show a window.
- + * If the window was already shown nothing happens.
- + * @param widgetStr: The window to show
- + * @return FALSE in case of an error otherwise TRUE
- + */
- + bool showWindow(csString widgetStr);
- + /** Used to hide a window.
- + * If the window was already hidden nothing happens.
- + * @param widgetStr: The window to show
- + * @return FALSE in case of an error otherwise TRUE
- + */
- + bool hideWindow(csString widgetStr);
- + /** Used to show a window from a command.
- + * If the window was already shown nothing happens.
- + * @param widgetStr: The window to hide (command form, translated to the actual window name by the function)
- + * @return FALSE in case of an error otherwise TRUE
- + */
- + bool showWindowName(csString widgetStr);
- + /** Used to hide a window from a command.
- + * If the window was already hidden nothing happens.
- + * @param widgetStr: The window to hide (command form, translated to the actual window name by the function)
- + * @return FALSE in case of an error otherwise TRUE
- + */
- + bool hideWindowName(csString widgetStr);
- +
- + /** Used to set the position of windows from a command.
- + * @param widgetStr: The window to hide (command form, translated to the actual window name by the function)
- + * @param x: New x postion ofthe window
- + * @param y: New y postion ofthe window
- + * @return FALSE in case of an error otherwise TRUE
- + */
- + bool setWindowPositionName(csString widgetStr, int x, int y);
- +
- + /** Used to set the size of windows from a command.
- + * @param widgetStr: The window to resizehide (command form, translated to the actual window name by the function)
- + * @param width: New width of the window
- + * @param height: New height of the window
- + * @return FALSE in case of an error otherwise TRUE
- + */
- + bool setWindowSizeName(csString widgetStr, int width, int height);
- +
- + /** Used to get all names and alternative names of windows from a command.
- + * @return a string containing all the window names
- + */
- + csString getWindowNames();
- +
- + /** Used to get the positions of windows from a command.
- + * @param widgetStr: The window that should return it's position. If "all" then all windows return their positions
- + * @return a string containing the requested position(s)
- + */
- + csString getWindowPosition(csString widgetStr);
- /** When the quit button is pressed this method displays the yes/no dialog
- * box to confirm that a user really wants to quit.
- @@ -146,6 +198,19 @@
- bool Contains( int x, int y );
- private:
- + /** helper function for commands to translate to widget names from a more readable form
- + * This takes the windows names and the alternative names from a file (standard: /planeshift/data/gui/windowsnames.xml)
- + * and then returns the "offical" window name for the given parameter
- + * @param widgetStr: The widget name to be translated
- + * @return The actual widget name used by the system or an empty string if this widget is unknown to this function
- + */
- + csString translateWidgetName(csString widgetStr);
- + struct WindowNames
- + {
- + csString name;
- + csArray<csString> alternativeNames;
- + }; // struct to contain the window names and their alternatives
- + csArray<WindowNames> controlledWindows; // array of all window names that are controllable by commands
- unsigned short int style;
- bool hidden;
- csArray<WBName> wbs;
- Index: src/client/psmovement.cpp
- ===================================================================
- --- src/client/psmovement.cpp (revision 8473)
- +++ src/client/psmovement.cpp (working copy)
- @@ -1000,3 +1000,19 @@
- toggleRun = true;
- }
- }
- +
- +void psMovementManager::setRun(bool runState)
- +{
- + if (runState)
- + {
- + defaultmode = run;
- + Start(run);
- + toggleRun = true;
- + }
- + else
- + {
- + defaultmode = walk;
- + Stop(run);
- + toggleRun = false;
- + }
- +}
- Index: src/client/psmovement.h
- ===================================================================
- --- src/client/psmovement.h (revision 8473)
- +++ src/client/psmovement.h (working copy)
- @@ -194,6 +194,11 @@
- void ToggleAutoMove();
- void ToggleRun();
- + /**
- + * Changes the run state of the actor
- + * @param runState true sets the actor to running mode while false makes the actor walk
- + */
- + void setRun(bool runState);
- void SetSneaking(bool v) { sneaking = v; }
- bool Sneaking() { return sneaking; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement