aboutsummaryrefslogtreecommitdiff
path: root/textures/base
Commit message (Collapse)AuthorAge
* Add no_texture.png as fallback for unspecified texturesWuzzy2021-10-20
|
* Mainmenu: Improve "Join Game" tab (#11078)sfan52021-03-20
|
* Use "Aux1" key name consistently everywhereWuzzy2021-02-24
|
* "Browse online content" formspec improvement (#10756)Zughy2021-01-02
|
* MainMenu: Add clear button and icon for search input (#10363)Andrey2020-12-19
|
* Improve default inventory+wield images of node drawtypes (#9299)Wuzzy2020-07-23
|
* Add buttons to ContentDB in game bar and configure world (#9944)rubenwardy2020-06-04
|
* Update ContentDB dialog (#9949)rubenwardy2020-05-29
|
* Add support for statbar “off state” icons (#9462)Wuzzy2020-05-11
| | | | | | | This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles. Add "off state" textures to the builtin statbars. Co-authored-by: SmallJoker <mk939@ymail.com>
* Tweak default textures (#9237)Wuzzy2020-01-04
|
* Add 4 missing fallback/default textures (#8845)Wuzzy2019-10-23
| | | Processed using 'optipng -o7 -strip all '
* Add player sprite textures back into the engine as a fallback (#8823)Paramat2019-08-20
| | | | | | | 'player.png' and 'player_back.png' are hardcoded into the engine as the default appearence of the player object, so the textures should be present in the engine. This results in a functional fallback sprite player for when a game has no player appearence related code.
* Mirror 'sunrisebg' texture to fix chopped right edge (#7935)Paramat2018-12-04
|
* Re-master and improve touchscreen gui icons (#7931)stujones112018-12-03
| | | | Increase the resolution of the smaller icons to look better on modern HD screens. All master SVGs included in the the Android build directory.
* Android: Improve UI scaling on smaller high-density displays (#7834)stujones112018-11-18
| | | | * Android: Improve UI scaling on smaller high-density displays
* Android buttons: Inset 'rare controls', inset and resize 'gear icon' (#7792)Paramat2018-10-19
| | | | | Previously these were both inconsistently close to the screen edge. 'gear icon' has been enlarged to match the width of 'zoom' and 'aux' buttons.
* Android: Add 'aux' button (#7477)Muhammad Rifqi Priyo Susanto2018-07-10
| | | | | Add 'aux' button. Use joystick to trigger 'aux' button when forward and out of main circle, by enabling 'virtual_joystick_triggers_aux' setting.
* Android: Resize jump and sneak buttons' touch target (#7498)Muhammad Rifqi Priyo Susanto2018-06-30
|
* Add screenshots to online content browserrubenwardy2018-05-20
|
* Android: Modify touch screen GUI's buttons (#7240)Muhammad Rifqi Priyo Susanto2018-04-18
| | | | | | | * Android: Add zoom, minimap, and toggle chat button Zoom button is put above jump button. Minimap and toggle chat button are put in settings bar. * Jump button is rotated down button * Move three buttons on the right screen higher
* Android: Replace movement buttons with joystick (#7126)Muhammad Rifqi Priyo Susanto2018-04-10
| | | | | | | | | | | | | | | | | * Android: Replace movement buttons with joystick Replace movement control buttons (arrows at bottom left screen) with virtual joystick. Joystick has 8 directions (same as keyboard). Basically, just map it to keyboard input. Joystick applies only on left 1/3 of screen. Joystick's position can be fixed by enabling fixed_virtual_joystick setting. Three new images: (1) placeholder joystick, (2) joystick container (background), and (3) joystick cursor. Remove unused images: movement control buttons (*_arrow.png). New data type: touch_gui_joystick_move_id Joystick's fixed position is spaced one button size from bottom and from left of screen. Remove unused variable: m_joystick_downlocation
* Add a refresh button to the serverlist (#6957)Tre2018-02-19
| | | | | | | | * add refresh button * Make search and refresh buttons smaller * Change to image button
* Minimap: Leaner minimap arrow makes it easier to see the directionJens Rottmann2017-08-09
| | | | | | | | The arrow symbolizing the player in the square minimap looks almost like a triangle, making it a bit hard to see which direction it is currently pointing in when in a hurry. Redraw it leaner, pointier. Colors unchanged.
* GUI: Convert loading screen's progress bar to image (#5362)kilbith2017-03-10
|
* Add textures for air and ignore items (#5196)Wuzzy2017-02-10
|
* Serverlist: Add ping indicators (#5164)kilbith2017-02-03
|
* Halo: Highlight selected faceRealBadAngel2016-11-12
| | | | | This is a slightly modified and cleaned up version of #3774 by RealBadAngel. By sofar: Remove color change (just make it lighter) and some minor cleanups.
* Textures: New 'smoke puff' texture from TNT modparamat2016-10-04
|
* Main menu, lua_api.txt: Fix mod/texture pack screenshot size issuesWuzzy2016-07-27
| | | | | | Recommend mod screenshot size in lua_api.txt Adjust displayed screenshot size of texture packs Document texture pack files in lua_api.txt
* Textures: Replace menu background fallback dirt_bg.png with empty sky textureparamat2016-04-21
|
* Mainmenu: Unify favorite servers with main serverlistkilbith2016-04-20
|
* Minimap: revert change from RGBA to IndexedAuke Kok2016-04-11
| | | | | | @kilbith spotted correctly that I had accidentally removed the "soft" edging on the minimap overlay by converting it from RGBA to Indexed, which killed the transparent pixels on the edging.
* Minimap: "North" indicator arrow for circle minimapAuke Kok2016-04-08
| | | | | | | | | | Related: #3730 This adds a simple, and small "North" indicator to the circular minimap. The indicator is in a classical triangle-like arrow with a little bit of shading to accentuate the shape and give it a little bit depth. The indicator is stuck exactly at the edge as far outwards as possible, and is not too intrusive but still easy enough to spot.
* Update menu header imageJean-Patrick Guerrero2016-03-25
|
* Resize object_marker_red.png to 16x16ShadowNinja2016-02-28
| | | | Having a non-power-of-two image broke the Android app.
* Minimap: show player markersRealBadAngel2016-02-19
|
* Cleanup selection mesh code, add shaders for halo and selection boxesRealBadAngel2016-02-08
|
* Android: Implement Autohiding button bars to cleanup screenSapier2015-12-18
|
* Compress textures and fontsMaksim Gamarnik2015-10-15
| | | | | Used PNGOUT, OptiPNG and DeflOpt. Removes ~350 KB without any loss in quality.
* Fix relief mapping issuesRealBadAngel2015-07-16
|
* Add minimap featureRealBadAngel2015-06-27
|
* Use frame instead of words 'no screenshot available'rubenwardy2015-06-24
|
* Add extra buttons to Android GUI. All icons are licensed by freepik.com ↵Kodexky2014-12-30
| | | | under CC BY 3.0
* Regenerate server_flags_creative.png from XCFKahrl2014-12-21
|
* Fix background of creative icon (was black, now transparent)Kahrl2014-12-14
|
* Display serverlist flags as iconsKahrl2014-12-13
|
* Fix MSVC compiling warnings and remove an unused textureSmallJoker2014-12-12
|
* Change default halo.png for better visibility.RealBadAngel2014-09-19
|
* Node highlighting.RealBadAngel2014-09-17
|
* Add support for Android 2.3+sapier2014-06-29
| | | | | | | | | | | | | There have been plenty of ppl involved in creating this version. I don't wanna mention names as I'm sure I'd forget someone so I just tell where help has been done: - The partial android versions done by various ppl - Testing on different android devices - reviewing code (especially the in core changes) - testing controls - reviewing texts A big thank you to everyone helping this to be completed!
="hl opt">->getU16("mono_font_size"); m_font = gui::CGUITTFont::createTTFont(env, font_name.c_str(), font_size); #else std::string font_name = "fontdejavusansmono.png"; m_font = env->getFont(getTexturePath(font_name).c_str()); #endif if (m_font == NULL) { dstream << "Unable to load font: " << font_name << std::endl; } else { core::dimension2d<u32> dim = m_font->getDimension(L"M"); m_fontsize = v2u32(dim.Width, dim.Height); dstream << "Font size: " << m_fontsize.X << " " << m_fontsize.Y << std::endl; } m_fontsize.X = MYMAX(m_fontsize.X, 1); m_fontsize.Y = MYMAX(m_fontsize.Y, 1); // set default cursor options setCursor(true, true, 2.0, 0.1); } GUIChatConsole::~GUIChatConsole() { #if USE_FREETYPE m_font->drop(); #endif } void GUIChatConsole::openConsole(f32 height) { m_open = true; m_desired_height_fraction = height; m_desired_height = height * m_screensize.Y; reformatConsole(); } bool GUIChatConsole::isOpen() const { return m_open; } bool GUIChatConsole::isOpenInhibited() const { return m_open_inhibited > 0; } void GUIChatConsole::closeConsole() { m_open = false; } void GUIChatConsole::closeConsoleAtOnce() { m_open = false; m_height = 0; recalculateConsolePosition(); } f32 GUIChatConsole::getDesiredHeight() const { return m_desired_height_fraction; } void GUIChatConsole::setCursor( bool visible, bool blinking, f32 blink_speed, f32 relative_height) { if (visible) { if (blinking) { // leave m_cursor_blink unchanged m_cursor_blink_speed = blink_speed; } else { m_cursor_blink = 0x8000; // on m_cursor_blink_speed = 0.0; } } else { m_cursor_blink = 0; // off m_cursor_blink_speed = 0.0; } m_cursor_height = relative_height; } void GUIChatConsole::draw() { if(!IsVisible) return; video::IVideoDriver* driver = Environment->getVideoDriver(); // Check screen size v2u32 screensize = driver->getScreenSize(); if (screensize != m_screensize) { // screen size has changed // scale current console height to new window size if (m_screensize.Y != 0) m_height = m_height * screensize.Y / m_screensize.Y; m_desired_height = m_desired_height_fraction * m_screensize.Y; m_screensize = screensize; reformatConsole(); } // Animation u32 now = getTimeMs(); animate(now - m_animate_time_old); m_animate_time_old = now; // Draw console elements if visible if (m_height > 0) { drawBackground(); drawText(); drawPrompt(); } gui::IGUIElement::draw(); } void GUIChatConsole::reformatConsole() { s32 cols = m_screensize.X / m_fontsize.X - 2; // make room for a margin (looks better) s32 rows = m_desired_height / m_fontsize.Y - 1; // make room for the input prompt if (cols <= 0 || rows <= 0) cols = rows = 0; m_chat_backend->reformat(cols, rows); } void GUIChatConsole::recalculateConsolePosition() { core::rect<s32> rect(0, 0, m_screensize.X, m_height); DesiredRect = rect; recalculateAbsolutePosition(false); } void GUIChatConsole::animate(u32 msec) { // animate the console height s32 goal = m_open ? m_desired_height : 0; if (m_height != goal) { s32 max_change = msec * m_screensize.Y * (m_height_speed / 1000.0); if (max_change == 0) max_change = 1; if (m_height < goal) { // increase height if (m_height + max_change < goal) m_height += max_change; else m_height = goal; } else { // decrease height if (m_height > goal + max_change) m_height -= max_change; else m_height = goal; } recalculateConsolePosition(); } // blink the cursor if (m_cursor_blink_speed != 0.0) { u32 blink_increase = 0x10000 * msec * (m_cursor_blink_speed / 1000.0); if (blink_increase == 0) blink_increase = 1; m_cursor_blink = ((m_cursor_blink + blink_increase) & 0xffff); } // decrease open inhibit counter if (m_open_inhibited > msec) m_open_inhibited -= msec; else m_open_inhibited = 0; } void GUIChatConsole::drawBackground() { video::IVideoDriver* driver = Environment->getVideoDriver(); if (m_background != NULL) { core::rect<s32> sourcerect(0, -m_height, m_screensize.X, 0); driver->draw2DImage( m_background, v2s32(0, 0), sourcerect, &AbsoluteClippingRect, m_background_color, false); } else { driver->draw2DRectangle( m_background_color, core::rect<s32>(0, 0, m_screensize.X, m_height), &AbsoluteClippingRect); } } void GUIChatConsole::drawText() { if (m_font == NULL) return; ChatBuffer& buf = m_chat_backend->getConsoleBuffer(); for (u32 row = 0; row < buf.getRows(); ++row) { const ChatFormattedLine& line = buf.getFormattedLine(row); if (line.fragments.empty()) continue; s32 line_height = m_fontsize.Y; s32 y = row * line_height + m_height - m_desired_height; if (y + line_height < 0) continue; for (u32 i = 0; i < line.fragments.size(); ++i) { const ChatFormattedFragment& fragment = line.fragments[i]; s32 x = (fragment.column + 1) * m_fontsize.X; core::rect<s32> destrect( x, y, x + m_fontsize.X * fragment.text.size(), y + m_fontsize.Y); m_font->draw( fragment.text.c_str(), destrect, video::SColor(255, 255, 255, 255), false, false, &AbsoluteClippingRect); } } } void GUIChatConsole::drawPrompt() { if (m_font == NULL) return; u32 row = m_chat_backend->getConsoleBuffer().getRows(); s32 line_height = m_fontsize.Y; s32 y = row * line_height + m_height - m_desired_height; ChatPrompt& prompt = m_chat_backend->getPrompt(); std::wstring prompt_text = prompt.getVisiblePortion(); // FIXME Draw string at once, not character by character // That will only work with the cursor once we have a monospace font for (u32 i = 0; i < prompt_text.size(); ++i) { wchar_t ws[2] = {prompt_text[i], 0}; s32 x = (1 + i) * m_fontsize.X; core::rect<s32> destrect( x, y, x + m_fontsize.X, y + m_fontsize.Y); m_font->draw( ws, destrect, video::SColor(255, 255, 255, 255), false, false, &AbsoluteClippingRect); } // Draw the cursor during on periods if ((m_cursor_blink & 0x8000) != 0) { s32 cursor_pos = prompt.getVisibleCursorPosition(); if (cursor_pos >= 0) { video::IVideoDriver* driver = Environment->getVideoDriver(); s32 x = (1 + cursor_pos) * m_fontsize.X; core::rect<s32> destrect( x, y + (1.0-m_cursor_height) * m_fontsize.Y, x + m_fontsize.X, y + m_fontsize.Y); video::SColor cursor_color(255,255,255,255); driver->draw2DRectangle( cursor_color, destrect, &AbsoluteClippingRect); } } } bool GUIChatConsole::OnEvent(const SEvent& event) { if(event.EventType == EET_KEY_INPUT_EVENT && event.KeyInput.PressedDown) { // Key input if(KeyPress(event.KeyInput) == getKeySetting("keymap_console")) { closeConsole(); Environment->removeFocus(this); // inhibit open so the_game doesn't reopen immediately m_open_inhibited = 50; return true; } else if(event.KeyInput.Key == KEY_ESCAPE) { closeConsoleAtOnce(); Environment->removeFocus(this); // the_game will open the pause menu return true; } else if(event.KeyInput.Key == KEY_PRIOR) { m_chat_backend->scrollPageUp(); return true; } else if(event.KeyInput.Key == KEY_NEXT) { m_chat_backend->scrollPageDown(); return true; } else if(event.KeyInput.Key == KEY_RETURN) { std::wstring text = m_chat_backend->getPrompt().submit(); m_client->typeChatMessage(text); return true; } else if(event.KeyInput.Key == KEY_UP) { // Up pressed // Move back in history m_chat_backend->getPrompt().historyPrev(); return true; } else if(event.KeyInput.Key == KEY_DOWN) { // Down pressed // Move forward in history m_chat_backend->getPrompt().historyNext(); return true; } else if(event.KeyInput.Key == KEY_LEFT) { // Left or Ctrl-Left pressed // move character / word to the left ChatPrompt::CursorOpScope scope = event.KeyInput.Control ? ChatPrompt::CURSOROP_SCOPE_WORD : ChatPrompt::CURSOROP_SCOPE_CHARACTER; m_chat_backend->getPrompt().cursorOperation( ChatPrompt::CURSOROP_MOVE, ChatPrompt::CURSOROP_DIR_LEFT, scope); return true; } else if(event.KeyInput.Key == KEY_RIGHT) { // Right or Ctrl-Right pressed // move character / word to the right ChatPrompt::CursorOpScope scope = event.KeyInput.Control ? ChatPrompt::CURSOROP_SCOPE_WORD : ChatPrompt::CURSOROP_SCOPE_CHARACTER; m_chat_backend->getPrompt().cursorOperation( ChatPrompt::CURSOROP_MOVE, ChatPrompt::CURSOROP_DIR_RIGHT, scope); return true; } else if(event.KeyInput.Key == KEY_HOME) { // Home pressed // move to beginning of line m_chat_backend->getPrompt().cursorOperation( ChatPrompt::CURSOROP_MOVE, ChatPrompt::CURSOROP_DIR_LEFT, ChatPrompt::CURSOROP_SCOPE_LINE); return true; } else if(event.KeyInput.Key == KEY_END) { // End pressed // move to end of line m_chat_backend->getPrompt().cursorOperation( ChatPrompt::CURSOROP_MOVE, ChatPrompt::CURSOROP_DIR_RIGHT, ChatPrompt::CURSOROP_SCOPE_LINE); return true; } else if(event.KeyInput.Key == KEY_BACK) { // Backspace or Ctrl-Backspace pressed // delete character / word to the left ChatPrompt::CursorOpScope scope = event.KeyInput.Control ? ChatPrompt::CURSOROP_SCOPE_WORD : ChatPrompt::CURSOROP_SCOPE_CHARACTER; m_chat_backend->getPrompt().cursorOperation( ChatPrompt::CURSOROP_DELETE, ChatPrompt::CURSOROP_DIR_LEFT, scope); return true; } else if(event.KeyInput.Key == KEY_DELETE) { // Delete or Ctrl-Delete pressed // delete character / word to the right ChatPrompt::CursorOpScope scope = event.KeyInput.Control ? ChatPrompt::CURSOROP_SCOPE_WORD : ChatPrompt::CURSOROP_SCOPE_CHARACTER; m_chat_backend->getPrompt().cursorOperation( ChatPrompt::CURSOROP_DELETE, ChatPrompt::CURSOROP_DIR_RIGHT, scope); return true; } else if(event.KeyInput.Key == KEY_KEY_U && event.KeyInput.Control) { // Ctrl-U pressed // kill line to left end m_chat_backend->getPrompt().cursorOperation( ChatPrompt::CURSOROP_DELETE, ChatPrompt::CURSOROP_DIR_LEFT, ChatPrompt::CURSOROP_SCOPE_LINE); return true; } else if(event.KeyInput.Key == KEY_KEY_K && event.KeyInput.Control) { // Ctrl-K pressed // kill line to right end m_chat_backend->getPrompt().cursorOperation( ChatPrompt::CURSOROP_DELETE, ChatPrompt::CURSOROP_DIR_RIGHT, ChatPrompt::CURSOROP_SCOPE_LINE); return true; } else if(event.KeyInput.Key == KEY_TAB) { // Tab or Shift-Tab pressed // Nick completion std::list<std::string> names = m_client->getConnectedPlayerNames(); bool backwards = event.KeyInput.Shift; m_chat_backend->getPrompt().nickCompletion(names, backwards); return true; } else if(event.KeyInput.Char != 0 && !event.KeyInput.Control) { #if (defined(linux) || defined(__linux)) wchar_t wc = L'_'; mbtowc( &wc, (char *) &event.KeyInput.Char, sizeof(event.KeyInput.Char) ); m_chat_backend->getPrompt().input(wc); #else m_chat_backend->getPrompt().input(event.KeyInput.Char); #endif return true; } } else if(event.EventType == EET_MOUSE_INPUT_EVENT) { if(event.MouseInput.Event == EMIE_MOUSE_WHEEL) { s32 rows = myround(-3.0 * event.MouseInput.Wheel); m_chat_backend->scroll(rows); } } return Parent ? Parent->OnEvent(event) : false; }