MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / loadButtons

Method loadButtons

src/org/albite/albite/BookCanvas.java:2271–2302  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2269 }
2270
2271 private void loadButtons() {
2272
2273 if (orientation == ORIENTATION_0 && fullscreen == false) {
2274
2275 buttons = new ImageButton[5];
2276 buttons[0] = new ImageButton(
2277 "/res/gfx/button_menu.ali", TASK_MENU);
2278 buttons[1] = new ImageButton(
2279 "/res/gfx/button_library.ali", TASK_LIBRARY);
2280 buttons[2] = new ImageButton(
2281 "/res/gfx/button_dict.ali", TASK_DICTIONARY);
2282 buttons[3] = new ImageButton(
2283 "/res/gfx/button_font_size.ali", TASK_FONTSIZE);
2284 buttons[4] = new ImageButton(
2285 "/res/gfx/button_color_profile.ali", TASK_COLORSCHEME);
2286
2287 if (buttons.length > 0) {
2288 int x = 0;
2289 for (int i = 0; i < buttons.length; i++) {
2290 buttons[i].setX(x);
2291 buttons[i].setY(0);
2292 x += buttons[i].getWidth();
2293 }
2294 }
2295
2296 //#if !(TinyMode || TinyModeExport || LightMode || LightModeExport)
2297 colorizeButtons();
2298 //#endif
2299 } else {
2300 buttons = null;
2301 }
2302 }
2303
2304 private void reloadPages() {
2305 final int currentPos = chapterBooklet.getCurrentPage().getStart();

Callers 2

initializeMethod · 0.95
setOrientationMethod · 0.95

Calls 4

colorizeButtonsMethod · 0.95
setXMethod · 0.80
setYMethod · 0.80
getWidthMethod · 0.45

Tested by

no test coverage detected