Documentation for CEGUI / Документация к CEGUI

→The first thing we need to add to the ImageryComponent is an area definition telling the system where this image should be drawn:
0 Первое, что нужно сделать - добавить в ImageryComponent определение области, которое скажет системе, где изображение должно быть отображено:
→So we'll start by adding an empty imagery component to the definition for 'normal_imagery':
0 Добавим пустой ImageyComponent в normal_imagery:
→There are various ways that we can approach applying these image sections to the widget;
0 Есть много различных способов применить эти сегменты.
→To specify rendering to be used for a widget, we use the ImagerySection element.
0 Чтобы описать, как объект должен выглядеть, используется тег ImagerySection.
→This should be added as a sub-element of ImagerySection.
0 Он должен быть добавлен внутрь тега ImagerySection.
→To specify an image to be drawn, we use the ImageryComponent element.
0 Для того, чтобы указать какое изображение нужно использовать, мы применяем тег ImageryComponent.
→the actual pixel sizes of the imagery is not fixed.
0 Размер изображения в пикселях может быть разный.
→although the intended use is to have the end pieces drawn at their 'natural' horizontal size and the middle section stretched to fill the space in between the two ends.
0 Классический вариант, когда есть крайние части в натуральном размере и середина, которую можно растягивать сколько хочешь для заполнения пространства между краями.
→This all sounds simple enough, although there is one issue;
0 Все это звучит довольно просто, но есть одна проблема.
→We can add the outline of these to our existing, work-in-progress, widget-look:
0 Мы можем добавить наброски в наш WidgetLook, который находится в стадии разработки:
→For our button, we will have an imagery section for each of the button states.
0 Для нашей кнопки, мы создадим сегменты для каждого состояния кнопки.
→this name is used later to 'include' the imagery section within layers defined for each of the state imagery definitions.
0 Имя используется позже, для подключения сегмента внутрь слоев, которые определяются для каждого состояния.
→Each imagery section is given a name;
0 Каждому сегменту дается имя.
→this will tell the system how we want our button to appear on screen.
0 Он скажет системе, как наша кнопка должна выглядеть.
→Now we can start to define the ImageyComponents for each section;
0 Теперь мы можем определить ImageryComponent для каждого сегмента.
→So, we add empty StateImagery elements for the required states, and we end up with this:
0 Давайте покончим с этим, и добавим пустые теги StateImagery для необходимых состояний:
→this effectively makes the WidgetLook complete and usable, although obviously nothing would be drawn for it at this stage since we have not defined any imagery.
0 Фактически это дополнит WidgetLook и сделает его самодостаточным, хотя вполне очевидно, что на данном этапе, пока мы не описали виды, ничего отображаться не будет.
→Since we now know what states are required for the widget, it's a good idea to add the framework for these first;
0 Поскольку теперь мы знаем какие состояния поддерживает объект, то было бы неплохо добавить для них каркас.
→As you can see from the reference for the Falagard/Button window renderer, we are required to specify imagery for numerous states, namely these are: Normal, Hover, Pushed, Disabled
0 Как вы можете увидеть из справки для окна Falagard/Button, мы можем указать вид кнопки для многочисленных состояний, а именно: Normal, Hover, Pushed, Disabled.
→So we'll start off by adding the following empty WidgetLook to our initial skin file:
0 Поэтому мы начнем с добавления к нашему исходному файлу пустого тега WidgetLook:
Резюме
Пол:
мужчина
Родной язык:
русский
С нами:
с 26 июня 2011 г. (5594 дня)
Деятельность:
1028 версий перевода с общим рейтингом 95
75 комментариев
Карма: 6 (оценок: 6)
Написать proVIDec личное сообщение