Пример #1
0
    void RenderArms(int iw, int ih)
    {
        int    x, y;
        string str;

        if (arms.Peek(EquipSlot.LEFT) != null)
        {
            str = "Left" + arms.Peek(EquipSlot.LEFT).GetInfo();
            y   = (Height() / 2) - (2 * ih);
            x   = XOffset() + iw;
            if (Button(str, x, y, iw + iw / 2, ih, 0, -2))
            {
                arms.Store(EquipSlot.LEFT);
                Sound(0);
            }
        }
        if (arms.Peek(EquipSlot.RIGHT) != null)
        {
            str = "Right" + arms.Peek(EquipSlot.RIGHT).GetInfo();
            y   = (Height() / 2) - ih;
            x   = XOffset() + iw;
            if (Button(str, x, y, iw + iw / 2, ih, 0, -1))
            {
                arms.Store(EquipSlot.RIGHT);
                Sound(0);
            }
        }
    }