📄 s60uiexample.rss
字号:
// Copyright (c) 2006 Nokia Corporation.
// RESOURCE IDENTIFIER
NAME S60U // 4 letter ID
// INCLUDES
#include <eikon.rh>
#include <avkon.rh>
#include <avkon.rsg>
#include <appinfo.rh>
#include "S60UIExample.hrh"
#include "S60UIExample.rls"
#include <S60UIExample.mbg> // for the weapon icons
// RESOURCE DEFINITIONS
// -----------------------------------------------------------------------------
//
// Define the resource file signature
// This resource should be empty.
//
// -----------------------------------------------------------------------------
//
RESOURCE RSS_SIGNATURE
{
}
// -----------------------------------------------------------------------------
//
// Default Document Name
//
// -----------------------------------------------------------------------------
//
RESOURCE TBUF r_default_document_name
{
buf="HEWB";
}
// -----------------------------------------------------------------------------
//
// Define default menu and CBA key.
//
// -----------------------------------------------------------------------------
//
RESOURCE EIK_APP_INFO
{
}
// -----------------------------------------------------------------------------
//
// r_s60uiexample_initialview
// Define initial view
//
// -----------------------------------------------------------------------------
//
RESOURCE AVKON_VIEW r_s60uiexample_initialview
{
menubar = r_s60uiexample_initialmenubar;
cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
}
// -----------------------------------------------------------------------------
//
// r_s60uiexample_initialmenubar
// Menu title definition
//
// -----------------------------------------------------------------------------
//
RESOURCE MENU_BAR r_s60uiexample_initialmenubar
{
titles =
{
MENU_TITLE
{
menu_pane = r_s60uiexample_initialmenu;
}
};
}
// -----------------------------------------------------------------------------
//
// r_s60uiexample_initialmenu
// Menu for "Options"
//
// -----------------------------------------------------------------------------
//
RESOURCE MENU_PANE r_s60uiexample_initialmenu
{
items =
{
MENU_ITEM
{
command = ES60UIExampleStartGame;
txt = qtn_startgame;
},
MENU_ITEM
{
command = ES60UIExampleContinueGame;
txt = qtn_continuegame;
},
MENU_ITEM
{
command = ES60UIExampleRegister;
txt = qtn_register;
},
MENU_ITEM
{
command = ES60UIExampleSettings;
txt = qtn_settings;
},
MENU_ITEM
{
command = ES60UIExampleHighscores;
txt = qtn_highscores;
},
MENU_ITEM
{
command = EAknSoftkeyExit;
txt = qtn_exit;
}
};
}
// -----------------------------------------------------------------------------
//
// r_s60uiexample_playview
// Define play view
//
// -----------------------------------------------------------------------------
//
RESOURCE AVKON_VIEW r_s60uiexample_playview
{
menubar = r_s60uiexample_playmenubar;
cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
}
// -----------------------------------------------------------------------------
//
// r_S60UIExample_playmenubar
// Menu title definition
//
// -----------------------------------------------------------------------------
//
RESOURCE MENU_BAR r_s60uiexample_playmenubar
{
titles =
{
MENU_TITLE
{
menu_pane = r_s60uiexample_playmenu;
}
};
}
// -----------------------------------------------------------------------------
//
// r_s60uiexample_playmenu
// Menu for "Options"
//
// -----------------------------------------------------------------------------
//
RESOURCE MENU_PANE r_s60uiexample_playmenu
{
items =
{
MENU_ITEM
{
command = ES60UIExampleStopGame;
txt = qtn_endgame;
},
MENU_ITEM
{
command = ES60UIExampleContinueGame;
txt = qtn_continuegame;
},
MENU_ITEM
{
command = ES60UIExampleStartGame;
txt = qtn_restartgame;
},
MENU_ITEM
{
command = ES60UIExamplePauseGame;
txt = qtn_pausegame;
},
MENU_ITEM
{
command = ES60UIExampleWeapon;
txt = qtn_selectweapon;
},
MENU_ITEM
{
command = EAknSoftkeyExit;
txt = qtn_exit;
}
};
}
RESOURCE DIALOG r_s60uiexample_enter_score_query
{
flags = EGeneralQueryFlags;
buttons = R_AVKON_SOFTKEYS_YES_NO;
items =
{
DLG_LINE
{
type = EAknCtQuery;
id = EGeneralQuery;
control = AVKON_CONFIRMATION_QUERY
{
layout = EConfirmationQueryLayout;
label = qtn_enter_score_query_label;
};
}
};
}
RESOURCE DIALOG r_s60uiexample_confirmation_query
{
flags = EGeneralQueryFlags;
buttons = R_AVKON_SOFTKEYS_YES_NO;
items =
{
DLG_LINE
{
type = EAknCtQuery;
id = EGeneralQuery;
control = AVKON_CONFIRMATION_QUERY
{
layout = EConfirmationQueryLayout;
label = qtn_confirmation_query_label;
};
}
};
}
//-----------------------------------------------------------------------------
//
// r_s60uiexample_name_query
// Resource of Data Query.
//
//-----------------------------------------------------------------------------
//
RESOURCE DIALOG r_s60uiexample_name_query
{
flags = EGeneralQueryFlags;
buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
items =
{
DLG_LINE
{
type = EAknCtQuery;
id = EGeneralQuery;
control = AVKON_DATA_QUERY
{
layout = EDataLayout;
label = qtn_name_query_label;
control = EDWIN
{
flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
width = 23;
maxlength = 18;
max_view_height_in_lines = 2;
};
};
}
};
}
//-----------------------------------------------------------------------------
//
// r_s60uiexample_list_query
// Resources of Weapon Selection Query.
//
//-----------------------------------------------------------------------------
//
RESOURCE AVKON_LIST_QUERY r_s60uiexample_list_query
{
flags = EGeneralQueryFlags;
softkeys = R_AVKON_SOFTKEYS_OK_CANCEL;
items =
{
AVKON_LIST_QUERY_DLG_LINE
{
control = AVKON_LIST_QUERY_CONTROL
{
listtype = EAknCtSingleGraphicPopupMenuListBox;
listbox = AVKON_LIST_QUERY_LIST
{
array_id = r_s60uiexample_list_query_item;
};
heading = qtn_list_query_heading;
};
}
};
}
RESOURCE ARRAY r_s60uiexample_list_query_item
{
items =
{
LBUF
{
txt = qtn_list_query_item_gun;
},
LBUF
{
txt = qtn_list_query_item_dagger;
},
LBUF
{
txt = qtn_list_query_item_candlestick;
}
};
}
RESOURCE AKN_ICON_ARRAY r_s60uiexample_weapon_icons
{
bmpfile = "\\resource\\apps\\S60UIExample.mif";
icons =
{
AKN_ICON
{
iconId = EMbmS60uiexampleGun;
maskId = EMbmS60uiexampleGun_mask;
},
AKN_ICON
{
iconId = EMbmS60uiexampleDagger;
maskId = EMbmS60uiexampleDagger_mask;
},
AKN_ICON
{
iconId = EMbmS60uiexampleCandlestick;
maskId = EMbmS60uiexampleCandlestick_mask;
}
};
}
//-----------------------------------------------------------------------------
//
// r_s60uiexample_form_dialog
// Resources for Register Form.
//
//-----------------------------------------------------------------------------
//
RESOURCE DIALOG r_s60uiex_form_dialog
{
flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect | EEikDialogFlagNoTitleBar | EEikDialogFlagNoBorder | EEikDialogFlagCbaButtons;
// Defined in avkon.hrh (search CBA LABELS)
// Labels the left softkey as Options and the right softkey as
// Back
buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
form = r_s60uiex_form;
}
RESOURCE FORM r_s60uiex_form
{
flags = EEikFormUseDoubleSpacedFormat;
items =
{
DLG_LINE
{
type = EEikCtEdwin;
prompt = qtn_s60uiex_form_name;
id = ES60UIExCtrlIdName;
itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
control = EDWIN
{
flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
width = 1;
lines = 2;
maxlength = 30;
base_line_delta = 21;
};
},
DLG_LINE
{
type = EEikCtDateEditor;
id = ES60UIExCtrlIdBirthDate;
prompt = qtn_s60uiex_form_dob;
control = DATE_EDITOR
{
minDate = DATE
{
year = 1900;
};
maxDate = DATE
{
year = 2100;
};
};
}
};
}
// -----------------------------------------------------------------------------
//
// String Resources .
//
// -----------------------------------------------------------------------------
//
RESOURCE TBUF32 r_s60uiexample_title_text
{
buf = qtn_s60uiexample_title_text;
}
RESOURCE TBUF32 r_s60uiexample_highscore_title_text
{
buf = qtn_high_score_title_text;
}
RESOURCE TBUF32 r_s60uiexample_resetting_text
{
buf = qtn_resetting_text;
}
// -----------------------------------------------------------------------------
//
// Resources HighScore View.
//
// -----------------------------------------------------------------------------
//
RESOURCE AVKON_VIEW r_s60uiexample_highscore_view
{
cba = R_AVKON_SOFTKEYS_OK_CANCEL;
}
// -----------------------------------------------------------------------------
//
// Resources Settings List.
//
// -----------------------------------------------------------------------------
//
RESOURCE AVKON_VIEW r_s60uiexample_settings_view
{
menubar = r_s60uiexample_settingsmenubar;
cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
}
// -----------------------------------------------------------------------------
//
// r_s60uiexample_settingsmenubar
// Menu title definition
//
// -----------------------------------------------------------------------------
//
RESOURCE MENU_BAR r_s60uiexample_settingsmenubar
{
titles =
{
MENU_TITLE
{
menu_pane = r_s60uiexample_settingsmenu;
}
};
}
// -----------------------------------------------------------------------------
//
// r_s60uiexample_settingsmenu
// Menu for "Options"
//
// -----------------------------------------------------------------------------
//
RESOURCE MENU_PANE r_s60uiexample_settingsmenu
{
items =
{
MENU_ITEM
{
command = ES60UIExampleChange;
txt = qtn_change;
},
MENU_ITEM
{
command = EAknSoftkeyExit;
txt = qtn_exit;
}
};
}
RESOURCE AVKON_SETTING_ITEM_LIST r_s60uiexample_setting_list
{
flags = EAknSettingItemNumberedStyle;
title = qtn_setting_list_title;
items =
{
AVKON_SETTING_ITEM
{
identifier = ESpeedSettingItem;
name = qtn_setting_list_item_speed;
setting_page_resource = r_s60uiexample_speed_setting_page;
},
AVKON_SETTING_ITEM
{
identifier = EBacktrackingSettingItem;
setting_page_resource = r_s60uiexample_backtracking_setting_page;
associated_resource = r_s60uiexample_backtracking_texts;
name = qtn_setting_list_item_backtracking;
}
};
}
RESOURCE AVKON_SETTING_PAGE r_s60uiexample_speed_setting_page
{
type = EAknCtSlider;
editor_resource_id = r_s60uiexample_slider;
label = qtn_setting_list_item_speed;
}
RESOURCE SLIDER r_s60uiexample_slider
{
layout = EAknSettingsItemSliderLayout;
minvalue = 0;
maxvalue = 10;
step = 2;
valuetype = EAknSliderValueBareFigure;
minlabel = qtn_slider_minlabel;
maxlabel = qtn_slider_maxlabel;
}
RESOURCE AVKON_SETTING_PAGE r_s60uiexample_backtracking_setting_page
{
type = EAknCtPopupSettingList;
label = qtn_setting_list_item_backtracking;
}
RESOURCE AVKON_POPUP_SETTING_TEXTS r_s60uiexample_backtracking_texts
{
flags = 0;
setting_texts_resource = r_s60uiexample_on_off_texts;
}
RESOURCE ARRAY r_s60uiexample_on_off_texts
{
items =
{
AVKON_ENUMERATED_TEXT { value=0; text = qtn_on; },
AVKON_ENUMERATED_TEXT { value=1; text = qtn_off; }
};
}
// ----------------------------------------------------------------------------
//
// r_localisable_app_info
//
// ----------------------------------------------------------------------------
//
RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
{
short_caption = qtn_short_caption_string;
caption_and_icon =
CAPTION_AND_ICON_INFO
{
caption = qtn_caption_string;
number_of_icons = 1;
icon_file = "\\resource\\apps\\S60UIExample_icon.mif";
};
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -