View Single Post
  #2  
Old 08-31-2013, 08:50 AM
Nyrod Nyrod is offline
Sarnak


Join Date: Jul 2011
Posts: 490
Default

first thing i wanted to do was to make a hotbutton that housed inventory slots. maybe all of them. i remember once having a ui with a really small window with the whole inventory that was very small and still usable without opening the inventory but couldnt seem to find the one i had. i really liked the P99OUI look but wanted it to work like duxa. instead of trying to change all the graphics, i figured would be easier and more essential to work on the actual code.

what ive done so far hacking away at it.

[You must be logged in to view images. Log in or Register.]

ya it looks like garbage lol!

what i do. open Notepad++, load up EQUI_HotbuttonsWnd.xml. first thing, i go to view > fold all, so i can actually see whats going on. if i am comparing with another UI i load that EQUI_HotbuttonsWnd.xml and right click its tab > move to other view

here is what i have found in the code just by screwing around. sample code...

<Button item = "HB_Button1"> name of the button
<ScreenID>HB_Button1</ScreenID>
<Font>1</Font>
<RelativePosition>true</RelativePosition>
<Location> these numbers change where the little hot button square is in the window
<X>2</X> horizontal positioned
<Y>20</Y>verticle positioned
</Location>
<Size> these numbers determine the size of the square, 40 is default
<CX>40</CX>
<CY>40</CY>
</Size>
<Text>1</Text> text that will be displayed on the button, sometimes not visible? havent messed with this much
<TextColor>
<R>0</R> red, green, blue value to change text color
<G>0</G>
<B>0</B>
</TextColor>
<DecalSize>
<CX>40</CX> im not sure yet what exactly this changes but if i change the basic size i have changed this to the same amount just incase
<CY>40</CY>
</DecalSize>
<ButtonDrawTemplate>
<Normal>A_HotButton1Normal</Normal>
<Pressed>A_HotButton1Pressed</Pressed>
<Flyby>A_HotButton1Flyby</Flyby>
<Disabled>A_HotButton1Disabled</Disabled>
<PressedFlyby>A_HotButton1PressedFlyby</PressedFlyby>
</ButtonDrawTemplate>
</Button>


this is how the code looks like in Notepad++ (im using a different color theme)

[You must be logged in to view images. Log in or Register.]


a lot of it is common sense as far as how things are labeled

as you can see <!-- your info here --> is a great way to leave a note of the parts you have changed

<InvSlot item = "HB_InvSlot1"> is the code for the inventory button when you put that on the hotbar
<ScreenID>HB_InvSlot1</ScreenID>
<RelativePosition>true</RelativePosition>
<Location>
<X>2</X> this location must match on both the button, inventory slot, and spell gem code. i see these as "tabs" over the button spot
<Y>18</Y>
</Location>
<Size>
<CX>35</CX> the size of the inventory "tab" over top of the button
<CY>35</CY>
</Size>
<Background>A_RecessedBox</Background> you will work with EQTypes a lot A_RecessedBox is the default graphic for inventory slots
<EQType>-1</EQType>

<Style_VScroll>false</Style_VScroll>
<Style_HScroll>false</Style_HScroll>
<Style_Transparent>false</Style_Transparent>
</InvSlot>


<SpellGem item = "HB_SpellGem1"> is for spell gems in the hotbar
<ScreenID>HB_SpellGem1</ScreenID>
<RelativePosition>true</RelativePosition>
<Location>
<X>2</X> same as above
<Y>18</Y>
</Location>
<Size>
<CX>35</CX> same as above
<CY>35</CY>
</Size>
<SpellGemDrawTemplate>
<Holder>HB_SpellGemHolder</Holder>
</SpellGemDrawTemplate>
<SpellIconOffsetX>2</SpellIconOffsetX> havent messed with this yet
<SpellIconOffsetY>6</SpellIconOffsetY>
</SpellGem>


lol as im working on this is see how much of a pain in the ass it is putting all this info down but i will try to keep updating as im working on the UI.

--------------

i made a mistake by thinking that if i wanted more than 10 hotkeys on a bar i would simply copy all the info that say button 1 uses and change all the names/data to say "11" and this didnt work for me. i decided at this point to open up duxa's UI and see how the code looked in his. instead of adding a <InvSlot item = "HB_InvSlot11">...</InvSlot> and <Button item = "HB_Button11">...</Button> he simply had <InvSlot item = "Newslot1">...</InvSlot> etc

when adding any new button, invslot, spellgem etc. you also need to add it under <Screen item = "HotButtonWnd"> (HotbuttonWnd2, etc.) like this...

<Pieces>HB_InvSlot7</Pieces>
<Pieces>HB_InvSlot8</Pieces>
<Pieces>HB_InvSlot9</Pieces>
<Pieces>HB_InvSlot10</Pieces>
<Pieces>Newslot1</Pieces>
<Pieces>HB_SpellGem1</Pieces>
<Pieces>HB_SpellGem2</Pieces>
<Pieces>HB_SpellGem3</Pieces>
<Pieces>HB_SpellGem4</Pieces>

this is the code under the <InvSlot item = "Newslot1"> that u will be adjusting a lot

<InvSlot item="Newslot1">
<ScreenID>NewSlot1</ScreenID>
<RelativePosition>true</RelativePosition>
<Location>
<X>74</X> location of the actual hotkey in the hotbar
<Y>18</Y>
</Location>
<Size>
<CX>35</CX> its size
<CY>35</CY>
</Size>
<Background>A_InvPrimary</Background> this is the displayed background, in this example its your characters primary weapon
<EQType>13</EQType> the code for primary weapon slot
<Style_VScroll>false</Style_VScroll>
<Style_HScroll>false</Style_HScroll>
<Style_Transparent>false</Style_Transparent>
</InvSlot>

after i copied over ONLY these code changes (putting the "newslots" into my resized hotbar 1) this is what i have so far. its still a mess but all the floundering around is done and wont take much to fix the positioning, size and deciding which inventory slots i want in my hotbar.

[You must be logged in to view images. Log in or Register.]

basic list of inventory EQtypes

EQType Background
1 LEar A_InvEar
2 Head A_InvHead
3 Face A_InvFace
4 REar A_InvEar
5 Neck A_InvNeck
6 Shoulder A_InvShoulders
7 Arms A_InvArms
8 Back A_Inv_AboutBody
9 LWrist A_InvWrist
10 RWrist A_InvWrist
11 Range A_InvRange
12 Hands A_InvHands
13 Primary A_InvPrimary
14 Secondary A_InvSecondary
15 LFinger A_InvRing
16 RFinger A_InvRing
17 Chest A_InvChest
18 Legs A_InvLegs
19 Feet A_InvFeet
20 Belt A_InvWaist
21 Ammo A_InvAmmo

22 inventory slot left 1 A_RecessedBox
23 inventory slot left 2 "
24 inventory slot left 3 "
25 inventory slot left 4 "
26 inventory slot right 1 "
27 inventory slot right 2 "
28 inventory slot right 3 "
29 inventory slot right 4 "

-----
i changed my plan a bit, but what i finally ended up with is this, there are 21 equipment slots and 8 inventory slots, scaling down the boxes to 35 i was able to put 10 hotkeys, 8 inventory slots and 12 equipment slots in the space/size of 2 normal hotkeys side by side. all of these can be easily changed.

[You must be logged in to view images. Log in or Register.]
__________________
Last edited by Nyrod; 09-02-2013 at 05:51 AM..
Reply With Quote